# CLI-Anything Bundle #61 — SNMP Daemon Trust Recon Pack
CLI-Anything Bundle #61 — SNMP Daemon Trust Recon Pack
CLI-Anything Bundle #61 — SNMP Daemon Trust Recon Pack
Four agent-native read-only harnesses that census the SNMP daemon trust surface: the config layers where an SNMP agent, a trap receiver, and its credential store decide who on the network can enumerate this host — snmpd's daemon config, the client defaults file, the trap daemon's auth/handler rules, and the community + USM/VACM credential layer itself. No other bundle owns this surface — #56 keeps CPU mitigation posture, #59 keeps identity & directory trust, #60 keeps the web-server config layer (census: 0 exact / 0 name-class substring token collisions across the whole shipping catalog, 135 Gumroad products pulled fresh). SNMP's own configs are unclaimed census territory.
- snmpdpeek — /etc/snmp/snmpd.conf + snmpd.conf.d/*.conf census. com2sec chains with community values masked len-only; rocommunity without a source token = UNRESTRICTED_SOURCE finding; rwcommunity/rwuser/rwcommunity6 = RW_COMMUNITY finding; VACM group/access/view chain — access rows referencing a missing group = GROUP_UNBOUND, an undefined view = VIEW_UNBOUND; trapsink/trap2sink/informsink TRAP_SINK rows (dest as written, never resolved); agentXSocket row + socket-dir stat law; syslocation/syscontact INFO_DISCLOSURE rows; '\' EOL line-continuation; unknown directives capped; honest absence rc6.
- snmptrapdpeek — /etc/snmp/snmptrapd.conf + snmptrapd.conf.d/*.conf census. authCommunity rows with types log/execute/net carried — execute = AUTH_EXECUTE finding; readable config with NO authCommunity = AUTH_ABSENT finding; traphandle rows with the first-token-if-exists stat law — a world-executable handler target = TRAPHANDLE_WORLD_EXECUTABLE (command args beyond the target never printed); doNotLogTraps 1 = TRAP_LOG_OFF; snmpTrapdAddr row; createUser rows with passphrases masked len-only and MD5/DES flagged WEAK_AUTH_PROTO / WEAK_PRIV_PROTO; file-perm stat law.
- snmpconfpeek — /etc/snmp/snmp.conf client defaults + full /etc/snmp tree census (depth 1, subdirs counted not traversed). defCommunity row with value masked len-only; defVersion v1/v2c = INSECURE_DEFAULT_VERSION finding; defAuthType MD5 = WEAK_AUTH_PROTO, defPrivType DES = WEAK_PRIV_PROTO; MIBS "ALL" row, mibdirs row, duplicate-directive rows; per-file stat rows across the tree — world-writable = FILE_WORLD_WRITABLE finding, group-writable + not-root-owner rows, /etc/snmp itself world-writable = SNMP_DIR_WORLD_WRITABLE; honest absence rc6.
- snmpcommpeek — the credential-layer census across snmpd.conf + snmptrapd.conf (and their .d includes). Same community value declared twice = COMMUNITY_DUP finding (masked compare, both file:lines); 'public'/'private' values = DEFAULT_COMMUNITY finding; any rw* = RW_COMMUNITY; ro without source = UNRESTRICTED_SOURCE; USM createUser census — username + protos carried, passphrases masked len-only, MD5/DES flagged, missing priv/auth proto = NOPRIV_USER / NOAUTH_USER findings; duplicate createUser username = USER_DUP; GROUP_UNBOUND + VIEW_UNBOUND cross-file; engineID presence-only row.
The contract
Every tool: rc0 clean / rc4 findings / rc6 honest nothing-readable / rc2 usage; --json emits the full report; --conf points the census at one config file, --dir replaces the root list — any tree or fixture. Pure Python stdlib — zero subprocesses, zero writes, zero sockets, zero network; SNMP configs are parsed, paths statted once, and community strings, USM passphrases and engine IDs are masked by name with length only. The census never "fixes" an exposed posture — it names it.
Self-test battery inside
734 fixture-based executed assertions (checks.py + runner_count.py per bundle norm) — verified as: three consecutive green fires from the shipping tree (734/0 each) plus a green post-repair re-fire, and two clean-room fires from THIS exact shipping zip (734/0 both). The battery pins rc laws, every finding code, the stat-only secret law (planted community strings, passphrases, engine IDs must never appear in any output), grammar edges, caps, stat hygiene, and write-nothing fingerprints.
Who this is for
Network admins who inherited an SNMP estate nobody fully trusts; hardening teams proving an agent answers only whom it claims to, with no rogue rw-community and no trap handler that runs first-token commands; agent builders who want their AI to census SNMP trust posture without ever mutating it.
MIT licensed · Python 3.8+ · 40 files · stdlib-only