Nmap rpcap-info NSE Script


This page contains detailed information about how to use the rpcap-info 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/rpcap-info.nse
Script categories: discovery, safe
Target service / protocol: rpcap, tcp
Target network port(s): 2002
List of CVEs: -

Script Description


The rpcap-info.nse script connects to the rpcap service (provides remote sniffing capabilities through WinPcap) and retrieves interface information. The service can either be setup to require authentication or not and also supports IP restrictions.

Rpcap-info NSE Script Arguments


This is a full list of arguments supported by the rpcap-info.nse script:

creds.rpcap

Username:password to use for authentication

creds.global

Credentials to be returned by Credentials.getCredentials regardless of the service.

creds.[service]

Credentials to be returned by Credentials.getCredentials for [service]. E.g. creds.http=admin:password

- - -
To use these script arguments, add them to the Nmap command line using the --script-args arg1=value,[arg2=value,..] syntax. For example:

nmap --script=rpcap-info --script-args creds.rpcap=value,creds.global=value <target>

Rpcap-info NSE Script Example Usage


Here's an example of how to use the rpcap-info.nse script:

nmap -p 2002 <ip> --script rpcap-info

nmap -p 2002 <ip> --script rpcap-info --script-args="creds.rpcap='administrator:foobar'"

Rpcap-info NSE Script Example Output


Here's a sample output from the rpcap-info.nse script:

PORT     STATE SERVICE REASON
2002/tcp open  rpcap   syn-ack
| rpcap-info:
|   \Device\NPF_{0D5D1364-1F1F-4892-8AC3-B838258F9BB8}
|     Intel(R) PRO/1000 MT Desktop Adapter
|     Addresses
|         fe80:0:0:0:aabb:ccdd:eeff:0011
|         192.168.1.127/24
|   \Device\NPF_{D5EAD105-B0BA-4D38-ACB4-6E95512BC228}
|     Hamachi Virtual Network Interface Driver
|     Addresses
|_        fe80:0:0:0:aabb:ccdd:eeff:0022

Rpcap-info 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 rpcap-info.nse script:

Visit Nmap NSE Library for more scripts.

The rpcap-info.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:

46:	local function getInfo(host, port, username, password)
47:	
48:	  local helper = rpcap.Helper:new(host, port)
49:	  local status, resp = helper:connect()
50:	  if ( not(status) ) then
51:	    return false, "Failed to connect to server"
52:	  end
53:	  status, resp = helper:login(username, password)
54:	
55:	  if ( not(status) ) then
56:	    return false, resp

Version


This page has been created based on Nmap version 7.92.

Go back to menu.