RFC 7376
Problems with Session Traversal Utilities for NAT (STUN) Long-Term Authentication for Traversal Using Relays around NAT (TURN)
RFC 7376 ๐ Problems with Session Traversal Utilities for NAT (STUN) Long-Term Authentication for Traversal Using Relays around NAT (TURN)
okay bestie, so this is RFC 7376 ๐ and it came out in September 2014 as an Informational doc, which means it's published for informational purposes and is not a Standards Track spec โจ. It was written by T. Reddy and R. Ravindranath from Cisco, M. Perumal from Ericsson, and A. Yegin from Samsung ๐ง. The ISSN is 2070-1721. The header doesn't list anything it obsoletes or updates, so it stands on its own ๐ธ.
Abstract ๐ธ
this doc is all about the security problems and practical problems with the current Session Traversal Utilities for NAT (STUN) authentication for Traversal Using Relays around NAT (TURN) messages ๐.
Status of This Memo ๐
this doc is not an Internet Standards Track spec. it's published for informational purposes ๐.
it's a product of the Internet Engineering Task Force (IETF) and it represents the consensus of the IETF community ๐ซถ. it got public review and was approved for publication by the Internet Engineering Steering Group (IESG). not every document the IESG approves is a candidate for any level of Internet Standard, so check Section 2 of RFC 5741 if you're curious ๐ค.
info about the current status of this doc, any errata, and how to send feedback can be found at http://www.rfc-editor.org/info/rfc7376 ๐
.
Copyright Notice ๐
Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved ยฉ๏ธ.
this doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they stood on the publication date. please actually read those because they spell out your rights and restrictions for this doc ๐งพ. any Code Components pulled out of this doc must include the Simplified BSD License text described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as the Simplified BSD License describes ๐ค.
Table of Contents ๐ง
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Notational Conventions . . . . . . . . . . . . . . . . . . . 4
3. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4. Problems with STUN Long-Term Authentication for TURN . . . . 4
5. Security Considerations . . . . . . . . . . . . . . . . . . . 5
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.1. Normative References . . . . . . . . . . . . . . . . . . 6
6.2. Informative References . . . . . . . . . . . . . . . . . 6
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 7
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8
1. Introduction โจ
okay so Traversal Using Relays around NAT (TURN) [RFC5766] is a protocol that people use a LOT to boost connectivity for Peer-to-Peer (P2P) apps (see Section 2.7 of [RFC5128]) ๐ฆ. it lets a connection get set up even when one or both sides can't do a direct P2P connection ๐ . the TURN server is also a building block for interactive, real-time stuff like audio, video, collaboration, games, and more, between two peer web browsers using the Web Real-Time Communication (WebRTC) [WebRTC-Overview] framework ๐ฎ.
a TURN server also shows up in these scenarios ๐:
- For privacy, users of WebRTC-based web applications may use a TURN server to hide host candidate addresses from the remote peer ๐.
- Enterprise networks deploy firewalls that typically block UDP traffic. When SIP user agents or WebRTC endpoints sit behind those firewalls, media can't go over UDP across the firewall and has to go over TCP instead, which gives a different user experience ๐ญ. in those cases, a TURN server deployed in the DeMilitarized Zone (DMZ) might be used to get through the firewalls ๐งฑ.
- The use case in Section 3.3.5 of [WebRTC-Use-Cases] ("Simple Video Communication Service, enterprise aspects") is about deploying a TURN server in the DMZ to audit all media sessions from inside an Enterprise premises to any external peer ๐ต๏ธ.
- A TURN server could also be deployed for RTP Mobility [TURN-Mobility], etc. ๐ฐ๏ธ
- A TURN server may be used for IPv4-to-IPv6, IPv6-to-IPv6, and IPv6-to-IPv4 relaying [RFC6156] ๐.
- Interactive Connectivity Establishment (ICE) [RFC5245] connectivity checks using server reflexive candidates could fail when the endpoint is behind a NAT [RFC3235] that performs address-dependent mapping, as described in Section 4.1 of [RFC4787] ๐. in those cases, a relayed candidate allocated from the TURN server is used for media ๐.
okay so Session Traversal Utilities for NAT (STUN) [RFC5389] specifies an authentication mechanism called the long-term credential mechanism ๐. Section 4 of TURN [RFC5766] says that TURN servers and clients must implement this mechanism. that same section also says the TURN server must demand that all requests from the client be authenticated using this mechanism, or that an equally strong or stronger mechanism for client authentication be used ๐ช.
in the scenarios above, applications would use the ICE protocol to gather candidates ๐งฉ. an ICE agent can use TURN to learn server reflexive and relayed candidates ๐ฆ. if the TURN server requires that the TURN request be authenticated, then the ICE agent will use the long-term credential mechanism explained in Section 10 of [RFC5389] for authentication and message integrity ๐. Section 10 of the TURN specification [RFC5766] explains why the long-term credential mechanism matters for mitigating various attacks ๐ก๏ธ. client authentication is essential to keep unauthorized users away from the TURN server, and misusing credentials could cost the victim TURN server a lot ๐ธ.
this doc focuses on listing security problems and practical problems with current STUN authentication for TURN, so it can serve as the basis for stronger authentication mechanisms ๐๏ธ.
an Allocate request is more likely than a Binding request to be identified by a server admin as needing client authentication and message integrity protection ๐ง. so the issues in this doc about STUN authentication mostly apply in the context of TURN messages ๐.
2. Notational Conventions ๐
this doc uses terminology defined in [RFC5389] and [RFC5766] ๐.
3. Scope ๐ธ
this doc can be used as input for designing solutions that address problems with the current STUN authentication for TURN messages ๐ง .
4. Problems with STUN Long-Term Authentication for TURN ๐ญ
- As described in [RFC5389], the long-term credential mechanism could give users a long-term credential in the form of a traditional "log-in" username and password, and this credential would not change for extended periods of time ๐ฅฒ. the key derived from the user credentials would be used to provide message integrity for every TURN request and response. but an attacker who can eavesdrop on a message exchange between a client and server can figure out the password by trying a bunch of candidate passwords. they check each one by calculating the message integrity with it and comparing the result to the message integrity value in the
MESSAGE-INTEGRITYattribute ๐๐. - When a TURN server is deployed in the DMZ and requires that requests be authenticated using the long-term credential mechanism described in [RFC5389], the TURN server needs to know the username and password so it can validate the message integrity of requests and provide message integrity for responses ๐ ๏ธ. that means extra management overhead on the TURN server ๐ฎโ๐จ. long-term credentials (username, realm, and password) need to be stored on the server side using an MD5 hash over the credentials, and that is not considered best current practice ๐ซ. [RFC6151] discusses security vulnerabilities of MD5 and encourages implementers not to use it โ ๏ธ. it's not possible to use STUN long-term credentials in implementations that comply with US FIPS 140-2 [FIPS-140-2], since MD5 isn't an approved algorithm ๐บ๐ธ.
- The long-term credential mechanism discussed in [RFC5389] says the TURN client must include a username value in the
USERNAMESTUN attribute ๐ซฃ. an adversary snooping on the TURN messages between the TURN client and server can identify the users involved in the call, which leaks privacy ๐ต๏ธโโ๏ธ. if TURN usernames are linked to real usernames, that leakage happens for sure. but in some scenarios TURN usernames don't need to be linked to any real usernames given to users, because the usernames are just provisioned on a per-company basis ๐ขโจ.
6.1. Normative References ๐
these are the must-reads, bestie ๐ the ones the spec leans on hard:
[RFC5389]Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, "Session Traversal Utilities for NAT (STUN)", RFC 5389, October 2008,<http://www.rfc-editor.org/info/rfc5389>. ๐ง[RFC5766]Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)", RFC 5766, April 2010,<http://www.rfc-editor.org/info/rfc5766>. ๐[RFC6156]Camarillo, G., Novo, O., and S. Perreault, "Traversal Using Relays around NAT (TURN) Extension for IPv6", RFC 6156, April 2011,<http://www.rfc-editor.org/info/rfc6156>. ๐
6.2. Informative References ๐ฆ
these ones aren't required reading, but they're giving context and I'm obsessed with all of them โจ
[FIPS-140-2]NIST, "Security Requirements for Cryptographic Modules", FIPS PUB 140-2, May 2001,<http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf>. ๐[RFC2104]Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997,<http://www.rfc-editor.org/info/rfc2104>. ๐[RFC3235]Senie, D., "Network Address Translator (NAT)-Friendly Application Design Guidelines", RFC 3235, January 2002,<http://www.rfc-editor.org/info/rfc3235>. ๐ธ[RFC4787]Audet, F. and C. Jennings, "Network Address Translation (NAT) Behavioral Requirements for Unicast UDP", BCP 127, RFC 4787, January 2007,<http://www.rfc-editor.org/info/rfc4787>. ๐[RFC5128]Srisuresh, P., Ford, B., and D. Kegel, "State of Peer-to-Peer (P2P) Communication across Network Address Translators (NATs)", RFC 5128, March 2008,<http://www.rfc-editor.org/info/rfc5128>. ๐[RFC5245]Rosenberg, J., "Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols", RFC 5245, April 2010,<http://www.rfc-editor.org/info/rfc5245>. ๐ซถ[RFC6151]Turner, S. and L. Chen, "Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms", RFC 6151, March 2011,<http://www.rfc-editor.org/info/rfc6151>. โญ[TURN-Mobility]Wing, D., Patil, P., Reddy, T., and P. Martinsen, "Mobility with TURN", Work in Progress, draft-wing-tram-turn-mobility-02, September 2014. ๐[WebRTC-Overview]Alvestrand, H., "Overview: Real Time Protocols for Browser-based Applications", Work in Progress, draft-ietf-rtcweb-overview-11, August 2014. ๐[WebRTC-Use-Cases]Holmberg, C., Hakansson, S., and G. Eriksson, "Web Real-Time Communication Use-cases and Requirements", Work in Progress, draft-ietf-rtcweb-use-cases-and-requirements-14, February 2014. ๐ฅ
Acknowledgments ๐ซถ
the authors wanted to thank Dan Wing, Harald Alvestrand, Sandeep Rao, Prashanth Patil, Pal Martinsen, Marc Petit-Huguenin, Gonzalo Camarillo, Brian E. Carpenter, Spencer Dawkins, Adrian Farrel, and Simon Perreault for their comments and reviews. the squad that showed up for this one ๐โจ
Authors' Addresses ๐
the four people who wrote this, with their contact info:
Tirumaleswar Reddy
Cisco Systems, Inc.
Cessna Business Park, Varthur Hobli
Sarjapur Marathalli Outer Ring Road
Bangalore, Karnataka 560103
India
EMail: tireddy@cisco.com
Ram Mohan Ravindranath
Cisco Systems, Inc.
Cessna Business Park, Varthur Hobli
Sarjapur Marathalli Outer Ring Road
Bangalore, Karnataka 560103
India
EMail: rmohanr@cisco.com
Muthu Arul Mozhi Perumal
Ericsson
Ferns Icon
Doddanekundi, Mahadevapura
Bangalore, Karnataka 560037
India
EMail: muthu.arul@gmail.com
Alper Yegin
Samsung
Istanbul
Turkey
EMail: alper.yegin@yegin.org
๐ฆ where this page comes from
- ietf: rfc7376 2014-09
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms