Nmap sip-methods NSE Script
This page contains detailed information about how to use the sip-methods NSE script. For list of all NSE scripts, visit the Nmap NSE Library.
Select: |
---|
Script Overview
Script source code: https://github.com/nmap/nmap/tree/master/scripts/sip-methods.nse
Script categories: default, safe, discovery
Target service / protocol: sip, tcp, udp
Target network port(s): 5060
List of CVEs: -
Script Description
The sip-methods.nse script enumerates a SIP Server's allowed methods (INVITE, OPTIONS, SUBSCRIBE, etc.)
The script works by sending an OPTION request to the server and checking for the value of the Allow header in the response.
Sip-methods NSE Script Arguments
This is a full list of arguments supported by the sip-methods.nse script:
sip.timeoutSpecifies the session (socket) timeout in seconds
- - -
To use this script argument, add it to Nmap command line like in this example:
nmap --script=sip-methods --script-args sip.timeout=value <target>
Sip-methods NSE Script Example Usage
Here's an example of how to use the sip-methods.nse script:
nmap --script=sip-methods -sU -p 5060 <targets>
Sip-methods NSE Script Example Output
Here's a sample output from the sip-methods.nse script:
5060/udp open sip
| sip-methods:
|_ INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Sip-methods NSE Script Example XML Output
Here's a sample XML output from the sip-methods.nse script produced by providing the -oX <file>
Nmap option:
<elem>INVITE</elem>
<elem>ACK</elem>
<elem>CANCEL</elem>
<elem>OPTIONS</elem>
<elem>BYE</elem>
<elem>REFER</elem>
<elem>SUBSCRIBE</elem>
<elem>NOTIFY</elem>
<elem>INFO</elem>
Author
- Hani Benhabiles
References
- https://nmap.org/nsedoc/scripts/sip-methods.html
- https://github.com/nmap/nmap/tree/master/scripts/sip-methods.nse
See Also
Related NSE scripts to the sip-methods.nse script:
Visit Nmap NSE Library for more scripts.
The sip-methods.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 the SIP server.
Here is a relevant code snippet related to the "Failed to connect to the SIP server." error message:
44: action = function(host, port)
45: local status, session, response
46: session = sip.Session:new(host, port)
47: status = session:connect()
48: if not status then
49: return stdnse.format_output(false, "Failed to connect to the SIP server.")
50: end
51:
52: status, response = session:options()
53: if status then
54: -- If port state not set to open, set it to open.
Version
This page has been created based on Nmap version 7.92.
Go back to menu.