-2

When I execute nmap -sn 192.168.1.0/24, it takes 12 seconds to find 256 hosts but when I execute nmap -sS 192.168.1.0/24, it takes forever. Why is this happening?

I cannot see what I did wrong. Maybe I wrote my address wrong or something. I am using Kali Linux and the nmap that came installed. It is a virtual machine on a laptop and the connection is wireless.

I was thinking that it could be because of the connection. Should I try making a hotspot with my phone and connecting some stuff to it and then trying?

Doug Deden
  • 1,796
  • 6
  • 10

1 Answers1

2

The -sn option pings each target host, but does not do any additional port scanning. Twelve seconds for 256 hosts seems about right.

The -sS option sends a Syn packet to each of 65,535 ports on each target host, and then checks for a response. Even though it can do this pretty quickly, it's still doing thousands to tens of thousands of times more activity than the ping-only scan that -sn does.

From Nmap's options summary:

...

-sn: Ping Scan - disable port scan

...

-sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans

Doug Deden
  • 1,796
  • 6
  • 10
  • i found someting.https://serverfault.com/questions/216938/nmap-reports-host-up-when-it-isnt here you can see tat he has the same problem that all the hosts come up. A guy in the comment said it is a firewall problem and i think he is right becuase i use a VM but he doesnt give any answer – Andrei Marin May 15 '19 at 19:36