Nmap stun-version NSE Script


This page contains detailed information about how to use the stun-version 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/stun-version.nse
Script categories: version
Target service / protocol: stun, udp
Target network port(s): 3478
List of CVEs: -

Script Description


The stun-version.nse script sends a binding request to the server and attempts to extract version information from the response, if the server attribute is present.

Stun-version NSE Script Arguments


The stun-version.nse script does not have any arguments.

Stun-version NSE Script Example Usage


Here's an example of how to use the stun-version.nse script:

nmap -sU -sV -p 3478 <target>

Stun-version NSE Script Example Output


Here's a sample output from the stun-version.nse script:

PORT     STATE SERVICE VERSION
3478/udp open  stun    Vovida.org 0.96

Stun-version NSE Script Example XML Output


There is no sample XML output for this module. However, by providing the -oX <file> option, Nmap will produce a XML output and save it in the file.xml file.

Author


  • Patrik Karlsson

References


See Also


Related NSE scripts to the stun-version.nse script:

Visit Nmap NSE Library for more scripts.

The stun-version.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 connect to server


Here is a relevant code snippet related to the "Failed to connect to server" error message:

27:	
28:	action = function(host, port)
29:	  local helper = stun.Helper:new(host, port)
30:	  local status = helper:connect()
31:	  if ( not(status) ) then
32:	    return fail("Failed to connect to server")
33:	  end
34:	
35:	  local status, result = helper:getVersion()
36:	  if ( not(status) ) then
37:	    return fail("Failed to retrieve external IP")

Failed to retrieve external IP


Here is a relevant code snippet related to the "Failed to retrieve external IP" error message:

32:	    return fail("Failed to connect to server")
33:	  end
34:	
35:	  local status, result = helper:getVersion()
36:	  if ( not(status) ) then
37:	    return fail("Failed to retrieve external IP")
38:	  end
39:	
40:	  port.version.name = "stun"
41:	  port.version.product = result
42:	  nmap.set_port_state(host, port, "open")

Version


This page has been created based on Nmap version 7.92.

Go back to menu.