Nmap nbns-interfaces NSE Script


This page contains detailed information about how to use the nbns-interfaces NSE script. For list of all NSE scripts, visit the Nmap NSE Library.

Select:
Overview
Error Messages

Script Overview


Script source code: https://github.com/nmap/nmap/tree/master/scripts/nbns-interfaces.nse
Script categories: default, discovery, safe
Target service / protocol: netbios-ns, udp
Target network port(s): 137
List of CVEs: -

Script Description


The nbns-interfaces.nse script retrieves IP addresses of the target's network interfaces via NetBIOS NS. Additional network interfaces may reveal more information about the target, including finding paths to hidden non-routed networks via multihomed systems.

Nbns-interfaces NSE Script Arguments


The nbns-interfaces.nse script does not have any arguments.

Nbns-interfaces NSE Script Example Usage


Here's an example of how to use the nbns-interfaces.nse script:

nmap -sU -p 137 --script nbns-interfaces <host>

Nbns-interfaces NSE Script Example Output


Here's a sample output from the nbns-interfaces.nse script:

PORT    STATE SERVICE
137/udp open  netbios-ns
| nbns-interfaces:
|   hostname: NOTEBOOK-NB3
|   interfaces:
|     10.5.4.89
|     192.168.56.1
|_    172.24.80.1
MAC Address: 9C:7B:EF:AA:BB:CC (Hewlett Packard)

Nbns-interfaces NSE Script Example XML Output


Here's a sample XML output from the nbns-interfaces.nse script produced by providing the -oX <file> Nmap option:

 <elem key="hostname">NOTEBOOK-NB3</elem>
 <table key="interfaces">
   <elem>10.5.4.89</elem>
   <elem>192.168.56.1</elem>
   <elem>172.24.80.1</elem>
 </table>

Author


  • Andrey Zhukov from USSC

References


See Also


Visit Nmap NSE Library for more scripts.

The nbns-interfaces.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.

Failed to get NetBIOS server name of the target


Here is a relevant code snippet related to the "Failed to get NetBIOS server name of the target" error message:

50:	
51:	action = function (host)
52:	  local output = stdnse.output_table()
53:	  local status, server_name = netbios.get_server_name(host)
54:	  if not (status and server_name) then
55:	    return stdnse.format_output(false, "Failed to get NetBIOS server name of the target")
56:	  end
57:	  local status, result = netbios.nbquery(host, server_name)
58:	  if not status then
59:	    return stdnse.format_output(false, "Failed to get remote network interfaces")
60:	  end

Failed to get remote network interfaces


Here is a relevant code snippet related to the "Failed to get remote network interfaces" error message:

54:	  if not (status and server_name) then
55:	    return stdnse.format_output(false, "Failed to get NetBIOS server name of the target")
56:	  end
57:	  local status, result = netbios.nbquery(host, server_name)
58:	  if not status then
59:	    return stdnse.format_output(false, "Failed to get remote network interfaces")
60:	  end
61:	  output.hostname = server_name
62:	  output.interfaces = {}
63:	  for _, v in ipairs(result) do
64:	    for i=1, #v.data, 6 do

Version


This page has been created based on Nmap version 7.92.

Go back to menu.