A new TCP/IP blind data injection technique? Dec 10 2003 11:28PM
Michal Zalewski (lcamtuf ghettot org) (3 replies)
RE: A new TCP/IP blind data injection technique? Dec 11 2003 04:38PM
David Gillett (gillettdavid fhda edu)
Re: A new TCP/IP blind data injection technique? Dec 11 2003 07:37AM
Nick Cleaton (nick cleaton net) (2 replies)
Breaking the checksum (a new TCP/IP blind data injection technique) Dec 14 2003 02:38PM
Michal Zalewski (lcamtuf ghettot org)
First, let me apologize to all readers of the list who have no particular
interest in the subject; I should not have generated so many posts, and I
solemnly swear this is the last one. I posted my first thoughts on the
subject perhaps a bit prematurely, and agreed with Nick Cleaton's response
to my question on the (in)ability to bypass IP checksums while preparing
the summary of the feedback I have received. This assumption, in turn,
downgraded the feasibility of the attack significantly, requiring an
attacker to brute-force a 16-bit checksum in order to succeed.

Ivan Arce, however, gave me a reason to rethink this assumption, and I am
glad to conclude that the ability to bypass checksumming indeed
exists,just as I suspected initially. This means the attack is quite
feasible, and can be accomplished in one shot, and provides a very
attractive alternative to a traditional TCP/IP injection attack,
undermining the effectiveness of ISN-based protection, and rendering
random IP IDs not a sufficient protection against this attack.

The attack has but one prerequisite - a section (and only a section!) of a
TCP/IP packet the attacker wants to replace is known to the attacker in
advance. This holds true for cases such as FTP or WWW file downloads and
other situations that are most likely to cause fragmentation to start
with. It is possible to tweak the packet so that the checksum remains
valid, even though portions of the packet such as the sequence number (or
the checksum, for that matter) are not known in advance.

The checksum algorithm used in TCP/IP is fairly trivial (a form of an
16-bit sum), and position- and ordering- insensitive, we can perform a
simple trick:

- Pick a known fragment of the packet (at 16-bit boundaries) and
compute it checksum,

- Construct a malicious replacement for this block, of arbitrary
contents, closing with two bytes used to compensate the checksum
so that it comes out the same as for the original block - this
is trivial with this type of an algorithm,

- Replace the old block with the malicious one.

The checksum of an entire packet would remain the same, even though we did
not know what it was in the first place, and did not know the entire
packet (port numbers and sequence / acknowledgment numbers are, once
again, not known to the attacker).

So, in short:

- The attack DOES NOT require any brute-force and can be
conducted using a single packet.

- The attack requires the traffic exchanged between two endpoints
to be fragmented at some point; this is most likely to happen
on file downloads, etc.

- The attack may be used to bypass ISN-based integrity protection of
TCP streams (such as the solution suggested in RFC1948).

- The attack has to be targeted against a specific connection
the attacker either induced or knew about. The attack is also

- The impact is insertion of malicious data into an existing

- A knowledge of some of the plaintext is necessary.

- Random IP IDs enabled on both endpoints make the attack more
difficult, but still relatively feasible. Sequential IP IDs
make the attack trivial.

- Path MTU Discovery enabled on both endpoints may prevent the
attack, but only as long as there are no DF-ignoring
devices en route (and no proxies that do not use PMTUD).

------------------------- bash$ :(){ :|:&};: --
Michal Zalewski * [http://lcamtuf.coredump.cx]
Did you know that clones never use mirrors?
--------------------------- 2003-12-14 15:01 --


[ reply ]
Re: A new TCP/IP blind data injection technique? Dec 11 2003 05:06PM
Valdis Kletnieks vt edu (1 replies)
Re[2]: A new TCP/IP blind data injection technique? Dec 13 2003 09:59AM
Marius Huse Jacobsen (mahuja c2i net)
Re: A new TCP/IP blind data injection technique? Dec 10 2003 11:59PM
Kris Kennaway (kris FreeBSD org) (1 replies)
Re: A new TCP/IP blind data injection technique? Dec 11 2003 05:17PM
Casper Dik (casper holland sun com)


Privacy Statement
Copyright 2010, SecurityFocus