SNMPWALK against multiple IP address

bash oscp snmp snmpwalk

For a recent test, I needed to perform multiple snmpwalk scans against a set of IP addresses. Instead of running each scan separately, I was able to write a bash script. Enjoy:

for ip in $(cat snmpWindowsIPs.txt); do echo "----------------------------------------------------"; echo " [+] Testing " $ip; echo "----------------------------------------------------"; echo " " echo "----------------------------------------------------"; echo " [-] Enumerating Windows Users "; echo "----------------------------------------------------"; snmpwalk -c public -v1 $ip 1.3.6.1.4.1.77.1.2.25 echo " " echo "----------------------------------------------------"; echo " [-] Enumerating Running Windows Processes: "; echo "----------------------------------------------------"; snmpwalk -c public -v1 $ip 1.3.6.1.2.1.25.4.2.1.2 echo " " echo "----------------------------------------------------"; echo " [-] Enumerating Open TCP Ports: "; echo "----------------------------------------------------"; snmpwalk -c public -v1 $ip 1.3.6.1.2.1.6.13.1.3 echo " " echo "----------------------------------------------------"; echo " [-] Enumerating Installed Software: "; echo "----------------------------------------------------"; snmpwalk -c public -v1 $ip 1.3.6.1.2.1.25.6.3.1.2 echo " " echo "----------------------------------------------------"; echo " [-] Enumerating Storage Units: "; echo "----------------------------------------------------"; snmpwalk -c public -v1 $ip 1.3.6.1.2.1.25.2.3.1.4; done > snmpWalkWindowsResults.txt

The author would love to hear your comments. Let us discuss at Twitter @qasimchadhar.