summaryrefslogtreecommitdiff
path: root/informationals/teso-i0013.txt
diff options
context:
space:
mode:
Diffstat (limited to 'informationals/teso-i0013.txt')
-rw-r--r--informationals/teso-i0013.txt88
1 files changed, 88 insertions, 0 deletions
diff --git a/informationals/teso-i0013.txt b/informationals/teso-i0013.txt
new file mode 100644
index 0000000..b7a1710
--- /dev/null
+++ b/informationals/teso-i0013.txt
@@ -0,0 +1,88 @@
10013 2000/02/17 Linux blind TCP spoofing methods overview
2
3==== TESO Informational =======================================================
4This piece of information is to be kept confidential.
5===============================================================================
6
7Description ..........: Linux blind TCP spoofing methods overview
8Date .................: 2000/02/17 21:00
9Author ...............: scut
10Publicity level ......: known
11Affected .............: Linux 2.0.x/2.2.x TCP stack
12Type of entity .......: implementation
13Type of discovery ....: useful information
14Severity/Importance ..: medium
15Found by .............: various people (NAI, nergal, stealth)
16
17Information ===================================================================
18
19There are several blind TCP spoofing methods known for the used Linux 2.0.x and
202.2.x kernel series. By blind TCP spoofing you can arbitrarily set the source
21IP of a remote TCP connection and hence exploit IP based authorization
22schemes and/or bypass access control lists.
23
24I'll summarize the methods known to me.
25
26
27<= 2.0.35 FIN pushes data to application although state is SYN_RECEIVED
28
29Discovered by Network Associates on 1999/03/09, this vulnerability allows you
30to remotely flush the already received TCP data to the application. Normally
31the system buffers all the received data and only passes them to the
32application if the connection has been established. However, in Linux kernels
33below and equal too 2.0.35, the kernel will send all buffered data to the
34application if you terminate the not yet established TCP connection by sending
35a FIN packet when it is currently in the SYN_RECEIVED state, without checking
36whether the connection has already completed the three-way-handshake. There are
37two public exploits available, receive.c and lin35.c (by myself), but
38exploitation is trivial. This vulnerability can especially well abused for non
39interactive protocols such as FTP or SMTP.
40
41
42<= 2.0.37 Too high ACK results in a RST packet being send, detectable through
43 linear IP ID on victim host
44
45While developing libnids, a network intrusion detection library, which offers
46a easy interface to TCP streams in the network, nergal ported the Linux 2.0.37
47TCP/IP stack into userland. While doing this he audited the code and found this
48vulnerability. He posted his results to the Bugtraq Mailing List on 1999/07/31.
49To be exact, there are two small bugs that add up to a relevant vulnerability:
50One lies in the Linux 2.0.37 kernel implementation of the ACK number
51verification routine. Linux 2.0.37 kernels and older kernels will send out RST
52datagrams if the acknowledgement number received is higher then the one
53assigned to the connection, but will behave quiet if the number is less or
54equal to the correct number. Once the connection is in the ESTABLISHED state
55this behavior changes to that no packet is generated on a too high
56acknowledgement number. This way one can easily find the correct ISN number
57through a binary search in the search space when the attacker is able to tell
58whether a packet was send or not. Linux kernels use sequential IP ID fields,
59which can be abused to indicate whether a host sends packets (ID increases) or
60not (ID is constant). Through constantly pinging the victim and monitoring the
61IP ID increasing either by one (just our ping reply) or by two (our ping reply
62plus the RST packet) one can easily do the search and find the correct ISN.
63A public exploit is available from nergal himself and was attached to his
64original Bugtraq posting. Note that the host must be really idle to do this
65search, which can take up to three dozens seconds.
66
67
68<= 2.2.12 TCP Sequence numbers are predictable on similar TCP states
69
70In September 1999 stealth discovered that Linux 2.2.x kernels behaved different
71in their ISN selection if the TCP connection perimeters (port, seq, IP) were
72alike: If two connections are similar in their parameters, having the same
73ports and equal ISN's the remote Linux system will assign a similar Initial
74Sequence Number to the connection. As it was later discussed on the Linux
75kernel mailing list this resulted from two bugs within the Linux kernel and an
76invalid use of the hash function (MD4).
77While all kernels below and equal to 2.2.12 kernels do have this vulnerability
78it doesn't even seem to matter whether the TCP SYN cookie functionality is
79enabled or not. To exploit this you create two TCP connections, one from the
80spoofed IP and one from a sniffable IP. The trick is to assign the same source
81and destination ports as well as the same Initial Sequence Number to the SYN
82packets. The ISN assigned by the victim computer to the two new connections
83will differ only by a few thousands, so range prediction is easily possible.
84An exploit is available in the TESO Advisory about this topic, called
85blindSpoof.cc, written by stealth.
86
87===============================================================================
88