During a penetration test, you are asked to identify all live hosts on a subnet. Which Nmap scan type is most likely to evade firewalls and determine if a host is up without completing the TCP handshake?
Trap 1: Ping sweep (-sn)
Ping sweep (-sn) only probes for host availability using ICMP Echo Request (and ARP on local subnets) and never transmits TCP packets. This means it cannot enumerate open TCP ports, which is the primary goal of the scan described in the question. While it quickly identifies live systems, it fails to reveal which services are running, making it insufficient for a comprehensive host/service discovery mission. Additionally, ICMP probes may be filtered by firewalls, producing incomplete results without any port state information.
Trap 2: TCP connect scan (-sT)
TCP connect scan (-sT) uses the operating system's connect() system call to perform a complete three-way handshake with every port. Because the handshake is fully completed, the target service logs a full connection event, and the scanner's real IP is left in the logs, making it significantly more detectable than a SYN scan. It is also slower because the kernel handles each connection sequentially and must wait for the full handshake to conclude. While it works without raw packet privileges, its lack of stealth and higher overhead make it unsuitable for a penetration test looking to avoid observation and quickly map many ports.
Trap 3: UDP scan (-sU)
UDP scan (-sU) is designed specifically for User Datagram Protocol ports, not TCP ports, and operates by sending UDP datagrams and analyzing responses—most commonly receiving an ICMP Port Unreachable to mark a port closed. This technique is entirely inappropriate for the TCP-based SYN scan described in the question, as it does not perform any TCP handshake or partial handshake. UDP scanning is inherently slow and unreliable, relying on ICMP feedback that is often rate-limited or blocked, and it produces no information about TCP service states. Thus, using UDP scan would fail to answer whether TCP ports are open and would introduce considerable network noise, making it the wrong tool for this stealth-oriented task.
- A
Ping sweep (-sn)
Why wrong: Ping sweep (-sn) only probes for host availability using ICMP Echo Request (and ARP on local subnets) and never transmits TCP packets. This means it cannot enumerate open TCP ports, which is the primary goal of the scan described in the question. While it quickly identifies live systems, it fails to reveal which services are running, making it insufficient for a comprehensive host/service discovery mission. Additionally, ICMP probes may be filtered by firewalls, producing incomplete results without any port state information.
- B
SYN scan (-sS)
SYN scan (-sS) is the correct choice because it sends a TCP SYN packet to each port and awaits a SYN-ACK to indicate an open port. If a SYN-ACK is received, the scanner immediately sends an RST to tear down the incomplete connection, never completing the three-way handshake. This half-open technique avoids the target application's logging (since no full connection is established) and is generally faster than a full connect scan. It does require raw socket privileges (e.g., root or Administrator), but it directly identifies both live hosts and open ports stealthily, making it the ideal all-in-one discovery scan.
- C
TCP connect scan (-sT)
Why wrong: TCP connect scan (-sT) uses the operating system's connect() system call to perform a complete three-way handshake with every port. Because the handshake is fully completed, the target service logs a full connection event, and the scanner's real IP is left in the logs, making it significantly more detectable than a SYN scan. It is also slower because the kernel handles each connection sequentially and must wait for the full handshake to conclude. While it works without raw packet privileges, its lack of stealth and higher overhead make it unsuitable for a penetration test looking to avoid observation and quickly map many ports.
- D
UDP scan (-sU)
Why wrong: UDP scan (-sU) is designed specifically for User Datagram Protocol ports, not TCP ports, and operates by sending UDP datagrams and analyzing responses—most commonly receiving an ICMP Port Unreachable to mark a port closed. This technique is entirely inappropriate for the TCP-based SYN scan described in the question, as it does not perform any TCP handshake or partial handshake. UDP scanning is inherently slow and unreliable, relying on ICMP feedback that is often rate-limited or blocked, and it produces no information about TCP service states. Thus, using UDP scan would fail to answer whether TCP ports are open and would introduce considerable network noise, making it the wrong tool for this stealth-oriented task.