USM
acronymKept in this browser · My desk
Stands for: User-based Security Model
The security model of SNMPv3 that replaces community strings with named users, each with optional message authentication (HMAC) and encryption, keyed separately for every SNMP engine.
USM (RFC 3414, STD 62, December 2002) gives SNMP three security levels: noAuthNoPriv, authNoPriv and authPriv. Authentication is an HMAC truncated to 96 bits over the whole message; privacy encrypts the scoped PDU with DES or, since RFC 3826, AES-128. Keys are derived from passwords and localized with the agent's engine ID, so a key stolen from one device does not open another. A discovery exchange learns the engine ID and clock first. Engine ID, user name and timers still travel in clear; what a user may see is decided separately by VACM views.
What it is. SNMPv3 keeps the PDUs of version 2 and wraps them in a new message: msgVersion 3, a header with msgID, msgMaxSize (at least 484 octets), msgFlags and msgSecurityModel, then security parameters, then the data (RFC 3412). The security model field selects how the message is protected; value 3 is the User-based Security Model (RFC 3411). USM's parameters are a BER SEQUENCE of msgAuthoritativeEngineID, msgAuthoritativeEngineBoots, msgAuthoritativeEngineTime, msgUserName (up to 32 octets), msgAuthenticationParameters and msgPrivacyParameters (RFC 3414, section 2.4). The authoritative engine is the agent for requests and the receiver for informs.
Security levels. RFC 3411 names three: noAuthNoPriv, authNoPriv and authPriv, encoded in the auth and priv bits of msgFlags; privacy without authentication is "reserved, MUST NOT be used". Authentication protects integrity and origin; privacy adds confidentiality of the scoped PDU only. The threats USM explicitly does not address are denial of service and traffic analysis.
How authentication works. The sender fills msgAuthenticationParameters with twelve zero octets, computes HMAC over the entire serialized message with the user's localized key (K1 = key XOR 0x36 repeated, K2 = key XOR 0x5C repeated), takes the first 12 octets of the result and writes them over the zeros (RFC 3414, section 6.3.1). The original protocols were HMAC-MD5-96 and HMAC-SHA-96; RFC 7860 (April 2016) added HMAC-SHA-2 variants. Replay is limited by the engine boots and time: messages outside a 150-second time window are rejected.
Keys and discovery. A password is stretched by repeating it to one megabyte (1,048,576 octets) and hashing, then localized by hashing again with the engine ID on both sides. RFC 3414 publishes test vectors: the password maplesyrup gives the MD5 key 9f af 32 83 88 4e 92 83 4e bc 98 47 d8 ed d9 63 and, localized for engine ID 00 00 00 00 00 00 00 00 00 00 00 02, the key 52 6f 5e ed 9f cc e2 6f 89 64 c2 93 07 87 d8 2b; with SHA-1 the localized key is 66 95 fe bc 92 88 e3 62 82 23 5f c7 15 1f 12 84 97 b3 8f 3f. Because keys depend on the engine ID, a manager must first learn it: it sends an unauthenticated request with an empty engine ID and user name and receives a Report carrying the engine ID and the usmStatsUnknownEngineIDs counter; an authenticated follow-up with boots and time at zero returns a Report with the current values (RFC 3414, section 4).
Passwords. Because the stretching only repeats the password, RFC 3414 requires implementations to ensure "that passwords are at least 8 characters in length", and warns that repetition adds nothing: "a password 'bertbert' will result in exactly the same key as password 'bertbertbert'".
Privacy. The original cipher was CBC-DES with a 56-bit key; RFC 3826 (June 2004) added CFB128-AES-128. Implementations must match on both ends, and many devices offer only some combinations.
In practice. Configure a user per poller with authPriv, SHA-2 where both sides support it, AES for privacy, distinct passwords for authentication and privacy, and set the engine ID before creating users, since changing it invalidates every localized key. Then decide what each user may see with VACM: the access check runs in five steps (context, group, access entry, view, then whether the object is in the view), and a view is a set of included and excluded subtrees where the entry with the most sub-identifiers wins (RFC 3415). CISA's 2017 alert TA17-156A recommends exactly this pairing: SNMPv3 at authPriv plus views that whitelist only the needed MIB objects.
What goes wrong. Discovery loops when a manager caches a stale engine ID or the agent's clock is reset. authNoPriv leaves the data readable. Weak or shared passwords can be attacked offline from captured authenticated messages, since the HMAC and the inputs are visible. And even with authPriv an observer sees the engine ID, boots, time and user name in every message, which reveals who polls what and how often.
Neighbours. USM replaced the community string; VACM decides access; the TLS Transport Model (RFC 6353) is the standards-track alternative that uses TLS or DTLS and certificates instead of USM keys.
Also known as: user-based security model, snmpv3 usm, snmpv3 security, authpriv, authnopriv, noauthnopriv
Sources
- IETF, RFC 3414 (STD 62), User-based Security Model (USM) for SNMPv3, U. Blumenthal and B. Wijnen, December 2002 (read 2026-11-23): UsmSecurityParameters, discovery with usmStatsUnknownEngineIDs, the 150-second time window, HMAC-MD5-96 and HMAC-SHA-96, key localization and the maplesyrup test vectors
- IETF, RFC 3411 (STD 62), An Architecture for Describing SNMP Management Frameworks, December 2002 (read 2026-11-23): security levels; security model 3 = USM
- IETF, RFC 3412 (STD 62), Message Processing and Dispatching for SNMP, December 2002 (read 2026-11-23): the SNMPv3 message and msgFlags
- IETF, RFC 3826, The AES Cipher Algorithm in the SNMP User-based Security Model, June 2004 (read 2026-11-23): CFB128-AES-128 privacy
- IETF, RFC 7860, HMAC-SHA-2 Authentication Protocols in USM for SNMPv3, April 2016 (read 2026-11-23): SHA-2 authentication protocols
- IETF, RFC 3415 (STD 62), View-based Access Control Model (VACM) for SNMP, December 2002 (read 2026-11-23): isAccessAllowed in five steps; longest-match view subtrees