nmap
Live host discovery techniques with network-mapper (nmap).
No port scan (host discovery only)
-sn
flag; different from -sN
Nmap, by default, uses a ping scan to find live hosts, then proceeds to scan live hosts only.
This option tells Nmap not to do a port scan after host discovery, and only print out the available hosts that responded to the scan. This is often known as a ping scan
ICMP ping types
-PE
ICMP type 8 (Echo request). A reply of type 0 (Echo reply) indicates availability. This option is commonly blocked by firewalls. The next few optios can be used instead, and may give results against some networks that may have forgotten about it.
Note that this option is the default implemented by nmap. However, yhe
-PE
flag explicitly forces nmap to send ICMP Echo Requests to discover live hosts, essentially overriding or specifying this method for the scan.
-PP
ICMP type 13 (Timestamp request). A reply of type 14 (Timestamp reply ) indicates availability.
-PM
ICMP type 17 (Address mask query). A reply of type 18 (Address mask reply) indicates availability.
Other types of ping scans
Note: When the term ping scan is mentioned in the context of nmap
, it doesn't refer to the traditional ICMP Echo request packet (ping), but is rather a broader term for the packet sent to "ping" a host and discover if its alive, such as: TCP, UDP, SCTP and even ICMP packets itself.
Port list
: Refers to the range of ports to send the ping scan.
Examples are
-PS22
and-PS22-25,80,113,1050,35000
. Note that there can be no space between-PS
and the port list. If multiple probes are specified they will be sent in paralle
TCP
a) TCP SYN
-PS
port list
b) TCP ACK
-PA
port list
Default ports for TCP SYN and ACK ping scan is port 80
UDP
a) -PU
port list
Default ports for UDP ping scan is port 40125
If an open port is reached, most services simply ignore the empty packet and fail to return any response. This is why the default probe port is 40125, which is highly unlikely to be in use.
SCTP INIT
a) -PY
port list
The default port for SCTP INIT ping scan is port 80
Last updated