Network Working Group R. Stewart Internet-Draft Cisco Systems, Inc. Expires: March 17, 2005 M. Tuexen Univ. of Applied Sciences Muenster G. Camarillo Ericsson September 16, 2004 Stream Control Transmission Protocol (SCTP) Security Threats draft-stewart-tsvwg-sctpthreat-01.txt Status of this Memo This document is an Internet-Draft and is subject to all provisions of section 3 of RFC 3667. By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she become aware will be disclosed, in accordance with RFC 3668. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on March 17, 2005. Copyright Notice Copyright (C) The Internet Society (2004). Abstract Stream Control Transmission Protocol RFC2960 [2] is a multi-homed transport protocol. As such, unique security threats exists that are addressed in various ways within the protocol itself. This document attempts to detail the known security threats and there Stewart, et al. Expires March 17, 2005 [Page 1] Internet-Draft SCTP Security Threats September 2004 countermeasures as detailed in the current version of the SCTP Implementors guide (SCTP-IG). It is hoped that this information will provide some useful background information for many of the newest requirements spelled out in the SCTP-IG. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Address Camping or stealing . . . . . . . . . . . . . . . . . 4 2.1 Attack details . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Errata . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Counter measure . . . . . . . . . . . . . . . . . . . . . 5 3. Association hijacking 1 . . . . . . . . . . . . . . . . . . . 6 3.1 Attack details . . . . . . . . . . . . . . . . . . . . . . 6 3.2 Errata . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3 Counter measure . . . . . . . . . . . . . . . . . . . . . 7 4. Association hijacking 2 . . . . . . . . . . . . . . . . . . . 8 4.1 Attack details . . . . . . . . . . . . . . . . . . . . . . 8 4.2 Errata . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.3 Counter measure . . . . . . . . . . . . . . . . . . . . . 8 5. Bombing attack (amplification) 1 . . . . . . . . . . . . . . . 9 5.1 Attack details . . . . . . . . . . . . . . . . . . . . . . 9 5.2 Errata . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5.3 Counter measure . . . . . . . . . . . . . . . . . . . . . 9 6. Bombing attack (amplification) 2 . . . . . . . . . . . . . . . 11 6.1 Attack details . . . . . . . . . . . . . . . . . . . . . . 11 6.2 Errata . . . . . . . . . . . . . . . . . . . . . . . . . . 11 6.3 Counter measure . . . . . . . . . . . . . . . . . . . . . 11 7. Association redirection . . . . . . . . . . . . . . . . . . . 12 7.1 Attack details . . . . . . . . . . . . . . . . . . . . . . 12 7.2 Errata . . . . . . . . . . . . . . . . . . . . . . . . . . 12 7.3 Counter measure . . . . . . . . . . . . . . . . . . . . . 12 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 12 Intellectual Property and Copyright Statements . . . . . . . . 14 Stewart, et al. Expires March 17, 2005 [Page 2] Internet-Draft SCTP Security Threats September 2004 1. Introduction Stream Control Transmission Protocol RFC2960 [2] is a multi-homed transport protocol. As such, unique security threats exists that are addressed in various ways within the protocol itself. This document attempts to detail the known security threats and there countermeasures as detailed in the current version of the SCTP Implementors guide (SCTP-IG). It is hoped that this information will provide some useful background information for many of the newest requirements spelled out in the SCTP-IG. This work and some of the changes that went into the tenth version of the SCTP-IG are much indebted to the paper on potential SCTP security risks Effects [1] by Aura, Nikander and Camarillo. Without there work some of these changes would remain undocumented and potential threats. The rest of this document will concentrate on the various attacks that were illustrated in Effects [1] and detail what preventative measures are now in place within the current SCTP standards (if any). Stewart, et al. Expires March 17, 2005 [Page 3] Internet-Draft SCTP Security Threats September 2004 2. Address Camping or stealing This attack is a form of denial of service attack crafted around SCTP's multi-homing. In effect an illegitimate endpoint connects to a server and "camps upon" or holds up a valid peers address. This is done to prevent the legitimate peer from communicating with the server. 2.1 Attack details +----------+ +----------+ +----------+ | Evil | | Server | | Client | | IP-A=+------------+=IP-X & Y=+-----------+=IP-C & D | | Attacker | | | | Victim | +----------+ +----------+ +----------+ Figure 1: Camping Consider the scenario illustrated in Figure 1. The attacker legitimately holds IP-A and wishes to prevent the 'Client-Victim' from communication with the 'Server'. Note also that both the client and server are multi-homed. The attacker first guesses the port number our client uses in its association attempt. It then uses this port and sets up an association with the server listing not only IP-A but also IP-C as well in its initial INIT chunk. The server will respond and setup the association noting that the attacker is multi-homed holding both IP-A and IP-C. Next the victim sends in an INIT message listing its two valid addresses IP-C and IP-D. In response it will receive an ABORT message with possibly an error code indicating that a new address was added in its attempt to setup an existing association (a restart with new addresses). At this point 'Client-Victim' is now prevented from setting up an association with the server until the server realizes that the attacker does not hold the address IP-C at some future point. 2.2 Errata This particular attack was discussed in detail on the SCTP implementors list in March of 2003. Out of that discussion changes were made in the BSD implementation that are now present in the SCTP-IG. In closely examination this attack depends on a number of specific things to occur. Stewart, et al. Expires March 17, 2005 [Page 4] Internet-Draft SCTP Security Threats September 2004 1) The attacker must setup the association before the victim and must correctly guess the port number that the victim will use. If the victim uses any other port number the attack will fail. 2) SCTP's existing HEARTBEAT mechanism as defined in RFC2960 [2] will eventually catch this situation and abort the evil attackers association. This may take several seconds based on default HEARTBEAT timers but the attacker himself will lose any association. 3) If the victim is either not multi-homed, or the address set that it uses is completely camped upon by the attacker (in our example if the attacker had included IP-D in its INIT as well), then the client's INIT message would restart the attackers association destroying it. 2.3 Counter measure Version 10 of the SCTP-IG adds a new set of requirements to better counter this attack. In particular the HEARTBEAT mechanism was modified so that addresses unknown to an endpoint (i.e. presented in an INIT with no pre-knowledge given by the application) enter a new state called "UNCONFIRMED". During the time that any address is UNCONFIRMED and yet considered available, heartbeating will be done on those UNCONFIRMED addresses at an accelerated rate. This will lessen the time that an attacker can "camp" on an address. In particular the rate of heartbeats to UNCONFIRMED addresses is done every RTO. Along with this expanded rate of heartbeating, a new 64 bit random nonce is required to be inside HEARTBEATs to UNCONFIRMED addresses. In the HEARTBEAT-ACK the random nonce MUST match the value sent in the HEARTBEAT before an address can leave the UNCONFIRMED state. This will prevent an attacker from generating false HEARTBEAT-ACK's with the victims source address(es). Stewart, et al. Expires March 17, 2005 [Page 5] Internet-Draft SCTP Security Threats September 2004 3. Association hijacking 1 Association hijacking is the ability of some other user to assume the session created by another endpoint. In cases of a true man-in-the-middle only a strong end to end security model can prevent this. However with the addition of the ADD-IP extension to SCTP a endpoint that is NOT a man-in-the-middle may be able to assume another endpoints association. 3.1 Attack details The attack is made possible by any mechanism that lets an endpoint acquire some other IP address that was recently in use by an SCTP endpoint. For example in a moble network DHCP may be in use with short IP address lifetimes to reassign IP addresses to migrant hosts. IP-A DHCP-Server's Peer-Server | | 1 |-DHCP-Rel(IP-A)---->| 2 |------ASCONF(ADD-IP(IP-B), DEL-IP(IP-A)---->XXlost time | |-DHCP-new-net------>| 3 |<---Assign (IP-A) | 4 |<------------Tag:X-DATA()------------------ | |-------------INIT()------------------------> 5 |<------------INIT-ACK()--------------------- | 6 |----ASCONF(ADD-IP(IP-Z),DEL-IP(IP-A))------> Figure 2: Association Hijack via DHCP At point 1, our valid client releases the IP address IP-A. It presumably acquires a new address (IP-B) and sends an ASCONF to ADD the new address and delete to old address at point 2, but this packet is lost. Thus our peer (Peer-Server) has no idea that the former peer is no longer at IP-A. Now at point 3 a new "evil" peer DHCP's an address and happens to get the re-assigned address IP-A. Our Peer-Server sends a chunk of DATA at point 4. This reveals to the new owner of IP-A that the former owner of IP-A had an association with Peer-Server. So at point 5 the new owner of IP-A sends an INIT. The INIT-ACK is sent back and inside it is a COOKIE. The cookie would of course hold tie-tags which would list both sets of tags Stewart, et al. Expires March 17, 2005 [Page 6] Internet-Draft SCTP Security Threats September 2004 which could then be used at point 6 to add in any other IP addresses that the owner of IP-A holds and thus acquire the association. 3.2 Errata This attack depends on a number of events: 1) Both endpoints must support the ADD-IP extension. 2) One of the endpoints must be using the ADD-IP extension for mobility. 3) The IP address must be acquired in such a way as to make the endpoint the owner of that IP address as far as the network is concerned. 4) The true peer must not get the ASCONF packet that deletes IP-A and adds its new address to the peer before the new "evil" peer gets control of the association. 5) The new "evil" peer must have an alternative address besides IP-A that it can add to the association so it can delete IP-A preventing the real peer from re-acquiring the association when it finally retransmits the ASCONF (from step 2). 3.3 Counter measure The latest SCTP-IG adds a new counter measure to this threat. It is now required that Tie-Tags in the State-Cookie parameter not be the actual tags. Instead a new set of two 32 bit nonce must be used to represent the real tags within the association. This prevents the attacker from acquiring the real tags and thus prevents this attack. Stewart, et al. Expires March 17, 2005 [Page 7] Internet-Draft SCTP Security Threats September 2004 4. Association hijacking 2 Association hijacking is the ability of some other user to assume the session created by another endpoint. In cases where an attacker can take over an IP-address he can easily restart the association. If the peer does not pay attention to the restart notification the attacker has taken over the association. 4.1 Attack details Assume that an endpoint E1 having an IP-address A has an SCTP association with endpoint E2. After the attacker has taken over the IP-address A he waits for a packet from E2. After reception of the packet the attacker can perform a full four way handshake using the the IP-addresses and port numbers from the received packet. E2 will consider this as a restart of the association. If and only if the SCTP user of E2 does not process the restart notification the user will not recognize that that association just restarted. From his perspective the association has been hijacked. 4.2 Errata This attack depends on a number of circumstances: 1) The IP address must be acquired in such a way as to make the evil endpoint the owner of that IP address as far as the network or local lan is concerned. 2) The attacker must receive a packet belonging to the association or connection. 3) The other endpoints user does not pay attention to restart notifications. 4.3 Counter measure It is important to note that this attack is not based on a weakness of the protocol but on the ignorance of the upper layer. This attack is not possible if the upper layer processes the restart notifications provided by SCTP. Note that other IP protocols may also be effected by this attack. Stewart, et al. Expires March 17, 2005 [Page 8] Internet-Draft SCTP Security Threats September 2004 5. Bombing attack (amplification) 1 The bombing attack is a method to get a server to amplify packets to an innocent victim. 5.1 Attack details This attack is performed by setting up an association with a peer and listing the victims IP address in the INIT's list of addresses. After the association is setup, the attacker makes a request for a large data transfer. After making the request the attacker does not acknowledge data sent to it. This then causes the server to re-transmit the data to the alternate address i.e. that of the victim. After waiting an appropriate time period the attacker acknowledges the data for the victim. At some point the attackers address is considered unreachable since only data sent to the victims address is acknowledged. At this point the attacker can send strategic acknowledgments so that the server continues to send data to the victim. 5.2 Errata This attack depends on a number of circumstances: 1) The victim must NOT support SCTP, otherwise it would respond with an OOTB abort. 2) The attacker must time its sending of acknowledgments correctly in order to get its address into the failed state and the victims address as the only valid alternative. 3) The attacker must guess TSN values that are accepted by the receiver once the bombing begins since it must acknowledge packets it no longer is seeing. 5.3 Counter measure The current SCTP-IG makes two changes to prevent this attack. First it details out proper handling of ICMP messages. With SCTP the ICMP messages provide valuable clues to the SCTP stack that can be verified with the tags for authenticity. Proper handling of an ICMP protocol unreachable (or equivalent) would cause the association setup by the attacker to be immediately failed upon the first retransmission to the victims address. The second change made in the newest SCTP-IG is the requirement that no address that is not CONFIRMED is allowed to have DATA chunks sent to it. This prevents the switch-over to the alternate address from occurring even when ICMP messages are lost in the network and prevents any DATA chunks from being sent to any other destination Stewart, et al. Expires March 17, 2005 [Page 9] Internet-Draft SCTP Security Threats September 2004 other then the attacker itself. An SCTP implementation should abort the association if it receives a SACK acknowledging a TSN which has not been sent. This makes TSN guessing for the attacker quite hard because if the attacker acknowledges one TSN too fast the association will be aborted. Stewart, et al. Expires March 17, 2005 [Page 10] Internet-Draft SCTP Security Threats September 2004 6. Bombing attack (amplification) 2 This attack allows an attacker to use an arbitrary SCTP endpoint to send multiple packets to a victim in response to one packet. 6.1 Attack details The attacker sends an INIT listing multiple IP addresses of the victim in the INIT's list of addresses to an arbitrary endpoint. Optionally it request a long cookie life time. Upon reception of the INIT-ACK it stores the cookie and sends it back to the other endpoint. When the other endpoint receives the COOKIE it will send back a COOKIE-ACK to the attacker and up to Max.Burst HEARTBEATS to the victim('s) (to confirm addresses). The victim responds with ABORTs or ICMP messages resulting in the removal of the TCB at the other endpoint. The attacker can now resend the stored cookie as long as it is valid and this will again result in up to Max.Burst HEARTBEATs sent to the victim('s). 6.2 Errata The multiplication factor is limited by the number of addresses of the victim and of the end point Max.Burst. Also the shorter the cookie life time is, the earlier the attacker has to go through the initial stage of sending an INIT instead of the just sending the COOKIE. It should also be noted that the attack is more effective if large HEARTBEATs are used for path confirmation. 6.3 Counter measure To limit the effectiveness of this attack and end point should 1) not allow very large cookie lifetimes, even if they are requested. 2) not use larger Max.Burst parameter values than recommended or alternatively only send one CONFIRMATION Heartbeat per RTT. Note that an endpoint may decide to send only one Heartbeat per RTT instead of the maximum (i.e. Max.Burst). An endpoint that chooses this approach will however slow down detection of endpoints camping on valid addresses. 3) not use large HEARTBEATs for path confirmation. Stewart, et al. Expires March 17, 2005 [Page 11] Internet-Draft SCTP Security Threats September 2004 7. Association redirection This attack allows an attacker to mis-setup an association to a different endpoint. 7.1 Attack details The attacker sends an INIT sourced from port 'X' and directed towards port 'Y'. When the INIT-ACK is returned the attacker sends the COOKIE-ECHO chunk and either places a different destination or source port in the SCTP common header i.e. X+1 or Y+1. This then set's up the association with possibly other endpoints. 7.2 Errata This attack depends on the failure of an SCTP implementation to store and verify the ports within the COOKIE structure. 7.3 Counter measure This attack is easily defeated by an implementation including the ports of both the source and destination within the COOKIE. When the COOKIE is returned if the source and destination ports do not match those within the COOKIE chunk, the SCTP implementation silently discards the invalid COOKIE. 8 References [1] Aura, T., Nikander, P. and G. Camarillo, "Effects of Mobility and Multihoming on Transport-Layer Security", December 2003. [2] Stewart, R., Xie, Q., Morneault, K., Sharp, C., Schwarzbauer, H., Taylor, T., Rytina, I., Kalla, M., Zhang, L. and V. Paxson, "Stream Control Transmission Protocol", RFC 2960, October 2000. Authors' Addresses Randall R. Stewart Cisco Systems, Inc. 4785 Forest Drive Suite 200 Colubmia, SC 29206 USA Phone: +1-815-477-2127 EMail: rrs@cisco.com Stewart, et al. Expires March 17, 2005 [Page 12] Internet-Draft SCTP Security Threats September 2004 Michael Tuexen Univ. of Applied Sciences Muenster Stegerwaldstr. 39 48565 Steinfurt Germany EMail: tuexen@fh-muenster.de Gonzalo Camarillo Ericsson Hirsalantie 11 Jorvas 02420 Finland EMail: Gonzalo.Camarillo@ericsson.com Stewart, et al. Expires March 17, 2005 [Page 13] Internet-Draft SCTP Security Threats September 2004 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Copyright Statement Copyright (C) The Internet Society (2004). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Stewart, et al. Expires March 17, 2005 [Page 14]