-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Hi !
I'm having trouble with nmap complaining about ping probes getting dropped even though I can see the probe responses. This has the effect of slowing down the scan speed.
After a little investigation, I think there might be a bug in the way nmap handles ping timeouts.
Here is an example :
# nmap -sS -PS53 -p 10000- 8.8.8.8 -dddd --packet-trace --min-rtt-timeout 100ms 2>/dev/null | egrep -w '8.8.8.8:53|Ultrascan'
SENT (0.1231s) TCP [92.169.168.155:34785 > 8.8.8.8:53 S seq=1397322944 ack=0 <snip>
RCVD (0.1247s) TCP [8.8.8.8:53 > 92.169.168.155:34785 SA seq=1196998761 ack=1397322945 <snip>
Ultrascan PING SENT to 8.8.8.8 [tcp to port 53; flags: S]
SENT (1.5927s) TCP [92.169.168.155:35052 > 8.8.8.8:53 S seq=3549618320 ack=0 <snip>
Ultrascan DROPPED PING probe packet to 8.8.8.8 detected
RCVD (1.5945s) TCP [8.8.8.8:53 > 92.169.168.155:35052 SA seq=1468973500 ack=3549618321 <snip>
Ultrascan PING SENT to 8.8.8.8 [tcp to port 53; flags: S]
SENT (2.8870s) TCP [92.169.168.155:35053 > 8.8.8.8:53 S seq=3499287440 ack=0 <snip>
Ultrascan DROPPED PING probe packet to 8.8.8.8 detected
RCVD (2.8884s) TCP [8.8.8.8:53 > 92.169.168.155:35053 SA seq=1224904857 ack=3499287441 <snip>
RCVD (3.1885s) TCP [8.8.8.8:53 > 92.169.168.155:35053 SA seq=1224904857 ack=3499287441 <snip>
Ultrascan PING SENT to 8.8.8.8 [tcp to port 53; flags: S]
SENT (4.2025s) TCP [92.169.168.155:35054 > 8.8.8.8:53 S seq=3516064400 ack=0 <snip>
RCVD (4.2043s) TCP [8.8.8.8:53 > 92.169.168.155:35054 SA seq=221185077 ack=3516064401 <snip>
RCVD (4.5046s) TCP [8.8.8.8:53 > 92.169.168.155:35054 SA seq=221185077 ack=3516064401 <snip>
RCVD (5.1885s) TCP [8.8.8.8:53 > 92.169.168.155:35053 SA seq=1224904857 ack=3499287441 <snip>
...
We can see that nmap sends ping probes using tcp port 53.
It looks like each probe sent gets a response quite fast (~2ms).
Since the minimum rtt timeout is 100ms, nmap should wait at least this amount of time before declaring that a probe is lost.
But we can see that nmap does not wait, and declares the ping as "DROPPED" before the response comes back.
If we specify --min-rtt-timeout 1000ms in the command line, we don't get DROPPED pings anymore.
I have tested nmap from the ubuntu repositories (7.60) and from github master (7.70SVN).
I'll be glad to provide more information if you need.
Regards.