snmp3Simple Network Management Protocol v3 with USM Auth & PrivacyReal SHA-256 + AES-128 Encrypted Traps (snmp3) With Cables Plugged In
What It Does on the Wire
Zero fake placeholder bytes here: snmp3 runs full RFC 3414/7860 Ku -> Kul key localization against engineid, encrypts the ScopedPDU with AES-128-CFB or DES, and signs the live HMAC so Wireshark and snmptrapd decrypt it on the first try.
Simple Network Management Protocol v3 (snmp3, RFC 3414 / RFC 3826 / RFC 7860) secures network monitoring with the User-based Security Model (USM). Unlike mock packet generators that emit zeroed dummy bytes, FrameAssembly executes full cryptographic key localization (Ku -> Kul) against msgAuthoritativeEngineID (engineid), computes live truncated HMAC (md5, sha, sha256, sha384, sha512) over the entire SNMPv3 message, and encrypts the ASN.1 ScopedPDU using AES-128-CFB (priv aes) or CBC-DES (priv des).
That means you can enter your exact user, auth, and priv passphrases into Wireshark -> Preferences -> Protocols -> SNMP -> Users Table (or Checkmk / snmptrapd) and decrypt every FrameAssembly-generated .pcap on the first try.
Wireshark SNMPv3 USM Decryption & NMS Onboarding Labs
Generate authentic authPriv (auth sha256 + priv aes) polling and encrypted trap .pcap files to verify Wireshark USM user tables and snmptrapd.conf createUser directives.
RFC 3414 Authoritative Engine Discovery (report) Troubleshooting
Model the unauthenticated noAuthNoPriv discovery probe followed by an snmp3 report (usmStatsUnknownEngineIDs.0 1.3.6.1.6.3.15.1.1.4.0 or usmStatsNotInTimeWindows.0) before authenticated polling.
Zero-Trust Campus & OT Switch Monitoring Audits
Validate SHA-2 (sha256/sha512) + AES-128 compliance policies across enterprise switches and industrial firewalls without exposing production credentials.
Minimal Quickstart (snmp3_quickstart.frasm)
Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.
host poller { ip 10.40.1.10 }host router { ip 10.40.1.1 }compile { poller -> router snmp3 get user "secops" engineid "80001f888001020304" engineboots 3 enginetime 1200 auth sha256 "AuthPassPhrase99!" priv aes "PrivPassPhrase99!" reqid 101 oid 1.3.6.1.2.1.1.1.0 wait 2ms poller <- router snmp3 response user "secops" engineid "80001f888001020304" engineboots 3 enginetime 1200 auth sha256 "AuthPassPhrase99!" priv aes "PrivPassPhrase99!" reqid 101 varbind 1.3.6.1.2.1.1.1.0 string "Core-RTR OS 17.9"}What the Compiler Calculates So You Don't Have To
- Derives
msgFlagsautomatically from provided credentials:noAuthNoPriv(neither set),authNoPriv(authonly), orauthPriv(auth+priv, setting0x03, plus0x04Reportable on requests/informs). - Runs RFC 3414 / RFC 7860 password-to-key (
Ku, 1 MiB expansion) and engine-localized (Kul) derivation formd5,sha(SHA-1),sha256,sha384, andsha512. - Encrypts the
ScopedPDUwithaes(AES-128-CFB usingengineboots || enginetime || saltIV per RFC 3826) ordes, then writes the exact HMAC digest intomsgAuthenticationParameters.
Full RFC 3414 Engine Discovery (report) + SHA-256/AES-128 authPriv Poll & Trap
Walks through RFC 3414 USM engine discovery (usmStatsUnknownEngineIDs.0), authenticated/encrypted get + response on UDP 161, and an authPriv encrypted snmp3 trap on UDP 162.
host zabbix_srv { ip 172.18.10.50 }host core_rtr { ip 172.18.10.1 }compile { // 1. Unauthenticated USM EngineID discovery probe -> Agent replies with Report PDU zabbix_srv -> core_rtr snmp3 get user "" reqid 100 wait 1ms zabbix_srv <- core_rtr snmp3 report user "" engineid "80001f8880aabbccdd" engineboots 5 enginetime 8420 reqid 100 varbind 1.3.6.1.6.3.15.1.1.4.0 counter32 1 wait 3ms // 2. Encrypted authPriv (HMAC-SHA-256 + AES-128-CFB) GET & RESPONSE on UDP 161 zabbix_srv -> core_rtr snmp3 get user "nms-v3-prod" engineid "80001f8880aabbccdd" engineboots 5 enginetime 8420 auth sha256 "StrongAuthKey2026!" priv aes "StrongPrivKey2026!" reqid 101 oid 1.3.6.1.2.1.1.5.0 wait 2ms zabbix_srv <- core_rtr snmp3 response user "nms-v3-prod" engineid "80001f8880aabbccdd" engineboots 5 enginetime 8420 auth sha256 "StrongAuthKey2026!" priv aes "StrongPrivKey2026!" reqid 101 varbind 1.3.6.1.2.1.1.5.0 string "core-rtr-fra1.internal" wait 5ms // 3. Encrypted authPriv SNMPv3 Trap on UDP 162 (authoritative sender = core_rtr) core_rtr -> zabbix_srv snmp3 trap user "nms-v3-prod" engineid "80001f8880aabbccdd" engineboots 5 enginetime 8425 auth sha256 "StrongAuthKey2026!" priv aes "StrongPrivKey2026!" sysuptime 842500 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.4 varbind 1.3.6.1.2.1.2.2.1.2.1 string "HundredGigE0/0/0/1"}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show snmp3_usm_discovery_and_authpriv.frasm
# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly snmp3_usm_discovery_and_authpriv.frasm snmp3_usm_discovery_and_authpriv.pcap
frameassembly snmp3_usm_discovery_and_authpriv.frasm snmp3_usm_discovery_and_authpriv.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse snmp3_usm_discovery_and_authpriv.pcap snmp3_usm_discovery_and_authpriv_edited.frasmAll snmp3 Keywords & Header Options
Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after snmp3:
src_host -> dst_host snmp3 [trap | inform | report | get | getnext | getbulk | set | response] [user "<text>"] [engineid "<even_hex>"] [engineboots <number>] [enginetime <number>] [contextname "<text>"] [auth <md5|sha|sha256|sha384|sha512> "<password>"] [priv <des|aes> "<password>"] [reqid <number>] [nonrepeaters <number>] [maxrepetitions <number>] [sysuptime <number>] [oid <oid>] [varbind <oid> <type_val> ...]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| trap | inform | report | get | getnext | getbulk | set | response | SNMPv3 ScopedPDU type keyword | trap (UDP 162) | Selects the inner BER PDU tag inside the plaintext or encrypted ScopedPDU. |
| user "<text>" | Double-quoted USM securityName | "initial" | Sets msgUserName in the USM security parameters header. |
| engineid "<even_hex>" | Even-length ASCII hex string (e.g. "80001f880431") | "80001f888000000001" | Sets msgAuthoritativeEngineID and contextEngineID and localizes Ku -> Kul USM keys. |
| engineboots <number> | enginetime <number> | Whole number | engineboots 1, enginetime 100 | Sets msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime (also used in the AES-128-CFB IV). |
| contextname "<text>" | Quoted text | "" (default context) | Sets contextName inside the ScopedPDU (e.g. "vlan-10" per-VLAN bridge MIB contexts). |
| auth <md5|sha|sha256|sha384|sha512> "<password>" | HMAC algorithm + passphrase string | Omitted (noAuthNoPriv) | Enables USM authentication (authNoPriv or authPriv) and writes the live RFC 3414 / RFC 7860 HMAC digest. |
| priv <des|aes> "<password>" | des (CBC-DES) or aes (AES-128-CFB) + passphrase | Omitted | Encrypts the ScopedPDU (authPriv, requires auth) and populates the 8-byte msgPrivacyParameters salt/IV. |
| varbind <oid> <type_val> | Repeatable SMIv2 OID + typed value | Omitted | Appends VarBind entries (string, int, oidval, ipval, counter32, gauge32, timeticks, counter64, null) prior to encryption. |
Cross-Layer Wrappers Valid with snmp3
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
10 options
Cross-Layer Wrappers Valid with snmp3
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
| Option | Range / Format | Default | Effect on Packet |
|---|---|---|---|
| wait <number><ns|us|ms|s|m> | Time gap (ns, us, ms, s, m) | 10ms | Advances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back). |
| payload "<text>" | hexpayload "<hex>" | Quoted text or hex bytes (choose one) | Omitted | Appends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums. |
| srcmac <mac> | dstmac <mac> | Colon, hyphen, or Cisco dot MAC | Host MAC / RFC multicast MAC | Overrides the 14-byte Ethernet II source or destination MAC address for this single packet. |
| vlan <0..4095> [pcp <0..7>] [dei <0|1>] | VLAN ID 0..4095, PCP 0..7, DEI 0..1 | Untagged | Wraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority. |
| qinq <0..4095> [innervlan <0..4095>] | Outer S-VLAN 0..4095, Inner C-VLAN 0..4095 | Untagged (innervlan 1 when qinq is set) | Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100). |
| mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>] | Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255 | Unlabeled (at most 1 mpls tag per packet) | Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header. |
| ttl <0..255> [dscp <0..63>] [ecn <0..3>] | TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3 | ttl 64, dscp 0, ecn 0 | Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings. |
| ipid <0..65535> [df] [mf] [fragoffset <0..8191>] | IPv4 ID, DF/MF flags, fragment offset 0..8191 | ipid 1, flags 0, fragoffset 0 | Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6). |
| flowlabel <0..1048575> | 20-bit IPv6 Flow Label (0..1048575) | 0 | Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts). |
| srcport <0..65535> | dstport <0..65535> | Port number 0..65535 | srcport 49152 (remembered), UDP 162 (trap/inform/report) / UDP 161 (get/getbulk) | Overrides source or destination port and remembers the port pair automatically on <- replies. |
Gotchas & Quick Fixes
engineid Must Be Non-Empty Even-Length Hex Octets
poller -> router snmp3 get user "ops" engineid "router-01"poller -> router snmp3 get user "ops" engineid "80001f8804726f75746572"engineid must contain a non-empty even number of hexadecimal characters (0-9a-fA-F, with optional colons or spaces). Omit engineid on initial discovery probes rather than passing engineid "".
SHA-1 Is Spelled sha (Not sha1)
poller -> router snmp3 get user "ops" auth sha1 "SecretPass123!"poller -> router snmp3 get user "ops" auth sha "SecretPass123!"Accepted USM HMAC keywords are md5, sha (RFC 3414 HMAC-SHA-1-96), sha256, sha384, and sha512 (RFC 7860).