A penetration tester is trying to evade an IDS that detects out-of-order TCP packets. The tester uses Nmap with the -f flag. What is the PRIMARY effect of this flag?
The Nmap -f (fragment) option instructs the scanner to split the TCP header of outgoing packets across several small IP fragments. This technique aims to bypass simple, stateless packet filters or intrusion detection systems (IDS) that only inspect the initial fragment of a packet. By distributing critical header information, such as port numbers or flag settings, across multiple fragments, a basic IDS might fail to reassemble the full packet and thus miss the malicious intent, allowing the scan to proceed undetected.
Why this answer
The `-f` flag in Nmap fragments the IP packet into smaller pieces, typically 8-byte fragments, which splits the TCP header across multiple packets. This fragmentation causes the IDS to see out-of-order or incomplete TCP headers, making it harder for signature-based detection to reassemble and match malicious patterns, thus bypassing simple packet filters that do not perform full TCP reassembly.
Exam trap
The trap here is that candidates often confuse the `-f` flag with decoy or spoofing techniques, but the primary effect is fragmentation to evade packet filters and simple IDS, not to hide the source IP or slow the scan.
How to eliminate wrong answers
Option B is wrong because the `-f` flag does not control scan timing; slowing down to avoid rate-based alarms is achieved with the `-T` (timing) flags, such as `-T0` or `-T1`. Option C is wrong because sending packets from multiple decoy IP addresses is the function of the `-D` (decoy) flag, not `-f`. Option D is wrong because spoofing the source IP address is done with the `-S` flag or by using a spoofed source address in raw packets, not by fragmentation.