Network Working Group I. Miller
Request for Comments: 3128 Singularis Ltd
Updates: 1858 June 2001
Category: Informational
Protection Against a Variant of the Tiny Fragment Attack
1. Introduction
RFC 1858 provides an excellent description of a class of attack on Internet firewalls and proposes countermeasures. However one of these countmeasures, the "Indirect Method" (section 3.2.2) is vulnerable to a combination of two of the attacks described.
1.1 The scope of the attack
Where the filtering rules allow incoming connections to a machine AND there other ports which allow only outgoing connections on the same host, the attack allows incoming connections to the supposedly outgoing-only ports.
Miller Informational [Page 1]
RFC 3128 Protection Against a Tiny Fragment Attack June 2001 2. The Tiny Overlapping Fragment AttackThe attack typically consists of sending three fragments.
2.1 Example of the attack
Consider the following trivial set of rules for incoming packets:+---+-------+-------+-------+-------+-----------------------+ | No|Action | Source| Dest. | Flags | Purpose | | | | Port | Port | | | +===+=======+=======+=======+=======+=======================+ | 1 |Permit | >1023 | SMTP | ANY | Incoming E-mail | +---+-------+-------+-------+-------+-----------------------+ | 2 |Permit | >1023 | ANY | Ack=1| Existing FTP data | | | | | | channel connections. | +---+-------+-------+-------+-------+-----------------------+ | 3 |Deny | ANY | ANY | ANY | Default deny | +---+-------+-------+-------+-------+-----------------------+Fragment 1: attacker(1234) -> target(SMTP) Ack=0
Miller Informational [Page 2]
RFC 3128 Protection Against a Tiny Fragment Attack June 2001
attacker(1234) -> target(Telnet) Ack=0
2.2 The failure of "Indirect Method"
The Indirect Method attempts to solve both Tiny Fragment and Overlapping Fragment attacks, solely by rejecting packets with FO=1. However none of the above fragments have FO=1, so none are rejected.
3. Countermeasures
Whereas apparently very elegant, RFC 1858's Indirect Method is not robust. In addition to blocking FO=1 packets, it is also necessary to block FO=0 that hold less than a complete header.
4. Security Considerations
This memo is concerned entirely with the security implications of filtering fragmented IP packets.
Miller Informational [Page 3]
RFC 3128 Protection Against a Tiny Fragment Attack June 2001 5. Author's AddressIan Miller Singularis Ltd 32 Stockwell Street Cambridge CB1 3ND UK
Miller Informational [Page 4]
RFC 3128 Protection Against a Tiny Fragment Attack June 2001 6. Full Copyright StatementCopyright (C) The Internet Society (2001). All Rights Reserved.