NAT-PMP External Address Scanner - Metasploit
This page contains detailed information about how to use the auxiliary/gather/natpmp_external_address metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: NAT-PMP External Address Scanner
Module: auxiliary/gather/natpmp_external_address
Source code: modules/auxiliary/gather/natpmp_external_address.rb
Disclosure date: -
Last modification time: 2017-07-24 06:26:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 5351
List of CVEs: -
Scan NAT devices for their external address using NAT-PMP
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/gather/natpmp_external_address
msf auxiliary(natpmp_external_address) > show options
... show and set options ...
msf auxiliary(natpmp_external_address) > set RHOSTS ip-range
msf auxiliary(natpmp_external_address) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(natpmp_external_address) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(natpmp_external_address) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(natpmp_external_address) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Go back to menu.
Msfconsole Usage
Here is how the gather/natpmp_external_address auxiliary module looks in the msfconsole:
msf6 > use auxiliary/gather/natpmp_external_address
msf6 auxiliary(gather/natpmp_external_address) > show info
Name: NAT-PMP External Address Scanner
Module: auxiliary/gather/natpmp_external_address
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
Jon Hart <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
BATCHSIZE 256 yes The number of hosts to probe in each set
CHOST no The local client address
LIFETIME 3600000 yes Time in ms to keep this port forwarded (set to 0 to destroy a mapping)
PROTOCOL TCP yes Protocol to forward (Accepted: TCP, UDP)
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5351 yes The target port (UDP)
THREADS 10 yes The number of concurrent threads
Description:
Scan NAT devices for their external address using NAT-PMP
Module Options
This is a complete list of options available in the gather/natpmp_external_address auxiliary module:
msf6 auxiliary(gather/natpmp_external_address) > show options
Module options (auxiliary/gather/natpmp_external_address):
Name Current Setting Required Description
---- --------------- -------- -----------
BATCHSIZE 256 yes The number of hosts to probe in each set
CHOST no The local client address
LIFETIME 3600000 yes Time in ms to keep this port forwarded (set to 0 to destroy a mapping)
PROTOCOL TCP yes Protocol to forward (Accepted: TCP, UDP)
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5351 yes The target port (UDP)
THREADS 10 yes The number of concurrent threads
Advanced Options
Here is a complete list of advanced options supported by the gather/natpmp_external_address auxiliary module:
msf6 auxiliary(gather/natpmp_external_address) > show advanced
Module advanced options (auxiliary/gather/natpmp_external_address):
Name Current Setting Required Description
---- --------------- -------- -----------
CPORT no The local client port
ScannerMaxResends 10 yes The maximum times to resend a packet when out of buffers
ScannerRecvInterval 30 yes The maximum numbers of sends before entering the processing loop
ScannerRecvQueueLimit 100 yes The maximum queue size before breaking out of the processing loop
ScannerRecvWindow 15 yes The number of seconds to wait post-scan to catch leftover replies
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the gather/natpmp_external_address module can do:
msf6 auxiliary(gather/natpmp_external_address) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the gather/natpmp_external_address auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(gather/natpmp_external_address) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
<PEER> -- unexpected version/opcode/result/address: <VER>/<OP>/<RESULT>/<EXTERNAL_ADDRESS>
Here is a relevant code snippet related to the "<PEER> -- unexpected version/opcode/result/address: <VER>/<OP>/<RESULT>/<EXTERNAL_ADDRESS>" error message:
40: :host => external_address,
41: :state => Msf::HostState::Alive
42: )
43: end
44: else
45: print_error("#{peer} -- unexpected version/opcode/result/address: #{ver}/#{op}/#{result}/#{external_address}")
46: end
47:
48: # report the host we scanned as alive
49: report_host(
50: :host => shost,
Go back to menu.
Related Pull Requests
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #3687 Merged Pull Request: Fix a few minor bugs, add unit tests and clean up NAT-PMP modules
- #3032 Merged Pull Request: Fix typo
- #2525 Merged Pull Request: Change module boilerplate
Go back to menu.
See Also
Check also the following modules related to this module:
- auxiliary/server/dns/native_server
- exploit/linux/misc/mongod_native_helper
- auxiliary/admin/natpmp/natpmp_map
- auxiliary/scanner/natpmp/natpmp_portscan
- auxiliary/gather/external_ip
Authors
Jon Hart <jhart[at]spoofed.org>
Version
This page has been produced using Metasploit Framework version 6.1.27-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.