Script snmp-interfaces

Script types: prerule, portrule
Categories: default, discovery, safe
Download: https://svn.nmap.org/nmap/scripts/snmp-interfaces.nse

Script Summary

Attempts to enumerate network interfaces through SNMP.

This script can also be run during Nmap's pre-scanning phase and can attempt to add the SNMP server's interface addresses to the target list. The script argument snmp-interfaces.host is required to know what host to probe. To specify a port for the SNMP server other than 161, use snmp-interfaces.port. When run in this way, the script's output tells how many new targets were successfully added.

Script Arguments

snmp-interfaces.host

Specifies the SNMP server to probe when running in the "pre-scanning phase".

snmp-interfaces.port

The optional port number corresponding to the host script argument. Defaults to 161.

max-newtargets, newtargets

See the documentation for the target library.

creds.[service], creds.global

See the documentation for the creds library.

snmp.version

See the documentation for the snmp library.

Example Usage

nmap -sU -p 161 --script=snmp-interfaces <target>

Script Output

| snmp-interfaces:
|   eth0
|     IP address: 192.168.221.128
|     MAC address: 00:0c:29:01:e2:74 (VMware)
|     Type: ethernetCsmacd  Speed: 1 Gbps
|_    Traffic stats: 6.45 Mb sent, 15.01 Mb received

Requires


Authors:

  • Thomas Buchanan
  • Kris Katterjohn

License: Same as Nmap--See https://nmap.org/book/man-legal.html