Script snmp-interfaces

Script types: prerule, portrule
Categories: default, discovery, safe

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 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

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


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

max-newtargets, newtargets

See the documentation for the target library.


See the documentation for the creds library.


See the documentation for the snmp library.

Example Usage

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

Script Output

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



  • Thomas Buchanan
  • Kris Katterjohn

License: Same as Nmap--See