Background
- SNMP runs on port 161 by default.
- SNMP protocol versions 1, 2, and 2c have no traffic encryption. Only version 3 has proper encryption and authentication.
- Traditional SNMP protocols have weak authentication schemes. Some servers are left with default public and private community strings.
Device Discovery
With nmap
See Options
sudo nmap -sU --open -p 161 $NETWORK -oA nmap/snmpWith onesixtyone
-ctakes a file with Community Strings-itakes a file with target IP addresses
# using default community string values
echo -e "public\nprivate\nmanager" > community
for ip in {1..254}; do echo 10.11.1.$ip; done > ips
onesixtyone -c community -i ipsMIB Enumeration
See MIB for a table of useful MIB values.
snmpwalk
-cto specify community string-vto specify SNMP protocol version-tto specify timeout period (e.g.,10)- If
mib-valueis not given, the whole MIB tree is dumped.- Example:
1.3.6.1.2.1.25.4.2.1.2for running Windows processes
- Example:
snmpwalk -c <comstr> -v <snmp-ver> -t <timeout> <ip> [<mib-value>]snmp-check
-cto specify community string (default: public)-vto specify SNMP protocol version-tto specify timeout period (e.g.,10)