pentesting, updated

snmpwalk

Walks an SNMP agent's MIB tree to dump system, network and process information.

What it’s for

Pull everything an SNMP agent exposes under a given OID subtree, once you have a working community string.

Install

apt install snmp

Common commands

snmpwalk -v2c -c public 10.10.10.5                              # walk the whole tree
snmpwalk -v2c -c public 10.10.10.5 1.3.6.1.2.1.1                 # system info (sysDescr, uptime)
snmpwalk -v2c -c public 10.10.10.5 1.3.6.1.2.1.25.4.2.1.2         # running processes
snmpwalk -v2c -c public 10.10.10.5 1.3.6.1.2.1.4.21.1.1           # IP routing table
snmpwalk -v1 -c private 10.10.10.5 1.3.6.1.4.1.9                  # Cisco-specific tree (if device is Cisco)

Useful flags

FlagEffect
-v1 / -v2c / -v3SNMP version (v3 needs auth/priv flags)
-c <string>Community string
-O nPrint numeric OIDs instead of resolved names

Notes

Try the private community string too, not just public — it often has write access on network gear, not just read.

Used in

§ home
~/knubertus/home/
1,1 Top