20 command-line examples to enumerate SNMP (Simple Network Management Protocol) information when provided with an IP address and UDP port 161:


Basic Enumeration

  1. Check if SNMP is reachable
    snmpwalk -v2c -c public <IP> .1
    
  2. List all available OIDs using SNMPv2
    snmpbulkwalk -v2c -c public <IP>
    
  3. List all available OIDs using SNMPv1
    snmpwalk -v1 -c public <IP> .1
    
  4. Fetch the SNMP system information
    snmpwalk -v2c -c public <IP> system
    

Community Strings

  1. Test a specific community string (replace ‘community’)
    snmpwalk -v2c -c community <IP> .1
    
  2. Brute force SNMP community strings with a dictionary
    onesixtyone -c community_list.txt <IP>
    

Device and Host Information

  1. Retrieve device hostname
    snmpget -v2c -c public <IP> SNMPv2-MIB::sysName.0
    
  2. Fetch OS description and version
    snmpget -v2c -c public <IP> SNMPv2-MIB::sysDescr.0
    
  3. Get system uptime
    snmpget -v2c -c public <IP> SNMPv2-MIB::sysUpTime.0
    
  4. Find system contact details
    snmpget -v2c -c public <IP> SNMPv2-MIB::sysContact.0
    
  5. List SNMP interfaces
    snmpwalk -v2c -c public <IP> IF-MIB::ifDescr
    

Network Information

  1. Retrieve IP addresses of interfaces
    snmpwalk -v2c -c public <IP> IP-MIB::ipAdEntAddr
    
  2. Get MAC addresses of interfaces
    snmpwalk -v2c -c public <IP> IF-MIB::ifPhysAddress
    
  3. Find routing table entries
    snmpwalk -v2c -c public <IP> IP-FORWARD-MIB::ipCidrRouteTable
    

Performance and Monitoring

  1. Monitor interface traffic statistics
    snmpwalk -v2c -c public <IP> IF-MIB::ifInOctets
    
  2. Fetch CPU usage metrics
    snmpwalk -v2c -c public <IP> HOST-RESOURCES-MIB::hrProcessorLoad
    
  3. Fetch memory usage metrics
    snmpwalk -v2c -c public <IP> HOST-RESOURCES-MIB::hrMemorySize
    
  4. Get disk storage information
    snmpwalk -v2c -c public <IP> HOST-RESOURCES-MIB::hrStorageTable
    

SNMPv3 Specific Commands

  1. Enumerate OIDs using SNMPv3 (user: ‘admin’, auth: ‘MD5’, priv: ‘AES’)
    snmpwalk -v3 -u admin -A auth_pass -a MD5 -X priv_pass -x AES <IP> .1
    
  2. Get system details with SNMPv3
    snmpget -v3 -u admin -A auth_pass -a MD5 -X priv_pass -x AES <IP> SNMPv2-MIB::sysDescr.0
    

Notes

  • Replace <IP> with the target’s IP address.
  • Replace public with the correct community string if known.
  • For commands 19 and 20, adjust user credentials (admin, auth_pass, priv_pass) to match SNMPv3 configurations.
  • Use a tool like Wireshark or tcpdump to observe the SNMP responses for troubleshooting or deeper inspection.