Ping with Nmap

Local Network
 
ARP Ping

sudo nmap -PR -sn 192.168.1.0/24 -oN nmap_normal_output

-PR arp request

-sn no port scanning

-oN normal output to file

 

Remote Network
 
ICMP Echo Request Ping (classic ping)

sudo nmap -PE -sn 192.168.1.0/24 -oN nmap_normal_output

-PE ICMP echo request

 
TCP SYN Ping

We will receive a RST packet from a closed port and a SYN/ACK packet from an open port.

sudo nmap -PS -sn 192.168.1.0/24 -oN nmap_normal_output

-PS sends empty TCP packet with SYN flag to port 80

sudo nmap -PS443 -sn 192.168.1.0/24 -oN nmap_normal_output

-PS443 sends empty TCP packet with SYN flag to port 443

sudo nmap -PS80,443 -sn 192.168.1.0/24 -oN nmap_normal_output

-PS80,443 sends empty TCP packet with SYN flag to port 80,443

 
TCP ACK Ping

We will receive a RST packet from a live host.

sudo nmap -PA -sn 192.168.1.0/24 -oN nmap_normal_output

-PA sends empty TCP packet with ACK flag to port 80

sudo nmap -PA443 -sn 192.168.1.0/24 -oN nmap_normal_output

-PA443 sends empty TCP packet with ACK flag to port 443

sudo nmap -PA80,443 -sn 192.168.1.0/24 -oN nmap_normal_output

-PA80,443 sends empty TCP packet with ACK flag to port 80,443

 
UDP Ping

We will receive a ICMP port unreachable indicating that the host is alive!

sudo nmap -PU -sn 192.168.1.0/24 -oN nmap_normal_output

-PU sends empty UDP packet to port 40125

sudo nmap -PU40200 -sn 192.168.1.0/24 -oN nmap_normal_output

-PU40200 sends empty UDP packet to port 40200

sudo nmap -PU40201,40202 -sn 192.168.1.0/24 -oN nmap_normal_output

-PU40201,40202 sends empty UDP packet to port 40201,40202

Categories: NMAP, Port Scanning Tags: ,
%d bloggers like this: