home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersclub / km / library / hack / simple_tcp_active_attack.txt < prev    next >
Text File  |  1998-03-25  |  44KB  |  956 lines

  1.         Simple Active Attack Against TCP
  2.  
  3.             Laurent Joncheray
  4.  
  5.             Merit Network, Inc.
  6.             4251 Plymouth Road, Suite C
  7.             Ann Arbor, MI 48105, USA
  8.             Phone: +1 (313) 936 2065
  9.             Fax: +1 (313) 747 3185
  10.             E-mail: lpj@merit.edu
  11.  
  12.             Abstract
  13.  
  14.     This paper describes an active attack against the Transport
  15. Control Protocol (TCP) which allows a cracker to redirect the TCP
  16. stream through his machine thereby permitting him to bypass the protection
  17. offered by such a system as a one-time password [skey] or
  18. ticketing authentication [kerberos]. The TCP connection is
  19. vulnerable to anyone with a TCP packet sniffer and generator located on
  20. the path followed by the connection. Some schemes to detect this
  21. attack are presented as well as some methods of prevention and some
  22. interesting details of the TCP protocol behaviors.
  23.  
  24. 1. Introduction
  25.  
  26.     Passive attacks using sniffers are becoming more and more
  27. frequent on the Internet. The attacker obtains a user id and password
  28. that allows him to logon as that user. In order to prevent such attacks
  29. people have been using identification schemes such as one-time password
  30. [skey] or ticketing identification [kerberos]. Though
  31. they prevent password sniffing on an unsecure network these methods
  32. are still vulnerable to an active attack as long as they neither
  33. encrypt nor sign the data stream. [Kerberos also provides an
  34. encrypted TCP stream option.] Still many people are complacent believing
  35. that active attacks are very difficult and hence a lesser risk.
  36.  
  37.     The following paper describes an extremely simple active attack
  38. which has been successfully used to break into Unix hosts and
  39. which can be done with the same resources as for a passive sniffing
  40. attack. [The attacks have been performed with a test software
  41. and the users were aware of the attack.  Although we do not have any
  42. knowledge of such an attack being used on the Internet, it may
  43. be possible.] Some uncommon  behaviors of the TCP protocol are also
  44. presented as well as some real examples and statistical studies of the
  45. attack's impact on the network.  Finally some detection and prevention
  46. schemes are explained. In order to help any reader unfamiliar with the
  47. subtleties of the TCP protocol the article starts with a short
  48. description of TCP.
  49.  
  50.     The reader can also refers to another attack by R. Morris
  51. presented in [morris85]. Though the following attack is related
  52. to Morris' one, it is more widely usable on any TCP connection.
  53. In section 7 we present and compare this attack with
  54. the present one.
  55.  
  56.     The presentation of the attack will be divided into three parts:
  57. the ``Established State'' which is the state where the session is open
  58. and data is exchanged; the set up (or opening) of such a session; and
  59. finally some real examples.
  60.  
  61. 2. Established State
  62.  
  63. 2.1 The TCP protocol
  64.  
  65.     This section offers a short description of the TCP protocol.
  66. For more details the reader can refer to [rfc793]. TCP provides a
  67. full duplex reliable stream connection between two end points. A
  68. connection is uniquely defined by the quadruple (IP address of sender,
  69. TCP port number of the sender, IP address of the receiver, TCP port
  70. number of the receiver). Every byte that is sent by a host is marked with a
  71. sequence number (32 bits integer) and is acknowledged by the receiver
  72. using this sequence number. The sequence number for the first byte sent
  73. is computed during the connection opening. It changes for any new
  74. connection based on rules designed to avoid reuse of the same sequence
  75. number for two different sessions of a TCP connection.
  76.  
  77.     We shall assume in this document that one point of the
  78. connection acts as a server (for instance a telnet server) and the
  79. other as the client.  The following terms will be used:
  80.  
  81.     SVR_SEQ: sequence number of the next byte to be sent
  82.     by the server;
  83.     SVR_ACK: next byte to be received by the server
  84.     (the sequence number of the last byte received plus one);
  85.     SVR_WIND: server's receive window;
  86.     CLT_SEQ: sequence number of the next byte to be sent by
  87.     the client;
  88.     CLT_ACK: next byte to be received by the client;
  89.     CLT_WIND: client's receive window;
  90.  
  91.     At the beginning when no data has been exchanged we have
  92. SVR_SEQ = CLT_ACK and CLT_SEQ = SVR_ACK. These equations
  93. are also true when the connection is in a 'quiet' state (no data being
  94. sent on each side).  They are not true during transitory states when
  95. data is sent.  The more general equations are:
  96.  
  97.     CLT_ACK <= SVR_SEQ <= CLT_ACK + CLT_WIND
  98.     SVR_ACK <= CLT_SEQ <= SVR_ACK + SVR_WIND
  99.  
  100. The TCP packet header fields are:
  101.  
  102.     Source Port:        The source port number;
  103.     Destination Port:    The destination port number;
  104.     Sequence number:    The sequence number of the first
  105.                 byte in this packet;
  106.     Acknowledgment Number:    The expected sequence number
  107.                     of the next byte to be received;
  108.     Data Offset:        Offset of the data in the packet;
  109.     Control Bits:
  110.  
  111.             URG:  Urgent Pointer;
  112.             ACK:  Acknowledgment;
  113.             PSH:  Push Function;
  114.             RST:  Reset the connection;
  115.             SYN:  Synchronize sequence numbers;
  116.             FIN:  No more data from sender;
  117.  
  118.     Window:        Window size of the sender;
  119.     Checksum:    TCP checksum of the header and data;
  120.     Urgent Pointer:    TCP urgent pointer;
  121.     Options:        TCP options;
  122.  
  123.  - SEG_SEQ will refer to the packet sequence number (as
  124. seen in the header).
  125.  - SEG_ACK will refer to the packet acknowledgment number.
  126.  - SEG_FLAG will refer to the control bits.
  127.  
  128. On a typical packet sent by the client (no retransmission) SEG_SEQ is set
  129. to CLT_SEQ, SEG_ACK to CLT_ACK.
  130.  
  131.     TCP uses a ``three-way handshake'' to establish a new
  132. connection. If we suppose that the client initiates the connection to
  133. the server and that no data is exchanged, the normal packet exchange
  134. is (C.f. Figure 1):
  135.  
  136.  - The connection on the client side is on the CLOSED state.
  137. The one on the server side is on the LISTEN state.
  138.  - The client first sends its initial sequence number and sets the SYN bit:
  139.  
  140.     SEG_SEQ  =  CLT_SEQ_0, 
  141.     SEG_FLAG  =  SYN
  142.  
  143. Its state is now SYN-SENT
  144.  - On receipt of this packet the server acknowledges the client sequence
  145. number, sends its own initial sequence number and sets the SYN bit:
  146.  
  147.     SEG_SEQ  =  SVR_SEQ_0, 
  148.     SEQ_ACK  =  CLT_SEQ_0+1, 
  149.     SEG_FLAG  =  SYN
  150.  
  151. and set 
  152.  
  153.     SVR_ACK=CLT_SEQ_0+1
  154.  
  155. Its state is now SYN-RECEIVED
  156.  - On receipt of this packet the client acknowledges the server
  157. sequence number:
  158.  
  159.     SEG_SEQ  =  CLT_SEQ_0+1, 
  160.     SEQ_ACK  =  SVR_SEQ_0+1
  161.  
  162. and sets CLT_ACK=SVR_SEQ_0+1
  163. Its state is now ESTABLISHED
  164.  - On receipt of this packet the server enters the ESTABLISHED state. We now
  165. have:
  166.  
  167.     CLT_SEQ  =  CLT_SEQ_0+1 
  168.     CLT_ACK  =  SVR_SEQ_0+1 
  169.     SVR_SEQ  =  SVR_SEQ_0+1 
  170.     SVR_ACK  =  CLT_SEQ_0+1
  171.  
  172. Server                        Client
  173. LISTEN                                            CLOSED          
  174.  
  175.                     <-  SYN, 
  176.                         CLT_SEQ_0
  177.                                       
  178. LISTEN                                             SYN-SENT        
  179.  
  180.                         SYN,        ->
  181.                         SVR_SEQ_0, 
  182.                         CLT_SEQ_0+1
  183.                    
  184. SYN-RECEIVED                                      ESTABLISHED     
  185.                                         
  186.                                                   SVR_SEQ = CLT_SEQ_0 + 1 
  187.                                                   CLT_ACK = SVR_SEQ_0 + 1
  188.                                         
  189.                     <-  ACK, 
  190.                         CLT_SEQ_0 + 1 
  191.             SVR_SEQ_0+1
  192.                 
  193. ESTABLISHED                                                   
  194.  
  195. SVR_SEQ = SVR_SEQ_0 + 1 
  196. SVR_ACK = CLT_SEQ_0 + 1
  197.  
  198.  
  199.         figure 1: Example of a connection opening
  200.  
  201.     Closing a connection can be done by using the FIN or the RST
  202. flag.  If the RST flag of a packet is set the receiving host enters the
  203. CLOSED state and frees any resource associated with this instance of
  204. the connection.  The packet is not acknowledged. Any new incoming
  205. packet for that connection will be dropped.
  206.  
  207. If the FIN flag of a packet is set the receiving host enters the
  208. CLOSE-WAIT state and starts the process of gracefully closing the
  209. connection.  The detail of that procces is beyond the scope of this
  210. document. The reader can refer to [rfc793] for further details.
  211.  
  212.     In the preceding example we specifically avoided any unusual cases
  213. such as out-of-band packets, retransmission, loss of packet, concurrent
  214. opening, etc...  These can be ignored in this simple study of the
  215. attack.
  216.  
  217.     When in ESTABLISHED state, a packet is acceptable if its
  218. sequence number falls within the expected segment
  219.  
  220.     [SVR_ACK, SVR_ACK + SVR_WIND]
  221.  
  222. (for the server) or
  223.  
  224.     [CLT_ACK, CLT_ACK + CLT_WIND]
  225.  
  226. (for the client). If the sequence number is beyond those limits the
  227. packet is dropped and a acknowledged packet will be sent using the
  228. expected sequence number.  For example if
  229.  
  230.     SEG_SEQ  =  200, 
  231.     SVR_ACK  =  100, 
  232.     SVR_WIND  =  50
  233.  
  234. Then SEG_SEQ > SVR_ACK + SVR_WIND. The server
  235. forms a ACK packet with
  236.  
  237.     SEG_SEQ  =  SVR_SEQ 
  238.     SEG_ACK  =  SVR_ACK
  239.  
  240. which is what the server expects to see in the packet.
  241.  
  242. 2.2 A desynchronized state
  243.  
  244.     The term ``desynchronized state'' will refer to the connection
  245. when both sides are in the ESTABLISHED state, no data is being sent
  246. (stable state), and
  247.  
  248.     SVR_SEQ  !=  CLT_ACK 
  249.     CLT_SEQ  !=  SVR_ACK
  250.  
  251.  
  252.     This state is stable as long as no data is sent. If some data
  253. is sent two cases can occur:
  254.  
  255.  - If CLT_SEQ < SVR_ACK + SVR_WIND and
  256. CLT_SEQ > SVR_ACK the packet is acceptable, the data may be stored
  257. for later use (depending on the implementation) but not sent to the
  258. user since the beginning of the stream (sequence number SVR_ACK) is
  259. missing.
  260.  - If CLT_SEQ > SVR_ACK + SVR_WIND or CLT_SEQ <
  261. SVR_ACK the packet is not acceptable and will be dropped. The data is
  262. lost.
  263.  
  264.     In both case data exchange is not possible even if the state
  265. exists.
  266.  
  267. 2.3 The attack
  268.  
  269.     The proposed attack consists of creating a desynchronized state
  270. on both ends of the TCP connection so that the two points cannot exchange data
  271. any longer. A third party host is then used to create acceptable packets
  272. for both ends which mimics the real packets.
  273.  
  274.     Assume that the TCP session is in a desynchronized state and that
  275. the client sends a packet with
  276.  
  277.     SEG_SEQ  =  CLT_SEQ 
  278.     SEG_ACK  =  CLT_ACK
  279.  
  280. Since CLT_SEQ != SVR_ACK the data will not be accepted and the
  281. packet is dropped.  The third party then sends the same packet but
  282. changes the SEG_SEQ and SEG_ACK (and the checksum) such that
  283.  
  284.     SEG_SEQ  =  SVR_ACK, 
  285.     SEG_ACK  =  SVR_SEQ
  286.  
  287. which is acceptable by the server. The data is processed by the server.
  288.  
  289. If CLT_TO_SVR_OFFSET refers to SVR_ACK - CLT_SEQ and
  290. SVR_TO_CLT_OFFSET refers to CLT_ACK - SVR_SEQ then the first party
  291. attacker has to rewrite the TCP packet from the client to the server as:
  292.  
  293.     SEG_SEQ <- SEG_SEQ + CLT_TO_SVR_OFFSET
  294.     SEG_ACK <- SEG_ACK - SVR_TO_CLT_OFFSET
  295.  
  296. Considering that the attacker can listen to any packet exchanged between
  297. the two points and can forge any kind of IP packet (therefore masquerading as
  298. either the client or the server) then everything acts as if the connection
  299. goes through the attacker machine. This one can add or remove any data to
  300. the stream. For instance if the connection is a remote login using telnet
  301. the attacker can include any command on behalf of the user
  302. ("echo merit.edu lpj > ~/.rhosts" is an example of such a command)
  303. and filter out any unwanted echo so that the user will not
  304. be aware of the intruder.
  305. Of course in this case CLT_TO_SVR_OFFSET and SVR_TO_CLT_OFFSET
  306. have to change. The new values are let as an exercise for the
  307. reader. [One can turn off
  308. the echo in the telnet connection in order to avoid the burden of filtering
  309. the output. The test we did showed up a bug in the current telnet
  310. implementation (or maybe in the telnet protocol itself). If a TCP packet
  311. contains both
  312. IAC DONT ECHO and IAC DO ECHO the telnet processor will answer with
  313. IAC WONT ECHO and IAC WILL ECHO. The other end point will acknowledge
  314. IAC DONT ECHO and IAC DO ECHO etc... creating an endless loop.]
  315.  
  316. 2.4 ``TCP Ack storm''
  317.  
  318.     A flaw of the attack is the generation of a lot of TCP ACK
  319. packets. When receiving an unacceptable packet the host acknowledges it
  320. by sending the expected sequence number (As the Acknolegement number.
  321. C.f. introduction about TCP)
  322. and using its own sequence number. This packet is itself unacceptable and
  323. will generate an acknowledgement packet which in turn will generate
  324. an acknowledgement packet etc... creating a supposedly endless loop for
  325. every data packet sent.
  326.  
  327.     Since these packets do not carry data they are not retransmitted
  328. if the packet is lost. This means that if one of the packets
  329. in the loop is dropped then the loop ends. Fortunately (or
  330. unfortunately?) TCP uses IP on an unreliable network layer with a non
  331. null packet loss rate, making an end to the loops. Moreover the more
  332. packets the network drops, the shorter is the Ack storm (the loop). We
  333. also notice that these loops are self regulating: the more loops we
  334. create the more traffic we get, the more congestion and packet drops we
  335. experience and the more loops are killed.
  336.  
  337.     The loop is created each time the client or the server sends data.
  338. If no data is sent no loop appears. If data is sent and no attacker is there
  339. to acknowledge the data then the data will be retransmitted, a storm
  340. will be created for each retransmission, and eventually the connection
  341. will be dropped since no ACK of the data is sent. If the attacker acknowledges
  342. the data then only one storm is produced (in practice the attacker often
  343. missed the data packet due to the load on the network, and acknowledge the
  344. first of subsequent retransmission).
  345.  
  346.     The attack uses the second type of packet described in
  347. Section 2.2. The first case in which the data is stored by
  348. the receiver for later processing has not been tested. It has the
  349. advantage of not generating the ACK storm but on the other hand it may be
  350. dangerous if the data is actually processed. It is also difficult to
  351. use with small window connections.
  352.  
  353. 3. Setup of the session
  354.  
  355.     This paper presents two methods for desynchronizing a TCP connection.
  356. Others can be imagined but will not be described here. We suppose that the
  357. attacker can listen to every packet sent between the two end points.
  358.  
  359. 3.1 Early desynchronization
  360.  
  361. This method consists of breaking the connection in its early setup stage
  362. on the server side and creating a new one with different sequence number.
  363. Here is the process (Figure 2 summarizes this process)
  364.  
  365.      - The attacker listens for a SYN/ACK packet from the server to
  366. the client (stage 2 in the connection set up).
  367.  
  368.      - On detection of that packet the attacker sends the server
  369. a RST packet and then a SYN packet with exactly the same parameters
  370. (TCP port) but a different sequence number (referred to as ATK_ACK_0 in
  371. the rest of the paper).
  372.  
  373.      - The server will close the first connection when it
  374. receives the RST packet and then reopens a new one on the same port but
  375. with a different sequence number (SVR_SEQ_0') on receipt of the SYN
  376. packet. It sends back a SYN/ACK packet to the client.
  377.  
  378.      - On detection of that packet the attacker sends the server a
  379. ACK packet. The server switches to the ESTABLISHED state.
  380.  
  381.      - The client has already switched to the ESTABLISHED state when it
  382. receives the first SYN/ACK packet from the server.
  383.  
  384.  
  385. Server                        Client    
  386.                                 
  387. LISTEN                        CLOSED        
  388.  
  389.             <-  SYN, 
  390.              CLT_SEQ_0
  391.  
  392. SYN-RECEIVED                    SYN-SENT    
  393.  
  394.             SYN,           ->
  395.             SVR_SEQ_0, 
  396.             CLT_SEQ_0+1
  397.            
  398.  
  399.                         ESTABLISHED    
  400.                      
  401.                         SVR_SEQ = CLT_SEQ_0 + 1 
  402.                         CLT_ACK = SVR_SEQ_0 + 1
  403.                     
  404.             <=  RST, 
  405.             CLT_SEQ_0 + 1
  406.         
  407. CLOSED                                
  408.  
  409.             <=    SYN, 
  410.             ATK_SEQ_0
  411.         
  412.  
  413.             SYN,             ->
  414.             SVR_SEQ_0', 
  415.             ATK_SEQ_0 + 1
  416.  
  417. SYN-RECEIVED                            
  418.  
  419.             <=    SYN, 
  420.             ATK_SEQ_0 + 1, 
  421.             SVR_SEQ_0' + 1
  422.         
  423.  
  424. ESTABLISHED                            
  425.  
  426. SVR_SEQ = SVR_SEQ_0' + 1 
  427. SVR_ACK = ATK_SEQ_0 + 1
  428.  
  429.  
  430.     Figure 2: A attack scheme. The attacker's packets are marked with <=
  431.  
  432.     This diagram does not show the unacceptable acknowledgement packet
  433. exchanges. Both ends are in the desynchronized ESTABLISHED state now.
  434.  
  435.     SVR_TO_CLT_OFFSET = SVR_SEQ_0 - SVR_SEQ_0'
  436.  
  437. is fixed by the server.
  438.  
  439.     CLT_TO_SVR_OFFSET = ATK_SEQ_0 - CLT_SEQ_0
  440.  
  441. is fixed by the attacker.
  442.  
  443.     The success of the attack relies on the correct value being chosen
  444. for CLT_TO_SVR_OFFSET. Wrong value may make the
  445. client's packet acceptable and can produce unwanted effects.
  446.  
  447. 3.2 Null data desynchronization
  448.  
  449.     This method consists for the attacker in sending a large amount
  450. of data to the server and to the client. The data sent shouldn't affect
  451. nor be visible to the client or sever, but will put both end of the TCP
  452. session in the desynchronized state.
  453.  
  454.     The following scheme can be used with a telnet session:
  455.  
  456.      - The attacker watchs the session without interfering.
  457.      - When appropriate the attacker sends a large amount of ``null
  458. data'' to the server. ``Null data'' refers to data that will not affect
  459. anything on the server side besides changing the TCP acknowledgment number.
  460. [For instance with a telnet session the attacker sends ATK_SVR_OFFSET
  461. bytes consisting of the sequence IAC NOP IAC NOP... Every two
  462. bytes IAC NOP will be interpreted by the telnet daemon, removed from
  463. the stream of data and nothing will be affected. [The telnet
  464. protocol [telnet] defines the NOP command as ``No Operation''. In
  465. other words, do nothing, just ignore those bytes.] Now the Server has
  466.  
  467.     SVR_ACK = CLT_SEQ + ATK_SVR_OFFSET
  468.  
  469. which of course is desynchronized.
  470.      - The attacker does the same thing with the client.
  471.  
  472.  
  473.     The method is useful if the session can carry ``null data''. The
  474. time when the attacker sends that data is also very difficult to determine
  475. and may cause some unpredictable side effects.
  476.  
  477. 4. Examples
  478.  
  479.     The following logs are provided by running a hacked version of
  480. tcpdump [tcpdump] on the local ethernet where the client resides.
  481. Comments are preceded by `##'.
  482.  
  483.     The first example is a normal telnet session opening between 35.42.1.56
  484. (the client) and 198.108.3.13 (the server).
  485.  
  486.     ## The client sends a SYN packet, 1496960000 is its initial sequence number.
  487. 11:07:14.934093 35.42.1.56.1374 > 198.108.3.13.23: S 1496960000:1496960000(0) win 4096
  488.     ## The server answers with its initial sequence number and the SYN flag.
  489. 11:07:14.936345 198.108.3.13.23 > 35.42.1.56.1374: S 1402880000:1402880000(0) ack 1496960001 win 4096
  490.     ## The client acknowledges the SYN packet.
  491. 11:07:14.937068 35.42.1.56.1374 > 198.108.3.13.23: . 1496960001:1496960001(0) ack 1402880001 win 4096
  492.     ## Now the two end points are in the ESTABLISHED state.
  493.     ## The client sends 6 bytes of data.
  494. 11:07:15.021817 35.42.1.56.1374 > 198.108.3.13.23: P 1496960001:1496960007(6) 
  495.         ack 1402880001 win 4096 255 253 /C 255 251 /X
  496. [...
  497.     ## The rest of the log is the graceful closing of the connection
  498. 11:07:18.111596 198.108.3.13.23 > 35.42.1.56.1374: F 1402880059:1402880059(0) ack 1496960025 win 4096
  499. 11:07:18.112304 35.42.1.56.1374 > 198.108.3.13.23: . 1496960025:1496960025(0) ack 1402880060 win 4096
  500. 11:07:18.130610 35.42.1.56.1374 > 198.108.3.13.23: F 1496960025:1496960025(0) ack 1402880060 win 4096
  501. 11:07:18.132935 198.108.3.13.23 > 35.42.1.56.1374: . 1402880060:1402880060(0) ack 1496960026 win 4095
  502.  
  503.     The next example is the same session with an intrusion by the
  504. attacker. The desynchronized state is created in the early stage of
  505. the session (subsection 3.1). The attacker will add the
  506. command 'ls;' to the stream of data.  The user uses skey to
  507. identify himself to the server. From the user's point of view the
  508. session looks like this:
  509.  
  510. <lpj@homefries: 1> telnet 198.108.3.13
  511. Trying 198.108.3.13 ...
  512. Connected to 198.108.3.13.
  513. Escape character is '^'.
  514.  
  515. SunOS UNIX (_host)
  516.  
  517. login: lpj
  518. s/key 70 cn33287
  519. (s/key required)
  520. Password:
  521. Last login: Wed Nov 30 11:28:21 from homefries.merit.edu
  522. SunOS Release 4.1.3_U1 (GENERIC) #2: Thu Jan 20 15:58:03 PST 1994
  523. (lpj@_host: 1) pwd
  524. Mail/           mbox            src/
  525. elm*            resize*         traceroute*
  526. /usr/users/lpj
  527. (lpj@_host: 2) history
  528.      1  13:18   ls ; pwd
  529.      2  13:18   history
  530. (lpj@_host: 3) logoutConnection closed by foreign host.
  531. <lpj@homefries: 2> 
  532.  
  533. The user types only one command 'pwd' and then asks for the history of
  534. the session. The history shows that a ls' has also being issued.
  535. The ls command produces an output which has not been filtered.
  536. The following log shows the TCP packet exchanges between the client and
  537. the server. Unfortunately some packets are missing from this log because
  538. they have been dropped by the sniffer's ethernet interface driver. One
  539. must see that log like a snapshot of a few instants of the exchange
  540. more than the full transaction log. The attacker's window size has been
  541. set to uncommon values (400, 500, 1000) in order to make its packets
  542. more easily traceable. The attacker is on 35.42.1, three hops away from the
  543. server, on the path from the client to the server. The names and addresses
  544. of the hosts have been changed for security reasons.
  545.  
  546.     ## The client sends a SYN packet, 896896000 is its initial sequence number.
  547. 11:25:38.946119 35.42.1.146.1098 > 198.108.3.13.23: S 896896000:896896000(0) win 4096
  548.     ## The server answers with its initial sequence number (1544576000) and the SYN flag.
  549. 11:25:38.948408 198.108.3.13.23 > 35.42.1.146.1098: S 1544576000:1544576000(0) ack 896896001 win 4096
  550.     ## The client acknowledges the SYN packet. It is in the ESTABLISHED state now.
  551. 11:25:38.948705 35.42.1.146.1098 > 198.108.3.13.23: . 896896001:896896001(0) ack 1544576001 win 4096
  552.     ## The client sends some data
  553. 11:25:38.962069 35.42.1.146.1098 > 198.108.3.13.23: P 896896001:896896007(6) 
  554.         ack 1544576001 win 4096 255 253 /C 255 251 /X
  555.     ## The attacker resets the connection on the server side
  556. 11:25:39.015717 35.42.1.146.1098 > 198.108.3.13.23: R 896896101:896896101(0) win 0
  557.     ## The attacker reopens the connection with an initial sequence number of 601928704
  558. 11:25:39.019402 35.42.1.146.1098 > 198.108.3.13.23: S 601928704:601928704(0) win 500
  559.     ## The server answers with a new initial sequence number (1544640000) and the SYN flag.
  560. 11:25:39.022078 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096
  561.     ## Since the last packet is unacceptable for the client, it acknowledges it
  562.     ## with the expected sequence number (1544576001)
  563. 11:25:39.022313 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ack 1544576001 win 4096
  564.     ## Retransmission to the SYN packet triggered by the unacceptable last packet
  565. 11:25:39.023780 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096
  566.     ## The ACK storm loop
  567. 11:25:39.024009 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ack 1544576001 win 4096
  568. 11:25:39.025713 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096
  569. 11:25:39.026022 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ack 1544576001 win 4096
  570. [...
  571. 11:25:39.118789 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096
  572. 11:25:39.119102 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ack 1544576001 win 4096
  573. 11:25:39.120812 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096
  574. 11:25:39.121056 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ack 1544576001 win 4096
  575.     ## Eventually the attacker acknowledges the server SYN packet with the attacker's new
  576.     ## sequence number (601928705). The data in this packet is the one previously
  577.     ## sent by the client but never received.
  578. 11:25:39.122371 35.42.1.146.1098 > 198.108.3.13.23: . 601928705:601928711(6) 
  579.         ack 1544640001 win 400 255 253 /C 255 251 /X
  580.     ## Some ACK storm
  581. 11:25:39.124254 198.108.3.13.23 > 35.42.1.146.1098: . 1544640001:1544640001(0) ack 601928711 win 4090
  582. 11:25:39.124631 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ack 1544576001 win 4096
  583. 11:25:39.126217 198.108.3.13.23 > 35.42.1.146.1098: . 1544640001:1544640001(0) ack 601928711 win 4090
  584. 11:25:39.126632 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ack 1544576001 win 4096
  585. [...
  586. 11:25:41.261885 35.42.1.146.1098 > 198.108.3.13.23: . 601928728:601928728(0) ack 1544640056 win 1000
  587.     ## A retransmission by the client
  588. 11:25:41.422727 35.42.1.146.1098 > 198.108.3.13.23: P 896896018:896896024(6) 
  589.         ack 1544576056 win 4096 255 253 /A 255 252 /A
  590. 11:25:41.424108 198.108.3.13.23 > 35.42.1.146.1098: . 1544640059:1544640059(0) ack 601928728 win 4096
  591. [...
  592. 11:25:42.323262 35.42.1.146.1098 > 198.108.3.13.23: . 896896025:896896025(0) ack 1544576059 win 4096
  593. 11:25:42.324609 198.108.3.13.23 > 35.42.1.146.1098: . 1544640059:1544640059(0) ack 601928728 win 4096
  594.     ## The user ID second character.
  595. 11:25:42.325019 35.42.1.146.1098 > 198.108.3.13.23: P 896896025:896896026(1) 
  596.         ack 1544576059 win 4096 p
  597. 11:25:42.326313 198.108.3.13.23 > 35.42.1.146.1098: . 1544640059:1544640059(0) ack 601928728 win 4096
  598. [...
  599. 11:25:43.241191 35.42.1.146.1098 > 198.108.3.13.23: . 601928731:601928731(0) ack 1544640060 win 1000
  600.     ## Retransmission
  601. 11:25:43.261287 198.108.3.13.23 > 35.42.1.146.1098: P 1544640059:1544640061(2) 
  602.         ack 601928730 win 4096 l p
  603. 11:25:43.261598 35.42.1.146.1098 > 198.108.3.13.23: . 896896027:896896027(0) ack 1544576061 win 4096
  604. [...
  605. 11:25:43.294192 198.108.3.13.23 > 35.42.1.146.1098: . 1544640061:1544640061(0) ack 601928730 win 4096
  606. 11:25:43.922438 35.42.1.146.1098 > 198.108.3.13.23: P 896896026:896896029(3) 
  607.         ack 1544576061 win 4096 j /M /@
  608. 11:25:43.923964 198.108.3.13.23 > 35.42.1.146.1098: . 1544640061:1544640061(0) ack 601928730 win 4096
  609. [...
  610. 11:25:43.957528 198.108.3.13.23 > 35.42.1.146.1098: . 1544640061:1544640061(0) ack 601928730 win 4096
  611.     ## The attacker rewrites the packet sent by the server containing the skey challenge
  612. 11:25:44.495629 198.108.3.13.23 > 35.42.1.146.1098: P 1544576064:1544576082(18) 
  613.         ack 896896029 win 1000 s / k e y   7 0   c n 3 3 2 8 7 /M /J
  614. 11:25:44.502533 198.108.3.13.23 > 35.42.1.146.1098: P 1544576082:1544576109(27) 
  615.         ack 896896029 win 1000 ( s / k e y   r e q u i r e d ) /M /J P a s s w o r d :
  616. 11:25:44.522500 35.42.1.146.1098 > 198.108.3.13.23: . 896896029:896896029(0) ack 1544576109 win 4096
  617. [...
  618. 11:25:44.558320 198.108.3.13.23 > 35.42.1.146.1098: . 1544640109:1544640109(0) ack 601928733 win 4096
  619.     ## Beginning of the skey password sent by the user (client)
  620. 11:25:57.356323 35.42.1.146.1098 > 198.108.3.13.23: P 896896029:896896030(1) 
  621.         ack 1544576109 win 4096 T
  622. 11:25:57.358220 198.108.3.13.23 > 35.42.1.146.1098: . 1544640109:1544640109(0) ack 601928733 win 4096
  623. [...
  624. 11:25:57.412103 198.108.3.13.23 > 35.42.1.146.1098: . 1544640109:1544640109(0) ack 601928733 win 4096
  625.     ## Echo of the beginning of the skey password sent by the server
  626. 11:25:57.412456 35.42.1.146.1098 > 198.108.3.13.23: P 601928733:601928734(1) 
  627.         ack 1544640109 win 1000 T
  628. 11:25:57.412681 35.42.1.146.1098 > 198.108.3.13.23: . 896896030:896896030(0) ack 1544576109 win 4096
  629. [...
  630. 11:25:57.800953 198.108.3.13.23 > 35.42.1.146.1098: . 1544640109:1544640109(0) ack 601928734 win 4096
  631.     ## The attacker rewrites the skey password packet
  632. 11:25:57.801254 35.42.1.146.1098 > 198.108.3.13.23: P 601928734:601928762(28) 
  633.         ack 1544640109 win 1000 A U T   S H I M   L O F T   V A S E   M O O   R I D /M /@
  634. 11:25:57.801486 35.42.1.146.1098 > 198.108.3.13.23: . 896896058:896896058(0) ack 1544576109 win 4096
  635. [...
  636. 11:25:58.358275 35.42.1.146.1098 > 198.108.3.13.23: . 896896058:896896058(0) ack 1544576109 win 4096
  637. 11:25:58.360109 198.108.3.13.23 > 35.42.1.146.1098: P 1544640263:1544640278(15) 
  638.         ack 601928762 win 4096 ( l p j @ _ r a d b :   1 )  
  639. 11:25:58.360418 35.42.1.146.1098 > 198.108.3.13.23: . 896896058:896896058(0) ack 1544576109 win 4096
  640. [...
  641. 11:26:00.919976 35.42.1.146.1098 > 198.108.3.13.23: . 896896058:896896058(0) ack 1544576278 win 4096
  642.     ## The 'p' of the 'pwd' command typed by the user.
  643. 11:26:01.637187 35.42.1.146.1098 > 198.108.3.13.23: P 896896058:896896059(1) 
  644.         ack 1544576278 win 4096 p
  645. 11:26:01.638832 198.108.3.13.23 > 35.42.1.146.1098: . 1544640278:1544640278(0) ack 601928762 win 4096
  646. [...
  647. 11:26:03.183200 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ack 1544576280 win 4096
  648. 11:26:03.921272 35.42.1.146.1098 > 198.108.3.13.23: P 896896060:896896063(3) 
  649.         ack 1544576280 win 4096 d /M /@
  650. 11:26:03.922886 198.108.3.13.23 > 35.42.1.146.1098: . 1544640283:1544640283(0) ack 601928767 win 4096
  651. [...
  652. 11:26:04.339186 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ack 1544576280 win 4096
  653. 11:26:04.340635 198.108.3.13.23 > 35.42.1.146.1098: P 1544640288:1544640307(19) 
  654.         ack 601928770 win 4096 M a i l / /I /I m b o x /I /I s r c / /M /J
  655. 11:26:04.342872 198.108.3.13.23 > 35.42.1.146.1098: P 1544640307:1544640335(28) 
  656.         ack 601928770 win 4096 e l m * /I /I r e s i z e * /I /I t r a c e r o u t e * /M
  657.  /J
  658. 11:26:04.345480 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ack 1544576280 win 4096
  659. 11:26:04.346791 198.108.3.13.23 > 35.42.1.146.1098: P 1544640335:1544640351(16) 
  660.         ack 601928770 win 4096 / u s r / u s e r s / l p j /M /J
  661. 11:26:04.347094 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ack 1544576280 win 4096
  662. 11:26:04.348402 198.108.3.13.23 > 35.42.1.146.1098: P 1544640351:1544640366(15) 
  663.         ack 601928770 win 4096 ( l p j @ _ r a d b :   2 )  
  664. 11:26:04.378571 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ack 1544576280 win 4096
  665. [...
  666. 11:26:09.791045 35.42.1.146.1098 > 198.108.3.13.23: P 601928773:601928775(2) 
  667.         ack 1544640369 win 1000 t o
  668. 11:26:09.794653 198.108.3.13.23 > 35.42.1.146.1098: P 1544640369:1544640371(2) 
  669.         ack 601928775 win 4096 t o
  670. 11:26:09.794885 35.42.1.146.1098 > 198.108.3.13.23: . 896896068:896896068(0) ack 1544576366 win 4096
  671. [...
  672. 11:26:12.420397 35.42.1.146.1098 > 198.108.3.13.23: P 896896068:896896072(4) 
  673.         ack 1544576368 win 4096 r y /M /@
  674. 11:26:12.422242 198.108.3.13.23 > 35.42.1.146.1098: . 1544640371:1544640371(0) ack 601928775 win 4096
  675. [...
  676. 11:26:12.440765 35.42.1.146.1098 > 198.108.3.13.23: . 896896072:896896072(0) ack 1544576368 win 4096
  677.     ## The 'ry' of the 'history' command sent by the client
  678. 11:26:16.420287 35.42.1.146.1098 > 198.108.3.13.23: P 896896068:896896072(4) 
  679.         ack 1544576368 win 4096 r y /M /@
  680. 11:26:16.421801 198.108.3.13.23 > 35.42.1.146.1098: . 1544640371:1544640371(0) ack 601928775 win 4096
  681. [...
  682. 11:26:16.483943 35.42.1.146.1098 > 198.108.3.13.23: . 896896072:896896072(0) ack 1544576368 win 4096
  683.     ## The same packet rewritten by the attacker.
  684. 11:26:16.505773 35.42.1.146.1098 > 198.108.3.13.23: P 601928775:601928779(4) 
  685.         ack 1544640371 win 1000 r y /M /@
  686.     ## answer to the history command sent by the server. We can notice the 'ls ;' inclusion
  687.     ## before the 'pwd'
  688. 11:26:16.514225 198.108.3.13.23 > 35.42.1.146.1098: P 1544640371:1544640437(66) 
  689.         ack 601928779 win 4096 r y /M /@ /M /J           1 /I 1 1 : 2 8 /I l s   ;   p w 
  690.         d /M /J           2 /I 1 1 : 2 8 /I /@ /@ /@ L /@ /@ /@ T . 220 167 168 /@ /G
  691.        /@ /@ /@ /X /@ /H 137 148 /@ /@
  692. 11:26:16.514465 35.42.1.146.1098 > 198.108.3.13.23: . 896896072:896896072(0) ack 1544576368 win 4096
  693. [...
  694. 11:26:16.575344 35.42.1.146.1098 > 198.108.3.13.23: . 896896072:896896072(0) ack 1544576368 win 4096
  695.     ## The same packet rewritten by the attacker.
  696. 11:26:16.577183 198.108.3.13.23 > 35.42.1.146.1098: P 1544576368:1544576434(66) 
  697.         ack 896896072 win 1000 r y /M /@ /M /J           1 /I 1 1 : 2 8 /I l s   ;   p w 
  698. d /M /J           2 /I 1 1 : 2 8 /I /@ /@ /@ L /@ /@ /@ T . 220 167 168 /@ /H /@ /@ /@
  699.         /X /@ /H 137 148 /@ /@
  700. 11:26:16.577490 198.108.3.13.23 > 35.42.1.146.1098: . 1544640437:1544640437(0) ack 601928779 win 4096
  701. [...
  702.     ## The user log out.
  703. 11:26:20.236907 35.42.1.146.1098 > 198.108.3.13.23: P 601928781:601928782(1) ack 1544640437 win 1000 g
  704. 11:26:20.247288 198.108.3.13.23 > 35.42.1.146.1098: . 1544576438:1544576438(0) ack 896896074 win 1000
  705. 11:26:20.253500 198.108.3.13.23 > 35.42.1.146.1098: P 1544576435:1544576436(1) ack 896896074 win 1000 o
  706. 11:26:20.287513 198.108.3.13.23 > 35.42.1.146.1098: P 1544640439:1544640440(1) ack 601928782 win 4096 g
  707. 11:26:20.287942 35.42.1.146.1098 > 198.108.3.13.23: P 896896075:896896076(1) ack 1544576436 win 4096 o
  708. 11:26:20.289312 198.108.3.13.23 > 35.42.1.146.1098: . 1544640440:1544640440(0) ack 601928782 win 4096
  709. 11:26:20.289620 35.42.1.146.1098 > 198.108.3.13.23: . 896896076:896896076(0) ack 1544576436 win 4096
  710.  
  711.     Almost all of the packets with the ACK flag set but with no
  712. data are acknowledgement of unacceptable packets. A lot of
  713. retransmission occurs due to the load on the network and on the
  714. attacker host created by the ACK storm. The real log (including all ACK
  715. packets) is about 3000 lines long whereas the one shown here has been
  716. stripped to about 100 lines. A lot of packets have also been lost and do
  717. not show up in this log. The data collected during the test shows that
  718. one real packet sent can generate between 10 and 300 empty Ack
  719. packets.  Those numbers are of course highly variable.
  720.  
  721. 5. Detection and Side Effects
  722.  
  723.     Several flaws of that attack can be used to detect it. Three will
  724. be described here but one can imagine some other ways to detect the intrusion.
  725.  
  726.  
  727.  - Desynchronized state detection.  By comparing the sequence
  728. numbers of both ends of the connection the user can tell if the
  729. connection is in the desynchronized state. This method is feasible if
  730. we assume that the sequence numbers can be transmitted through the TCP
  731. stream without being compromised (changed) by the attacker.
  732.  
  733.               Local Ethernet             Transit Ethernet
  734. Total TCP/s             80-100   (60-80)                1400  (87) 
  735. Total Ack               25-75    (25-45)                500   (35) 
  736. Total Telnet            10-20    (10-25)                140   (10) 
  737. Total Telnet Ack        5-10     (45-55)                45    (33)
  738.  
  739.     Table 1: Percentage of ACK packets without the attack.
  740.  
  741.  - Ack storm detection.
  742.     Some statistics on the TCP traffic conducted on our local
  743. ethernet segment outside the attack show that the average ratio of ACK
  744. without data packets per total telnet packets is around 45%. On a more
  745. loaded transit ethernet the average is about 33% (C.f Table 1)
  746.  
  747.     The total number of TCP packets as well as the total number of
  748. ACK and telnet packets fluctuate a lot on the local ethernet. The table shows
  749. the limits. The percentage of ACK telnet packets is very stable, around 45%.
  750. This can be explained by the fact that the telnet session is an interactive
  751. session and every character typed by the user must be echoed and acknowledged.
  752. The volume of exchanged data is very small each packet usually contains one
  753. character or one text line.
  754.  
  755.     The data for the transit ethernet is very consistent. Due to the
  756. high load on that segment a few packets may have been dropped by the
  757. collecting host.
  758.  
  759.     When the attack is conducted some of these figures change. The
  760. next table shows the results for two types of session. The data has been
  761. collected on the local ethernet only.
  762.  
  763.     In Table 2 the `Local connection' is a
  764. session with a host at a few IP hops from the client. The Round Trip
  765. Delay (RTD) is approximately 3ms and the actual number of hops is 4.
  766. The 'Remote connection' is a session with a RTD of about 40ms and 9
  767. hops away. In the first case the attack is clearly visible. Even if
  768. it's very fluctuant, the percentage of TCP ACK is near 100%. Almost
  769. all of the traffic is acknowledgement packets.
  770.  
  771.     In the second case the detection of the attack is less obvious.
  772. The data has to be compared with the first column of
  773. Table 1 (local traffic).  The percentage of TCP ACK
  774. slightly increases but not significantly.  One can explain this result
  775. by the long RTD which decreases the rate of ACK packets sent. The
  776. underlying network is also used to experience between a 5% and 10%
  777. packet loss which helps in breaking the ACK loop.
  778.  
  779.               Local connection    Remote connection
  780. Total Telnet               80-400  (60-85)           30-40  (30-35)   
  781. Total Telnet Ack           75-400  (90-99)           20-25  (60-65)
  782.  
  783.     Percentage of ACK packets during an attack.
  784.  
  785.      - Increase of the packet loss and retransmission for that
  786. particular session. Though no data is available to enlighten us on that
  787. behavior the log produced during the attack shows an unusually high
  788. level of packet loss and so retransmission. Therefore this implies a
  789. deterioration of the response time for the user. The packet loss
  790. increase is caused by:
  791.     
  792.      - The extra load of the network due to the ACK storms.
  793.      - The packet dropped by the sniffer of the attacker. The drops tend
  794.     to increase as the load on the network increases.
  795.  
  796.  - Some unexpected connection reset.
  797. The following behavior has not been fully investigated since the
  798. attacker program developed was to try the validity of the concept more
  799. than making the attack transparent to the client and server. These are
  800. likely to disappear with a more sophisticated attacker program. The user
  801. can experience a connection reset of its session at the early stage of
  802. the connection if the protocol of the attack is not correctly executed.
  803. A loss of the attacker's RST or SYN packets may leave the server side of the
  804. connection in a undefined state (usually CLOSED or SYN-RECEIVED) and 
  805. may make the client packets acceptable. About 10% of the attacks performed
  806. were unsuccessful, ending either by a connection close (very visible)
  807. or a non-desynchronized connection (the attacker failed to redirect
  808. the stream).
  809.  
  810. Some side effects and notes about TCP and the attack.
  811.  
  812.      - TCP implementation.
  813.     The desynchronization process described here failed on certain
  814. TCP implementations. According to [rfc793] a RST packet is not
  815. acknowledged and just destroys the TCB. Some TCP implementations do
  816. when in a certain state acknowledge the RST packet by sending back a
  817. RST packet. When the attacker sends the RST packet to the server the
  818. RST is sent back to the client which closes its connection and ends the
  819. session. Other desynchronization mechanisms may be investigated which
  820. do not reset the connection.
  821.      - The client and the attacker were always on the same
  822. ethernet segment when performing the test. This makes the attack more
  823. difficult to run because of a high load on that segment. The collision
  824. rate increases and the attacker's sniffer buffer are overflowed by the
  825. traffic.
  826.      - One can think of just watching the session and
  827. sending some data to the server, without caring about creating the
  828. desynchronized state and forwarding the TCP packets. Though it will
  829. succeed in corrupting the host that approach is likely to be detected early
  830. by the user. Indeed the TCP session will not be able to exchange data
  831. once the command sent.
  832.  
  833. 6. Prevention
  834.     The only ways known by the writer currently available to prevent
  835. such an attack on a telnet session are the encrypted Kerberos scheme
  836. (application layer) or the TCP crypt implementation
  837. [TCPcrypt] (TCP layer).  Encryption of the data flow prevents any
  838. intrusion or modification of the content. Signature of the data can
  839. also be used. [pgp] is an example of an available way to secure
  840. electronic mail transmission.
  841.  
  842. 7. Morris' Attack Reviewed
  843.  
  844.     Morris' attack as described in [morris85] assumes that
  845. the attacker can predict the next initial sequence number used by the server
  846. (noted SVR_SEQ_0 in this document) and that the identification scheme is
  847. based on trusted hosts (which means only certain hosts are allowed
  848. to perform some commands on the server without any other identification
  849. process being needed).
  850.  
  851.      In this attack the cracker initiates the session
  852. by sending a SYN packet to the server using the client (trusted host)
  853. as the source address. The server acknowledge the SYN with a SYN/ACK
  854. packet with SEG_SEQ = SVR_SEQ_0. The attacker then acknowledges that packet
  855. in guessing SVR_SEQ_0. The cracker does not need to sniff the client packets
  856. as long as he can predict SVR_SEQ_0 in order to acknowledge it. This
  857. attack has two main flaws:
  858.  
  859.  - The client whom the attacker masquerades will receive the SYN/ACK packet
  860. from the server and then could generate a RST packet to the server
  861. since in the client's view no session yet exists. Morris supposes that
  862. one can stop the RST generation by either performing the attack when the
  863. client is down or by overflowing the client's TCP queue so the SYN/ACK
  864. packet will be lost.
  865.  - The attacker cannot receive data from the server. But he can send
  866. data which is sometime enough to compromise a host.
  867.  
  868.     The are four principal differences between Morris' attack and
  869. the present one:
  870.  
  871.  - Morris's relies on the trusted hosts identification scheme whereas
  872. the present attack lets the user conduct the identification stage of the
  873. connection.
  874.  - The present attack is a full duplex TCP stream. The attacker can
  875. send and receive data.
  876.  - The present attack uses the ethernet sniffer to predict (or just get)
  877. SVR_SEQ_0.
  878.  - The present attack can be used against any kind of host besides
  879. Unix hosts.
  880.  
  881.     Morris' attack can easily be extented in regard of the present attack:
  882.  
  883.  - The sniffer is used to get the server's initial sequence number. Morris'
  884. attack can then be performed against the server. The attacker do not need
  885. to wait for a client to connect.
  886.  - Considering that the client will not send RST packets (for example it is
  887. down) the attacker can establish a full duplex TCP connection
  888. with the server. It can send data and receive data on behalf of the client.
  889. Of course the cracker still has to pass the identification barrier. If the
  890. identification is based on trusted hosts (like NFS or rlogin)
  891. the cracker has full access to the host's services.
  892.  
  893.     Steven M. Bellovin in [bellovin89] also presents how ICMP 
  894. packets can be used to disable one side of the connection. In this case
  895. the attacker gets full control of the session (people have referred
  896. to 'TCP session hijacking'), but this is too easily detected by the user.
  897.  
  898. 8. Conclusion
  899.  
  900.     Although easy to detect when used on a local network, the attack
  901. presented here is quite efficient on long distance, low bandwidth, high
  902. delay networks (usually WAN). It can be carried with the same resources as
  903. for a passive sniffing attack which have occurred so frequently on the Internet.
  904. This attack has also the dangerous advantage of being invisible to the user.
  905. While cracking into a host on the Internet is becoming more and more
  906. frequent, the stealthfulness of the attack is now a very important
  907. parameter for the success of the attack and makes it more difficult to
  908. detect.
  909.  
  910.     When everybody's attention in the Internet is focused on the
  911. emerging new IPv6 protocol to replace the current IPv4, increasing
  912. attacks and the need for secure systems press us to develop and use a
  913. secure transport layer for the Internet community. Options should be
  914. available to send signed and eventually encrypted data  to provide
  915. privacy. And since the signature of the data implies reliability the
  916. signature can be substituted to the current TCP checksum.
  917.  
  918.     This paper does not attempt to explain all cases
  919. of active attacks using a sniffer. It is more a warning for people using
  920. s/key or Kerberos against the danger of someone sniffing the ethernet.
  921. It provides a few ideas and starting points which can be more deeply studied.
  922. The method presented has been successfully used during our test even with
  923. a very simple attacker's software.
  924.  
  925. [Bellovin89] "Security Problems in the TCP/IP
  926.     Protocol Suite", Bellovin, S., Computer Communications Review,
  927.     April 1989.
  928.  
  929. [Kerberos] "Kerberos: An Authentication Service for
  930.     Open Network Systems", Steiner, J., Neuman, C., Schiller, J.,
  931.     USENIX Conference Proceeding, Dallas, Texas, February 1989.
  932.  
  933. [Morris85] "A Weakness in the 4.2BSD UNIX TCP/IP
  934.     Software", Morris, R., Computing Science Technical Report No 117,
  935.     ATT Bell Laboratories, Murray Hill, New Jersey, 1985.
  936.  
  937. [PGP] Pretty Good Privacy Version 2.6.1, Philip
  938.     Zimmermann, August 1994.
  939.  
  940. [RFC 793] Request For Comment 793,
  941.     ``Transmission Control Protocol'', September 1981, J. Postel.
  942.  
  943. [RFC 854] Request For Comment 854,
  944.     ``Telnet Protocol Specification'', May 1983, J. Postel,
  945.     J. Reynolds
  946.  
  947. [SKEY] "The S/Key One-time Password System", Haller, N.,
  948.     Proceeding of the Symposium on Network Distributed Systems,
  949.     Security, Internet Society, San Diego, CA, February 1994.
  950.  
  951. [TCPcrypt] "Public Key Encryption Support for TCP",
  952.     Joncheray, L., Work in progress, May 1995.
  953.  
  954. [TCPDUMP] tcpdump(8) Version 2.2.1, Van Jacobson,
  955.     Craig Leres, Steven Berkeley, University of California, Berkeley, CA.
  956.