SNMP (Simple Network Management Protocol) lets administrators monitor and manage network devices. For pentesters, it’s a goldmine — misconfigured SNMP leaks system details, installed software, network configuration, and sometimes allows remote changes.
How SNMP Works
- SNMP agents run on network devices (routers, switches, servers)
- A manager sends queries to agents, agents respond with requested data
- Agents can also push automated traps to the manager
- Data is organized in a tree called the MIB (Management Information Base)
- Each data point has a numeric address called an OID (Object Identifier)
Example OID: .1.3.6.1.2.1.1.1.0 = system description.
Security Model
In SNMPv1 and SNMPv2c, “security” is a community string — basically a password sent in plaintext.
Two common string types:
- public / rocommunity — read-only, often set to
publicby default - private / rwcommunity — read-write, can change device config remotely (dangerous)
SNMPv3 fixed this with username/password + encryption, but tons of devices still run v1/v2c.
Default Community Strings to Try
The classics — try these first:
public # most common read-only
private # common read-write
cisco # Cisco devices
cable-docsis
default
admin
secret
community
ILMI
Full wordlist:
/usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt
/usr/share/seclists/Discovery/SNMP/snmp-onesixtyone.txt
Brute-Forcing Community Strings
onesixtyone (fast)
onesixtyone -c /usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt targetReturns which strings worked. Blazing fast because it doesn’t wait for responses.
Against multiple hosts
onesixtyone -c strings.txt -i hosts.txt -o results.txtEnumeration with snmpwalk
Once you have a valid community string, dump everything:
# all data
snmpwalk -v2c -c public target
# specific OID subtree
snmpwalk -v2c -c public target 1.3.6.1.2.1.1 # system info only
# find running processes (Linux)
snmpwalk -v2c -c public target 1.3.6.1.2.1.25.4.2.1.2
# find installed software (Linux)
snmpwalk -v2c -c public target 1.3.6.1.2.1.25.6.3.1.2
# find network interfaces
snmpwalk -v2c -c public target 1.3.6.1.2.1.2.2.1.2
# find ARP table
snmpwalk -v2c -c public target 1.3.6.1.2.1.4.22.1.3
# find users (Windows)
snmpwalk -v2c -c public target 1.3.6.1.4.1.77.1.2.25Fast Enumeration with braa
snmpwalk queries one OID at a time. braa does them in parallel — much faster for mass scanning:
braa public@target:.1.3.6.*Syntax: user@host:path.*. The * wildcard grabs everything under that subtree.
Trade-off: braa output is raw OID numbers, not human-readable names. Use snmpwalk for deep inspection, braa for speed.
Useful OIDs by Category
| OID | What |
|---|---|
1.3.6.1.2.1.1.1.0 | System description (OS, version) |
1.3.6.1.2.1.1.5.0 | Hostname |
1.3.6.1.2.1.1.3.0 | System uptime |
1.3.6.1.2.1.25.1.5.0 | Number of users (Windows) |
1.3.6.1.2.1.25.2.3.1.3 | Storage devices |
1.3.6.1.2.1.25.4.2.1.2 | Running processes |
1.3.6.1.2.1.25.6.3.1.2 | Installed software |
1.3.6.1.2.1.4.20.1.1 | Local IP addresses |
1.3.6.1.2.1.6.13.1.3 | TCP local ports |
1.3.6.1.2.1.7.5.1.2 | UDP local ports |
1.3.6.1.4.1.77.1.2.25 | Windows users |
1.3.6.1.4.1.77.1.4.1 | Domain name (Windows) |
Modifying Config via SNMP (Read-Write)
If you find a read-write string (private, etc.), you can push changes:
snmpset -v2c -c private target 1.3.6.1.2.1.1.5.0 s "hacked.target"Beyond annoying hostname changes, rwcommunity can push new routing tables, download firmware, upload configuration files — essentially full control on routers/switches.
Finding SNMP Services
# nmap UDP scan on SNMP port
nmap -sU -p 161 target
# with scripts
nmap -sU -p 161 --script snmp-* targetSNMP is UDP-only, so TCP scans miss it entirely. Make sure to scan UDP explicitly.
Methodology
- UDP nmap scan on port 161 to find SNMP services
- Brute-force community strings with
onesixtyoneagainst discovered hosts - Dump everything with
snmpwalk -v2c -c <string> targeton successful hits - Mine output for:
- OS version → research vulnerabilities
- Installed software → research vulnerabilities
- Usernames → feed into brute-force elsewhere
- Network topology → identify internal hosts
- If
rwcommunityfound: document impact (could modify device config)
