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

Fragmentation and Packet Manipulation

Use IP fragmentation and packet manipulation to bypass simple firewalls and IDS signature matching.

Fragmentation and Packet Manipulation

What you'll learn: How attackers split and modify packets to slip past firewalls and intrusion detection systems unnoticed.


The Core Problem with Simple Defenses

Firewalls and intrusion detection systems (IDS) often look for specific patterns or signatures in network traffic—like scanning for a known attack phrase in a single packet. But what happens when you break that phrase across multiple packets, or disguise the payload so it doesn't match the signature in one piece?

Fragmentation is the technique of splitting IP packets into smaller pieces (fragments) that are reassembled by the target host. Since some security devices only inspect individual fragments—not the complete reassembled packet—attackers can:

  • Hide malicious payloads by spreading them across fragments
  • Evade signature matching because the attack pattern isn't visible in any single fragment
  • Bypass simple stateless firewalls that don't track or reassemble fragmented traffic

How It Works

Think of it like sending a banned message through airport security: instead of writing "BOMB" on one postcard, you send four postcards with "B", "O", "M", "B" separately. Each passes inspection alone, but together they form the forbidden word.

In practice, tools like Nmap can fragment packets using options like -f (fragment packets) or --mtu (set maximum transmission unit size), splitting scan packets into tiny pieces that evade detection.

Example Concept

Normal packet: [IP Header | TCP Header | "malicious_scan_string"]
Fragmented:    [Frag1: IP+part1] [Frag2: IP+part2] [Frag3: IP+part3]

Each fragment looks innocent alone; the target reassembles them, but the IDS may never see the complete malicious string.

Key Takeaway: Fragmentation and packet manipulation exploit the gap between how security devices inspect traffic (per-fragment) and how targets process it (reassembled), allowing attackers to bypass signature-based defenses.