TCP/IP: TCP
Network Security Lecture 7
Eike Ritter 1 Network Security - Lecture 7
TCP spoofing
- Steps
– M kills B (e.g., flooding) – M sends SYN segment to A with source IP address set to B’s IP address – A sends a SYN/ACK to B, with its initial sequence number IA – M completes the 3-way handshake, with ACK set to IA + 1
- M eavesdrops A’s response containing IA [we know how to do this]
- M guesses the correct IA value (“blind spoofing”) [we will focus on this]
- Alice trusts Bob (e.g., logins on Alice are allowed with
no password if TCP connection comes from host Bob)
- Mallory wants to impersonate Bob when opening a
TCP connection to Alice
Eike Ritter 2 Network Security - Lecture 7
TCP spoofing
- Described in R. T. Morris, A Weakness in the 4.2BSD UNIX TCP/IP
Software
- Used by Kevin Mitnick attack in his attack against the San Diego
Supercomputer Center
- Addressed by S. Bellovin, RFC 1984, Defending Against Sequence
Number Attacks
– Set initial sequence number to the timer prescribed originally + the value of a cryptographic hash function of each connection:
ISN = M + F(localhost, localport, remotehost, remoteport)
– It is vital that F not be computable from the outside, so it is keyed with with some secret data
- True random number
- Per-host secret and boot time of the machine
– Thus, each connection is given a separate sequence number space
- That’s the theory, at least
Eike Ritter 3 Network Security - Lecture 7
Initial sequence number revisited
- How about the actual implementations?
– Are the different OSes correctly implementing initial sequence number generators? – How do you test it?
- Michal Zalewski looks at this problem in Strange Attractors and TCP/IP Sequence
Number Analysis and the follow-up study One Year Later
- Derive properties of ISN generators by observing the generated ISNs (instead of,
say, looking at their implementation)
- For example: 4293832719, 3994503850, 4294386178, 134819, 4294768138
191541, 4294445483, 4294608504, 4288751770, 88040492, ...
- Phase space analysis to visualize hidden dependencies
– Represent a sequence of ISNs in a 3-d space: x[t] = seq[t] - seq[t-1] y[t] = seq[t-1] - seq[t-2] z[t] = seq[t-2] - seq[t-3] – Look for unexpected regularities in this space (“attractors”) – Use attractor to build “Spoofing Sets”, i.e., likely values for the next ISN
Eike Ritter 4 Network Security - Lecture 7
Linux 2.2
Eike Ritter 5 Network Security - Lecture 7
Windows 2000
Eike Ritter 6 Network Security - Lecture 7