RFC 5062
Security Attacks Found Against the Stream Control Transmission Protocol (SCTP) and Current Countermeasures
RFC 5062 π Security Attacks Found Against SCTP and Current Countermeasures π¦
RFC 5062 is titled Security Attacks Found Against the Stream Control Transmission Protocol (SCTP) and Current Countermeasures β¨. It was written by R. Stewart (Cisco Systems, Inc.), M. Tuexen (Muenster Univ. of Applied Sciences), and G. Camarillo (Ericsson) π. It's Informational and dated September 2007 πΈ. The header doesn't list anything it obsoletes or updates, so it's a standalone explainer π.
Status of This Memo β¨
This memo is for the Internet community to read as information π. It is not an Internet standard of any kind π ββοΈ. You can distribute it as much as you want, since distribution is unlimited π.
Abstract π
Okay so this doc is all about the security threats that SCTP faces π. It also covers how to mitigate them, mostly by borrowing ideas from the SCTP Specification Errata and Issues memo (RFC 4460) π₯. Those ideas got folded into RFC 4960, which obsoletes RFC 2960 π . The hope is that this gives you background on a bunch of the newer requirements from RFC 4460 that landed in RFC 4960 π«Ά.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Address Camping or Stealing . . . . . . . . . . . . . . . . . 2
3. Association Hijacking 1 . . . . . . . . . . . . . . . . . . . 3
4. Association Hijacking 2 . . . . . . . . . . . . . . . . . . . 6
5. Bombing Attack (Amplification) 1 . . . . . . . . . . . . . . . 7
6. Bombing Attack (Amplification) 2 . . . . . . . . . . . . . . . 9
7. Association Redirection . . . . . . . . . . . . . . . . . . . 10
8. Bombing Attack (Amplification) 3 . . . . . . . . . . . . . . . 10
9. Bombing Attack (Amplification) 4 . . . . . . . . . . . . . . . 11
10. Bombing Attack (amplification) 5 . . . . . . . . . . . . . . . 11
11. Security Considerations . . . . . . . . . . . . . . . . . . . 12
12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1. Introduction π§
SCTP was originally defined in [RFC2960] and it's a multi-homed transport protocol π¦. Because of that, it has its own unique security threats, and the protocol itself handles them in different ways π. This document walks through those threats and the ways to mitigate them, mostly using techniques from the SCTP Specification Errata and Issues memo [RFC4460] πΈ. Those techniques are in [RFC4960], which obsoletes [RFC2960] β¨. Hopefully this gives you useful background on a lot of the newest requirements from [RFC4460] that ended up in [RFC4960] π.
This work, plus some of the changes that went into [RFC4460] and [RFC4960], owes a huge debt to the paper on potential SCTP security risks [EFFECTS] by Aura, Nikander, and Camarillo π. Without their work, some of these changes would still be undocumented, and the threats would still be just potential π.
The rest of this doc focuses on the attacks that [EFFECTS] laid out and explains the preventative measures that are in place now, if any, within the current SCTP standards π₯.
2. Address Camping or Stealing ποΈ
Okay this one is a denial of service attack that's built around SCTP's multi-homing π. Basically, an illegitimate endpoint connects to a server and "camps upon" or "holds up" a valid peer's address π€. The goal is to stop the legitimate peer from talking to the server at all π ββοΈ.
2.1. Attack Details π
+----------+ +----------+ +----------+
| Evil | | Server | | Client |
| IP-A=+------------+ +-----------+=IP-C & D |
| Attacker | | | | Victim |
+----------+ +----------+ +----------+
Figure 1: Camping
Look at Figure 1 π. The attacker legitimately holds IP-A and wants to stop the 'Client-Victim' from talking to the 'Server' π. Also, the client is multi-homed π. First, the attacker guesses the port number our client is going to use for its association attempt π―. Then it uses that port and sets up an association with the server, listing not only IP-A but also IP-C in its initial INIT chunk πͺ€. The server responds and sets up the association, and it notes that the attacker is multi-homed and holds both IP-A and IP-C π.
Next, the victim sends an INIT message listing its two valid addresses, IP-C and IP-D π¨. In response, it gets an ABORT message, possibly with an error code saying a new address was added while it was trying to set up an existing association (a restart with new addresses) π. At this point, 'Client-Victim' is stuck and can't set up an association with the server π₯². That stays true until the server realizes, at some future point, that the attacker doesn't actually hold the address IP-C, and it figures that out using a HEARTBEAT based mechanism π« . See the mitigation option subsection of this section π.
2.2. Analysis π§
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, and those changes are now present in [RFC4960] β¨. When you look closely, this attack depends on a number of specific things happening π.
- The attacker must set up 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 fails π.
- SCTP's existing HEARTBEAT mechanism, already defined in [RFC2960], will eventually catch this situation and abort the evil attacker's association π . It can take several seconds based on the default HEARTBEAT timers, but the attacker himself ends up losing the association anyway π.
- If the victim is either not multi-homed, or the address set 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 initiates an association between the client and the server while destroying the association between the attacker and the server π€―. From the server's point of view, this just looks like a restart of the association π.
2.3. Mitigation Option π‘οΈ
[RFC4960] adds a new set of requirements to better counter this attack πͺ. Specifically, the HEARTBEAT mechanism was changed 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" π. While any address is UNCONFIRMED and still considered available, heartbeating happens on those UNCONFIRMED addresses at an accelerated rate β‘. This shortens the time an attacker can "camp" on an address π. The rate of heartbeats to UNCONFIRMED addresses is every RTO π°οΈ. Along with this faster heartbeating, a new 64-bit random nonce is required inside HEARTBEATs sent 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 stops an attacker from generating fake HEARTBEAT-ACKs using the victim's source address(es) π«. Finally, clients that don't need a specific port number should pick their port numbers randomly π°. That makes it way harder for an attacker to guess the number π«Ά.
3. Association Hijacking 1 π
Association hijacking is when some other user manages to take over the session that another endpoint created π±. In cases of a true man-in-the-middle, only a strong end-to-end security model can stop this π. However, with the SCTP extension specified in [RFC5061] added, an endpoint that is NOT a man-in-the-middle may still be able to take over another endpoint's association π¬.
3.1. Attack Details π΅οΈββοΈ
The attack is possible through any mechanism that lets an endpoint grab an IP address that was recently used by an SCTP endpoint π£. For example, DHCP may be used in a mobile network 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 lets go of IP-A π. It presumably gets a new address (IP-B) and sends an ASCONF to add the new address and delete the old one at point 2, but that packet gets lost π. So our peer (Peer-Server) has no idea the former peer isn't at IP-A anymore π«₯. Now at point 3, a new "evil" peer gets an address via DHCP and happens to get the reassigned address IP-A π. Our Peer-Server sends a chunk of DATA at point 4 π. That DATA 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 comes back, and inside it is a COOKIE πͺ. The cookie of course holds tie-tags, which list both sets of tags, and those can then be used at point 6 to add any other IP addresses the owner of IP-A holds and thus take over the association π.
It's worth noting that this attack is possible in general whenever the attacker can send packets with source address IP-A and receive packets with destination address IP-A π‘.
3.2. Analysis π¬
This attack depends on a number of events π:
- Both endpoints must support the SCTP extension specified in [RFC5061].
- One of the endpoints must be using the SCTP extension for mobility specified in [RFC5061].
- 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.
- The true peer must not receive 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 β±οΈ.
- The new "evil" peer must have an alternate address, aside from IP-A, that it can add to the association, so it can delete IP-A. That stops the real peer from re-acquiring the association when it finally retransmits the ASCONF (from step 2) π ββοΈ.
3.3. Mitigation Option π
[RFC4960] adds a new countermeasure for this threat π§±. Tie-Tags in the State-Cookie parameter are now required to not be the actual tags π. Instead, a new pair of two 32-bit nonces must be used to represent the real tags within the association π². This keeps the attacker from getting the real tags, so the attack doesn't work π. On top of that, using the SCTP extension specified in [RFC5061] requires the authentication mechanism defined in [RFC4895] π. That means the attacker has to be able to capture the traffic during association setup π. If an endpoint-pair shared key is also used, then capturing or intercepting those setup messages doesn't let the attacker hijack the association π.
Part 1 of 3 π Part 2 picks up with Section 4 (Association Hijacking 2) π¦
4. Association Hijacking 2 β¨
Okay so association hijacking is when some other user manages to take over a session that another endpoint already made π³. If an attacker can send packets using the victim's IP address as the source, and can receive packets with the victim's address as the destination, the attacker can easily restart the association π. And if the peer doesn't pay attention to the restart notification, boom, the attacker has taken over the association π¦.
4.1. Attack Details
Picture this π: an endpoint E1 with IP address A has an SCTP association with endpoint E2. Once the attacker can receive packets sent to destination address A and send packets with source address A, it can run a full four-way handshake using the IP addresses and port numbers from the packet it received π. E2 will think this is a restart of the association. If and only if the SCTP user of E2 doesn't process the restart notification, the user won't realize the association just restarted. So from that point of view, the association has been hijacked π.
4.2. Analysis
This attack depends on a few things π :
- The IP address has to be acquired in a way that makes the evil endpoint the owner of that IP address, as far as the network or local LAN is concerned.
- The attacker has to receive a packet that belongs to the association or connection.
- The other endpoint's user doesn't pay attention to restart notifications.
4.3. Mitigation Option
Here's the important part π«Ά: this attack isn't based on a weakness in the protocol. It's based on the upper layer being oblivious π₯Ί. This attack is not possible if the upper layer processes the restart notifications that SCTP provides, as described in section 10 of [RFC2960] or [RFC4960]. Also, note that other IP protocols may be affected by this attack too π.
5. Bombing Attack (Amplification) 1 π₯
The bombing attack is a way to get a server to amplify packets toward an innocent victim π« .
5.1. Attack Details
So this attack works by setting up an association with a peer and listing the victim's IP address in the INIT's list of addresses π§. After the association is set up, the attacker asks for a large data transfer. Then the attacker just... doesn't acknowledge the data it's sent π. That makes the server retransmit the data to the alternate address, which is the victim's π¬.
After waiting an appropriate amount of time, the attacker acknowledges the data for the victim. Eventually the attacker's own address is considered unreachable, since only data sent to the victim's address is getting acknowledged π. At this point, the attacker can send strategic acknowledgments so the server keeps sending data to the victim π₯.
Alternatively, instead of stopping the SACKs to force a path failover, the attacker can use the ADD-IP extension to add the victim's address and make that address the primary path π.
5.2. Analysis
This attack depends on a few circumstances π :
- The victim MUST NOT support SCTP, otherwise it would respond with an "out of the blue" (OOTB) abort.
- The attacker has to time its acknowledgments perfectly, so that its own address gets into the failed state and the victim's address is the only valid alternative β°.
- The attacker has to guess TSN values that the receiver accepts once the bombing begins, since it has to acknowledge packets it is no longer seeing π.
5.3. Mitigation Option
[RFC4960] makes two changes to stop this attack π‘οΈ. First, it details proper handling of ICMP messages. With SCTP, ICMP messages give the SCTP stack valuable clues, which can be verified with the tags for authenticity π. Proper handling of an ICMP protocol unreachable (or equivalent) would make the association the attacker set up fail immediately upon the first retransmission to the victim's address π.
The second change in [RFC4960] is a requirement that no address that is not CONFIRMED is allowed to have DATA chunks sent to it. This stops the switch-over to the alternate address from happening, even when ICMP messages get lost in the network. It also stops DATA chunks from going to any destination other than the attacker itself π«. And it blocks the ADD-IP route of adding the new address and making it the primary address.
An SCTP implementation should abort the association if it receives a SACK acknowledging a TSN that hasn't been sent. This makes TSN guessing super hard for the attacker, because if it acknowledges one TSN too fast, the association gets aborted π€.
6. Bombing Attack (Amplification) 2 πΈ
This attack lets an attacker 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 to an arbitrary endpoint, listing multiple IP addresses of the victim in the INIT's list of addresses. Optionally, it requests a long cookie lifetime π§. When the INIT-ACK comes back, it stores the cookie and sends it back to the other endpoint. When the other endpoint receives the COOKIE, it sends a COOKIE-ACK back to the attacker and up to HB.Max.Burst HEARTBEATs to the victim's address(es), to confirm those addresses π¬. The victim responds with ABORTs or ICMP messages, which cause the TCB at the other endpoint to be removed π. The attacker can now resend the stored cookie for as long as it's valid, and this will again result in up to HB.Max.Burst HEARTBEATs sent to the victim('s) π.
6.2. Analysis
The multiplication factor is limited by the number of the victim's addresses and by the endpoint's HB.Max.Burst π. Also, the shorter the cookie lifetime, the sooner the attacker has to go through the initial stage of sending an INIT instead of just sending the COOKIE β³. It's also worth noting that the attack is more effective if large HEARTBEATs are used for path confirmation π.
6.3. Mitigation Option
To limit how effective this attack is, the new parameter HB.Max.Burst was introduced in [RFC4960], and an endpoint should:
- not allow very large cookie lifetimes, even if they are requested.
- not use larger HB.Max.Burst parameter values than recommended. Note that an endpoint may decide to send only one Heartbeat per RTT instead of the maximum (i.e., HB.Max.Burst). An endpoint that chooses this approach will, however, slow down detection of endpoints camping on valid addresses π’.
- not use large HEARTBEATs for path confirmation.
7. Association Redirection π¦
This attack lets an attacker wrongly set up an association to a different endpoint π.
7.1. Attack Details
The attacker sends an INIT sourced from port X and directed toward port Y. When the INIT-ACK comes back, the attacker sends the COOKIE-ECHO chunk, but it puts a different destination or source port in the SCTP common header, i.e., X+1 or Y+1 π. This might set up the association using the modified port numbers.
7.2. Analysis
This attack depends on an SCTP implementation failing to store and verify the ports within the COOKIE structure π«£.
7.3. Mitigation Option
This attack is easily defeated by an implementation that includes the ports of both the source and the destination within the COOKIE π‘οΈ. If the source and destination ports don't match the ones in the COOKIE chunk when the COOKIE is returned, the SCTP implementation silently discards the invalid COOKIE π€«.
8. Bombing Attack (Amplification) 3 π£
This attack lets an attacker use an SCTP endpoint to send a large number of packets in response to one packet π±.
8.1. Attack Details
The attacker sends a packet to an SCTP endpoint, and that packet requires the sending of multiple chunks. If the SCTP endpoint doesn't support bundling on the sending side, it might send each chunk in its own packet π¦. These packets can either be sent to a victim by using the victim's address as the source address, or they can be treated as an attack against the network. Since the chunks that need to be sent in response to the received packet may not fit into one packet, an endpoint that supports bundling on the sending side might still send multiple packets π§©.
Examples of these packets are packets containing lots of unknown chunks that require an ERROR chunk to be sent, known chunks that trigger the sending of ERROR chunks, packets containing lots of HEARTBEAT chunks, and so on π.
8.2. Analysis
This attack depends on the SCTP endpoint not supporting bundling on the sending side, or on it having a bad implementation of bundling on the sending side π.
8.3. Mitigation Option
First of all, path verification must happen before any chunks other than HEARTBEATs for path verification are sent. This makes sure the above attack can't be used against other hosts π ββοΈ. To avoid the attack, an SCTP endpoint should implement bundling on the sending side and should not send multiple packets in response. If the SCTP endpoint doesn't support bundling on the sending side, it should generally not send more than one packet in response to a received one. The details of the required handling are described in [RFC4960] π.
9. Bombing Attack (Amplification) 4 π§¨
This attack lets an attacker use an SCTP server to send a larger packet to a victim than the one it sent to the SCTP server π.
9.1. Attack Details
The attacker sends packets with the victim's address as the source address, containing an INIT chunk, to an SCTP server. The server then sends a packet containing an INIT-ACK chunk to the victim, which is most likely larger than the packet that contained the INIT π«’.
9.2. Analysis
This attack is a byte amplification attack and not a packet amplification attack. Without protocol changes, it's hard to avoid π©. A possible way to avoid it would be to use the PAD parameter defined in [RFC4820] π©Ή.
9.3. Mitigation Option
A server should be implemented so that the INIT-ACK chunks it generates are as small as possible π€.
10. Bombing Attack (amplification) 5 πͺοΈ
This attack lets an attacker use an SCTP endpoint to send a large number of packets in response to one packet π₯Ή.
10.1. Attack Details
The attacker sends a packet to an SCTP endpoint, and that packet requires the sending of multiple chunks. If the MTU toward the attacker is smaller than the MTU toward the victim, the victim might need to send more than one packet to send all the chunks πΆ. The difference between the MTUs might be extremely large if the attacker sends malicious ICMP packets to make use of path MTU discovery π.
10.2. Analysis
This attack depends on the fact that an SCTP implementation might not limit the number of response packets correctly π.
10.3. Mitigation Option
First of all, path verification must happen before any chunks other than HEARTBEATs for path verification are sent. This makes sure the above attack can't be used against other hosts π. To avoid the attack, an SCTP endpoint should not send multiple packets in response to a single packet. Chunks that don't fit in that packet should be dropped ποΈ.
11. Security Considerations π¨
This document is about security; as such, there are no additional security considerations. Iykyk π but also stay safe out there, bestie π«Ά.
12. References π
12. References π
Okay bestie, the references are where the receipts live π§Ύβ¨ Everything the spec leans on is listed here, split into what you need to read (normative) and what's just nice to know (informative).
12.1. Normative References
[RFC2960] 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.
[RFC4460] Stewart, R., Arias-Rodriguez, I., Poon, K., Caro, A., and
M. Tuexen, "Stream Control Transmission Protocol (SCTP)
Specification Errata and Issues", RFC 4460, April 2006.
[RFC4820] Tuexen, M., Stewart, R., and P. Lei, "Padding Chunk and
Parameter for the Stream Control Transmission Protocol
(SCTP)", RFC 4820, March 2007.
[RFC4895] Tuexen, M., Stewart, R., Lei, P., and E. Rescorla,
"Authenticated Chunks for Stream Control Transmission
Protocol (SCTP)", RFC 4895, August 2007.
[RFC5061] Stewart, R., Xie, Q., Tuexen, M., Maruyama, S., and M.
Kozuka, "Stream Control Transmission Protocol (SCTP)
Dynamic Address Reconfiguration", RFC 5061,
September 2007.
[RFC4960] Stewart, R., Ed., "Stream Control Transmission Protocol",
RFC 4960, June 2007.
12.2. Informative References
Just the one here, but it's a bangerrr π
[EFFECTS] Aura, T., Nikander, P., and G. Camarillo, "Effects of
Mobility and Multihoming on Transport-Layer Security",
Security and Privacy 2004, IEEE Symposium , URL http://
research.microsoft.com/users/tuomaura/Publications/
aura-nikander-camarillo-ssp04.pdf, May 2004.
Authors' Addresses π§βπ»
Meet the squad who wrote this thing π«Ά
Randall R. Stewart
Cisco Systems, Inc.
4785 Forest Drive
Suite 200
Columbia, SC 29206
USA
EMail: rrs@cisco.com
Michael Tuexen
Muenster Univ. of Applied Sciences
Stegerwaldstr. 39
48565 Steinfurt
Germany
EMail: tuexen@fh-muenster.de
Gonzalo Camarillo
Ericsson
Hirsalantie 11
Jorvas 02420
Finland
EMail: Gonzalo.Camarillo@ericsson.com
Full Copyright Statement Β©
Copyright (C) The IETF Trust (2007) π
This document is subject to the rights, licenses and restrictions in BCP 78. Except as BCP 78 says otherwise, the authors keep all of their rights.
This document and the information in it are provided on an "AS IS" basis. THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST 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.
Intellectual Property π§
The IETF doesn't take a position on whether any Intellectual Property Rights or other rights that someone might claim over the technology in this document are valid or how far they reach. It also doesn't say whether a license under those rights is available, and it hasn't done its own independent search for such rights. You can find the procedures for rights in RFC documents in BCP 78 and BCP 79.
Copies of IPR disclosures sent to the IETF Secretariat, along with any assurances of licenses to be made available, or the results of an attempt to get a general license or permission to use those proprietary rights, are available from the IETF's online IPR repository at http://www.ietf.org/ipr. Implementers and users of this specification can look there too.
The IETF invites anyone interested to point out any copyrights, patents, patent applications, or other proprietary rights that might cover technology needed to implement this standard. Send that information to the IETF at ietf-ipr@ietf.org. π¦
π¦ where this page comes from
- ietf: rfc5062 2007-09
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms