Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats the difference between -sS and -PS in nmap?

I was learning how to use nmap and i have gone through many documentations and tutorials but no where iam getting perfect information about what is the use of -sS and -PS. In general what is the differences between all -s 's and -P 's? Both are for scanning right?

sudo nmap -sS 192.168.0.50
sudo nmap -PS 192.168.0.50

Whats the difference between both of them?

Thanks in advance.

like image 844
Revanth Kumar Avatar asked Feb 11 '23 13:02

Revanth Kumar


1 Answers

This is well described in documentation.

Before doing port scan, nmap will ping the host to check if it's online. -P options are used to select different ping methods. When -PS is selected, nmap will check if hosts are online by sending single SYN packet. -Pn will skip this phase and jump right to port scan.

-s* options select the method of detecting open ports (for hosts which were determined to be online). With -sS this will be done by sending single SYN packet to each port.

It makes sense to combine those options together: nmap -sS -PS 192.168.0.50 will cause nmap to use SYN packets both for ping and to discover open ports.

like image 190
Piotr Praszmo Avatar answered Feb 14 '23 02:02

Piotr Praszmo