IPv4 Fragmentation – Understanding Overlapping Fragments

fragmentationipv4

When are overlapping fragments created and why? Is there any legitimate scenario in which they are used or are they just used by attackers, like in the teardrop attack? And how is receiver suppose to reassemble such fragments (since there is more than one way to do that)?

Best Answer

Overlapping fragments shouldn't occur for "normal" traffic. They are usually a sign of someone trying to circumvent some security system.

You are right that there are different ways to reassemble them. Different implementations behave differently, which is why the attack can be used to circumvent firewalls and make those different systems "see" different things.

Another way to do that without overlapping fragments is by sending a TCP packet with a TTL that is too low to reach the destination host, but which is high enough to pass the firewall. The firewall will see the packet, but the destination host won't. If the firewall is naive in its implementation it will cache what it saw. Then if you retransmit the same TCP packet but with different data the firewall will think it's a normal retransmit and not examine the packet again, but for the host it will be the first time it receives that TCP data and it will use the second version.

There are many ways to mislead firewalls. Overlapping fragments is one of them. A good firewall should detect such behaviour and block the session.

Related Topic