Course contentsShow
← Security
Lesson 343 of 3,0528. Network Security - ReconnaissanceFree lesson

Advanced Nmap Scan Types

NULL, FIN, Xmas scans, ACK scanning for firewall rules, and window scanning techniques.

Advanced Nmap Scan Types

What you'll learn: How to use stealthy and firewall-probing Nmap scan techniques that go beyond basic TCP SYN and connect scans.


Beyond Basic Scans

You've already learned SYN scanning (half-open) and TCP connect scanning. Now you'll discover more specialized scan types that exploit specific TCP flag combinations to evade detection or gather intelligence about firewall configurations.

Stealth Flag-Based Scans

NULL Scan (-sN) sends packets with no TCP flags set. If a port is closed, the target responds with RST; open ports typically send nothing back. Think of it like knocking on a door without actually saying anything—only locked doors respond.

FIN Scan (-sF) sends packets with only the FIN (finish) flag set. The logic is similar: closed ports reply with RST, open ports stay silent. This mimics the end of a legitimate connection.

Xmas Scan (-sX) sets the FIN, PSH, and URG flags simultaneously—like a "Christmas tree" all lit up with flags. Same principle: silence suggests an open port, RST indicates closed.

Why use these? Some older firewalls and intrusion detection systems only watch for SYN packets, letting these alternative flag patterns slip through unnoticed.

Firewall Mapping Scans

ACK Scan (-sA) doesn't determine if ports are open or closed—instead, it identifies filtered vs unfiltered ports. By sending ACK packets, you can map firewall rulesets: if you get RST back, the port is unfiltered; no response means a firewall is blocking.

Window Scan (-sW) examines the TCP window size in RST responses to differentiate open from closed ports on some systems—a subtle variation of ACK scanning.

Key Limitations

These techniques work best against older systems. Modern stateful firewalls often detect and block unusual flag combinations.

Key Takeaway: NULL, FIN, and Xmas scans use non-standard TCP flags for stealth, while ACK and window scans help map firewall rules rather than identifying open services.