Nmap Stealth Scanning Techniques for Practical Scenarios
Nmap stealth scanning techniques, such as the SYN scan (-sS), FIN scan (-sF), and NULL scan (-sN), are designed to evade basic firewall rules and logging mechanisms by manipulating TCP headers. For the PenTest+ exam, comparing these techniques and knowing which to deploy against specific defensive setups in practical scenarios is essential.
The Classic SYN Scan (-sS)
The SYN scan is often called a 'half-open' scan because it never completes the three-way handshake. It sends a SYN packet, waits for a SYN/ACK, and immediately sends an RST to tear down the connection.
This technique is fast and generally stealthy because it avoids leaving application-level logs, making it the go-to choice for initial network discovery.
FIN, NULL, and Xmas Scans
When traditional SYN scans are blocked by stateless firewalls, advanced stealth techniques come into play. The FIN scan (-sF) sets only the FIN flag, the NULL scan (-sN) sets no flags, and the Xmas scan (-sX) sets the FIN, PSH, and URG flags.
These scans rely on the RFC 793 specification, which states that closed ports should reply with an RST, while open ports ignore the packet. However, they are less reliable against Windows systems.
Comparing Effectiveness
While FIN, NULL, and Xmas scans can bypass certain filters, they often trigger modern Intrusion Detection Systems (IDS) because the packet structures are highly anomalous. The SYN scan remains the most reliable balance of speed and stealth.
In a practical scenario, you must evaluate the target environment's defenses before selecting a scan type to avoid detection.
Mastering Scenarios Through Practice
Understanding the theory behind these scans is one thing; executing them in a live environment is another. Penetration testing labs allow you to observe how different firewalls react to these scans.
To bridge the gap between theory and exam readiness, using tools like Cert Sensei to practice these specific scenarios is an excellent way to prepare.
❓ Frequently Asked Questions
Why is the SYN scan considered stealthy?
It is considered stealthy because it never completes the three-way handshake, avoiding application-level logs.
What are FIN, NULL, and Xmas scans?
These are advanced stealth scans that manipulate TCP flags (or lack thereof) to bypass stateless firewalls.
Are Xmas scans reliable against Windows systems?
No, they are less reliable against Windows systems because of how Windows handles the TCP RFC 793 specification.