nmap -sL --script=targets-sniffer --script-args=newtargets,targets-sniffer.timeout=5s,targets-sniffer.iface=eth0 # args targets-sniffer.timeout The amount of time to listen for packets. Default <code>10s</code>. # args targets-sniffer.iface The interface to use for sniffing. # args newtargets If true, add discovered targets to the scan queue.
nmap --script=firewalk --traceroute --min-parallelism 3000 www.diaoan.xyz args firewalk.max-retries the maximum number of allowed retransmissions. args firewalk.recv-timeout the duration of the packets capture loop (in milliseconds). args firewalk.probe-timeout validity period of a probe (in milliseconds). args firewalk.max-active-probes maximum number of parallel active probes. args firewalk.max-probed-ports maximum number of ports to probe per protocol. Set to -1 to scan every filtered port.
# 用firewalk脚本探测主机防火墙规则 $ nmap --script=firewalk --traceroute --min-parallelism 3000 www.diaoan.xyz Warning: Your --min-parallelism option is pretty high! This can hurt reliability. Starting Nmap 7.92 ( https://nmap.org ) at 2022-02-10 21:38 CST Nmap scan report for www.diaoan.xyz (121.199.61.226) Host is up (0.046s latency). Not shown: 984 filtered tcp ports (no-response) PORT STATE SERVICE 80/tcp open http
TRACEROUTE (using port 993/tcp) HOP RTT ADDRESS 1 0.28 ms DIAOAN (172.26.80.1) 2 2.69 ms TianYi.Home (192.168.1.1) 3 ... 12 13 32.45 ms www.diaoan.xyz (121.199.61.226)
Nmap done: 1 IP address (1 host up) scanned in 53.73 seconds
# 使用广播Ping发现主机 $ nmap -e eth0 --script broadcast-ping 192.168.1.0/24 Starting Nmap 7.92 ( https://nmap.org ) at 2022-02-10 22:28 CST Nmap scan report for 192.168.1.1 Host is up (0.0054s latency). Not shown: 993 closed tcp ports (reset) PORT STATE SERVICE
Nmap scan report for HUAWEI_Mate_20_Pro-648056 (192.168.1.3) Host is up (0.0080s latency). Not shown: 999 closed tcp ports (reset) PORT STATE SERVICE
Nmap scan report for 192.168.1.5 Host is up (0.0048s latency). Not shown: 991 filtered tcp ports (no-response) PORT STATE SERVICE
Nmap scan report for 192.168.1.7 Host is up (0.00052s latency). Not shown: 993 closed tcp ports (reset) PORT STATE SERVICE
Nmap done: 256 IP addresses (4 hosts up) scanned in 12.88 seconds
$ nmap -sn --script ip-forwarding --script-args='target=www.diaoan.xyz' 192.168.1.1 Starting Nmap 7.92 ( https://nmap.org ) at 2022-02-10 22:58 China Standard Time Nmap scan report for 192.168.1.1 Host is up (0.0030s latency). MAC Address: 28:93:7D:1D:A7:90 (Sichuan Tianyi Comheart Telecom)
Host script results: | ip-forwarding: |_ The host has ip forwarding enabled, tried ping against (www.diaoan.xyz)
Nmap done: 1 IP address (1 host up) scanned in 14.24 seconds