SNMPv3
What is SNMPv3?
SNMPv3 is the third version of the Simple Network Management Protocol. Its User-based Security Model (USM, RFC 3414) replaces the plaintext community string of SNMPv1 and v2c with named users, keyed message authentication and optional encryption. AdminKit explains the three SNMPv3 security levels and why only authPriv also hides the management data itself.
By AdminKit team, Netbase JSC · Updated
SNMPv3 keeps the same managers, agents and management information base as earlier versions of SNMP, but changes how a request proves who sent it. SNMPv1 and v2c trust anyone who presents the right community string, which travels in plaintext. SNMPv3 instead defines named users with their own keys, specified in RFC 3414, the User-based Security Model (USM), published in December 2002.
How does SNMPv3 authentication and privacy work?
RFC 3414 names modification of information and masquerade as the principal threats its model protects against, with disclosure and message stream modification (reordering, delay or replay) as secondary threats it covers in a limited way. Each user gets an authentication protocol and key, and optionally a privacy (encryption) protocol and key. The open-source Net-SNMP project’s SNMPv3 options tutorial describes the resulting security levels:
noAuthNoPriv no authentication, no encryption
authNoPriv authenticated, contents readable
authPriv authenticated and encrypted
RFC 3414 itself specifies HMAC-MD5-96 and HMAC-SHA-96 for authentication and CBC-DES for privacy. Later documents added stronger options: RFC 3826 defines AES with a 128-bit key in CFB mode, and RFC 7860 defines HMAC-SHA-2 authentication protocols. A Net-SNMP query at authPriv names the user, both protocols and both passphrases (placeholders below):
snmpget -v 3 -l authPriv -u monitor \
-a SHA -A '<auth-passphrase>' \
-x AES -X '<priv-passphrase>' \
192.0.2.10 sysUpTime.0
USM also carries a timeliness check: an authenticated message whose engine time falls outside a 150-second window of the receiver’s is rejected, which narrows the window for replaying a captured request.
Why move from community strings to SNMPv3?
A device that answers a default community string can hand its whole configuration and topology to whoever asks. MITRE ATT&CK technique T1602.001 describes adversaries dumping SNMP management information bases this way, and its mitigations include migrating to SNMPv3 and configuring it at the highest level, authPriv. Disable v1 and v2c on the agent once every manager speaks v3, otherwise the old community string remains a way in.
SNMPv3 protects the messages, not the reachability of the service. An agent on UDP port 161 still answers anyone who can reach it, so it belongs on a management network or VPN, not the open internet. AdminKit’s port check probes a fixed list of nine TCP ports on your own public IP and does not test port 161 or any UDP port; AdminKit’s guide on whether port 161 (SNMP) is exposed shows how to check it yourself. The same trusted-network assumption applies to other management protocols such as Modbus/TCP.
SNMPv3 is part of AdminKit’s machine protocols cluster; the full AdminKit glossary lists other related terms.
Frequently asked questions
What are the three SNMPv3 security levels?
noAuthNoPriv sends messages with neither authentication nor encryption, authNoPriv authenticates each message but leaves its contents readable, and authPriv both authenticates and encrypts. The Net-SNMP tutorial recommends requiring at least authNoPriv, and MITRE ATT&CK recommends the highest level, authPriv.
Which algorithms does SNMPv3 use?
RFC 3414 defines HMAC-MD5-96 and HMAC-SHA-96 for authentication and CBC-DES for privacy. RFC 3826 adds AES with a 128-bit key in CFB mode, and RFC 7860 adds HMAC-SHA-2 authentication protocols. Pick SHA-2 and AES where both ends support them.
Does SNMPv3 protect against replayed messages?
Partly. RFC 3414's timeliness module rejects authenticated messages whose engine time differs from the receiver's by more than a 150-second time window, which limits how long a captured message can be replayed. The RFC lists replay as a secondary threat with limited protection.
Does SNMPv3 make it safe to expose port 161 to the internet?
It removes the guessable community string, but the agent still answers anyone who can reach it, so keep SNMP on a management network. AdminKit's port check does not test port 161 or any UDP port; AdminKit's port 161 guide shows how to check it yourself.
Sources
- RFC 3414 -- User-based Security Model (USM) for SNMPv3
- RFC 3826 -- The AES Cipher Algorithm in the SNMP User-based Security Model
- RFC 7860 -- HMAC-SHA-2 Authentication Protocols in USM for SNMPv3
- Net-SNMP -- Tutorial: SNMPv3 options
- MITRE ATT&CK -- T1602.001 Data from Configuration Repository: SNMP (MIB Dump)