nat-pmp-mapport
脚本使用类型:
portrule
脚本所属分类:
discovery, safe
脚本下载地址: http://nmap.org/svn/scripts/nat-pmp-mapport.nse
Maps a WAN port on the router to a local port on the client using the NAT Port Mapping Protocol (NAT-PMP). It supports the following operations: o map - maps a new external port on the router to an internal port of the requesting IP o unmap - unmaps a previously mapped port for the requesting IP o unmapall - unmaps all previously mapped ports for the requesting IP
operation, can be either map, unmap or unmap all o map allows you to map an external port to an internal port of the calling IP o unmap removes the external port mapping for the specified ports and protocol o unmapall removes all mappings for the specified protocol and calling IP
the protocol to map, can be either tcp or udp.
the internal port of the calling IP to map requests to. This port will recieve all requests coming in to the external port on the router.
the external port to map on the router. The specified port is treated as the requested port. If the port is available it will be allocated to the caller, otherwise the router will simply choose another port, create the mapping and return the resulting port.
the lifetime of the mapping in seconds (default: 3600)
执行格式
nmap -sU -p 5351 <ip> --script nat-pmp-mapport --script-args='op=map,pubport=8080,privport=8080,protocol=tcp' nmap -sU -p 5351 <ip> --script nat-pmp-mapport --script-args='op=unmap,pubport=8080,privport=8080,protocol=tcp' nmap -sU -p 5351 <ip> --script nat-pmp-mapport --script-args='op=unmapall,protocol=tcp'
PORT STATE SERVICE 5351/udp open nat-pmp | nat-pmp-mapport: |_ Successfully mapped tcp 1.2.3.4:8080 -> 192.168.0.100:80
Author: Patrik Karlsson
License: VER007 整理 http://www.ver007.com