Skip to content

161 - Pentesting snmp

nmap

sudo nmap -sU --open -p 161 $(target)
snmpcheck
snmpcheck.rb 10.10.138.10 -c COMMUNITY_STRING
snmpwalk
snmpwalk -c public -v2c $IP
snmpbulkwalk
snmpbulkwalk -c public -v2c $IP . > snmpbulkwalk.out
extract data
cat snmpbulkwalk.out| grep -oP '::.*?\.' | sort | uniq -c | sort -n

Install

snmpwalk

sudo apt install snmp-mibs-downloader
sudo vim /etc/snmp/snmp.conf
# <- commanet mibs
snmpcheck
git clone https://gitlab.com/kalilinux/packages/snmpcheck.git
cd snmpcheck/
gem install snmp
chmod +x snmpcheck-1.9.rb