Nmap Development mailing list archives
Does nping connect without a full handshake?
From: CoDDoC via dev <dev () nmap org>
Date: Tue, 20 Jul 2021 15:01:05 +0300
Hello to all! I nping my test server to check iptables rules. My command is (from Windows host): nping --tcp --dest-ip x.x.x.x --dest-port xxxx --flags syn --count 1 I see only sent packet without answer: Starting Nping 0.7.91 ( https://nmap.org/nping ) at 2021-07-20 13:45 RTZ 2 (ceia) SENT (0.0470s) TCP y.y.y.y:yyyy > x.x.x.x:xxxx S ttl=64 id=30211 iplen=40 seq=2267374717 win=1480 Max rtt: N/A | Min rtt: N/A | Avg rtt: N/A Raw packets sent: 1 (54B) | Rcvd: 0 (0B) | Lost: 1 (100.00%) Nping done: 1 IP address pinged in 1.05 seconds Then, i modify command like this: nping --tcp-connect --dest-ip x.x.x.x --dest-port xxxx --flags syn --count 1 Now, I see tcp handshake: Starting Nping 0.7.91 ( https://nmap.org/nping ) at 2021-07-20 14:13 RTZ 2 (ceia) SENT (0.0300s) Starting TCP Handshake > x.x.x.x:xxxx RCVD (0.0300s) Handshake with x.x.x.x:xxxx completed Max rtt: 15.000ms | Min rtt: 15.000ms | Avg rtt: 15.000ms TCP connection attempts: 1 | Successful connections: 1 | Failed: 0 (0.00%) Nping done: 1 IP address pinged in 0.04 seconds After this I repeated previous command: nping --tcp --dest-ip x.x.x.x --dest-port xxxx --flags syn --count 1 And now I see packets in both directions: Starting Nping 0.7.91 ( https://nmap.org/nping ) at 2021-07-20 14:20 RTZ 2 (ceia) SENT (0.0560s) TCP y.y.y.y:yyyy > x.x.x.x:xxxx S ttl=64 id=21871 iplen=40 seq=2624730844 win=1480 RCVD (0.0560s) TCP x.x.x.x:xxxx > y.y.y.y:yyyy SA ttl=64 id=0 iplen=44 seq=176100673 win=14600 <mss 1460> Max rtt: 0.000ms | Min rtt: 0.000ms | Avg rtt: 0.000ms Raw packets sent: 1 (54B) | Rcvd: 1 (46B) | Lost: 0 (0.00%) Nping done: 1 IP address pinged in 0.15 seconds So, a question is: does nping connect without a tcp handshake? Or it's necessary to establish full handshake first? Thanks in advance --
_______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Does nping connect without a full handshake? CoDDoC via dev (Jul 20)