1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445
|
<pre>Internet Engineering Task Force (IETF) T. Reddy
Request for Comments: 7376 R. Ravindranath
Category: Informational Cisco
ISSN: 2070-1721 M. Perumal
Ericsson
A. Yegin
Samsung
September 2014
<span class="h1">Problems with Session Traversal Utilities for NAT (STUN)</span>
<span class="h1">Long-Term Authentication for Traversal Using Relays around NAT (TURN)</span>
Abstract
This document discusses some of 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 document is not an Internet Standards Track specification; it is
published for informational purposes.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Not all documents
approved by the IESG are a candidate for any level of Internet
Standard; see <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc7376">http://www.rfc-editor.org/info/rfc7376</a>.
<span class="grey">Reddy, et al. Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc7376">RFC 7376</a> STUN Authentication for TURN: Problems September 2014</span>
Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Notational Conventions . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-3">3</a>. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4">4</a>. Problems with STUN Long-Term Authentication for TURN . . . . <a href="#page-4">4</a>
<a href="#section-5">5</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-6">6</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-6.1">6.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-6.2">6.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
Traversal Using Relays around NAT (TURN) [<a href="./rfc5766" title=""Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)"">RFC5766</a>] is a protocol that
is often used to improve the connectivity of Peer-to-Peer (P2P)
applications (as defined in <a href="./rfc5128#section-2.7">Section 2.7 of [RFC5128]</a>). TURN allows a
connection to be established when one or both sides are incapable of
a direct P2P connection. The TURN server is also a building block to
support interactive, real-time communication using audio, video,
collaboration, games, etc., between two peer web browsers using the
Web Real-Time Communication (WebRTC) [<a href="#ref-WebRTC-Overview">WebRTC-Overview</a>] framework.
A TURN server is also used in the following scenarios:
o For privacy, users of WebRTC-based web applications may use a TURN
server to hide host candidate addresses from the remote peer.
o Enterprise networks deploy firewalls that typically block UDP
traffic. When SIP user agents or WebRTC endpoints are deployed
behind such firewalls, media cannot be sent over UDP across the
firewall but must instead be sent using TCP (which causes a
<span class="grey">Reddy, et al. Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc7376">RFC 7376</a> STUN Authentication for TURN: Problems September 2014</span>
different user experience). In such cases, a TURN server deployed
in the DeMilitarized Zone (DMZ) might be used to traverse
firewalls.
o The use case explained in Section 3.3.5 of [<a href="#ref-WebRTC-Use-Cases">WebRTC-Use-Cases</a>]
("Simple Video Communication Service, enterprise aspects") refers
to deploying a TURN server in the DMZ to audit all media sessions
from inside an Enterprise premises to any external peer.
o A TURN server could also be deployed for RTP Mobility
[<a href="#ref-TURN-Mobility">TURN-Mobility</a>], etc.
o A TURN server may be used for IPv4-to-IPv6, IPv6-to-IPv6, and
IPv6-to-IPv4 relaying [<a href="./rfc6156" title=""Traversal Using Relays around NAT (TURN) Extension for IPv6"">RFC6156</a>].
o Interactive Connectivity Establishment (ICE) [<a href="./rfc5245" title=""Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols"">RFC5245</a>]
connectivity checks using server reflexive candidates could fail
when the endpoint is behind a NAT [<a href="./rfc3235" title=""Network Address Translator (NAT)-Friendly Application Design Guidelines"">RFC3235</a>] that performs address-
dependent mapping as described in <a href="./rfc4787#section-4.1">Section 4.1 of [RFC4787]</a>. In
such cases, a relayed candidate allocated from the TURN server is
used for media.
Session Traversal Utilities for NAT (STUN) [<a href="./rfc5389" title=""Session Traversal Utilities for NAT (STUN)"">RFC5389</a>] specifies an
authentication mechanism called the long-term credential mechanism.
<a href="#section-4">Section 4</a> of TURN [<a href="./rfc5766" title=""Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)"">RFC5766</a>] specifies that TURN servers and clients
must implement this mechanism; <a href="#section-4">Section 4</a> of TURN [<a href="./rfc5766" title=""Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)"">RFC5766</a>] also
specifies that 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 above scenarios, applications would use the ICE protocol for
gathering 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 <a href="./rfc5389#section-10">Section 10 of [RFC5389]</a>
for authentication and message integrity. <a href="#section-10">Section 10</a> of the TURN
specification [<a href="./rfc5766" title=""Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)"">RFC5766</a>] explains the importance of the long-term
credential mechanism to mitigate various attacks. Client
authentication is essential to prevent unauthorized users from
accessing the TURN server, and misuse of credentials could impose
significant cost on the victim TURN server.
This document focuses on listing security problems and practical
problems with current STUN authentication for TURN so that it can
serve as the basis for stronger authentication mechanisms.
<span class="grey">Reddy, et al. Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc7376">RFC 7376</a> STUN Authentication for TURN: Problems September 2014</span>
An Allocate request is more likely than a Binding request to be
identified by a server administrator as needing client authentication
and integrity protection of messages exchanged. Hence, the issues
discussed here regarding STUN authentication are applicable mainly in
the context of TURN messages.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Notational Conventions</span>
This document uses terminology defined in [<a href="./rfc5389" title=""Session Traversal Utilities for NAT (STUN)"">RFC5389</a>] and [<a href="./rfc5766" title=""Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)"">RFC5766</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Scope</span>
This document can be used as input for designing solution(s) to
address problems with the current STUN authentication for TURN
messages.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Problems with STUN Long-Term Authentication for TURN</span>
1. As described in [<a href="./rfc5389" title=""Session Traversal Utilities for NAT (STUN)"">RFC5389</a>], the long-term credential mechanism
could provide to users a long-term credential in the form of a
traditional "log-in" username and password; 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/response. However, an attacker that is
capable of eavesdropping on a message exchange between a client
and server can determine the password by trying a number of
candidate passwords and checking to see if one of them is correct
by calculating the message integrity using these candidate
passwords and comparing them with the message integrity value in
the MESSAGE-INTEGRITY attribute.
2. When a TURN server is deployed in the DMZ and requires that
requests be authenticated using the long-term credential
mechanism as described in [<a href="./rfc5389" title=""Session Traversal Utilities for NAT (STUN)"">RFC5389</a>], the TURN server needs to be
aware of the username and password to validate the message
integrity of the requests and to provide message integrity for
responses. This results in 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, which is not considered best current practice.
[<a href="./rfc6151" title=""Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms"">RFC6151</a>] discusses security vulnerabilities of MD5 and
encourages implementers not to use it. It is not possible to use
STUN long-term credentials in implementations that are compliant
with US FIPS 140-2 [<a href="#ref-FIPS-140-2">FIPS-140-2</a>], since MD5 isn't an approved
algorithm.
<span class="grey">Reddy, et al. Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc7376">RFC 7376</a> STUN Authentication for TURN: Problems September 2014</span>
3. The long-term credential mechanism discussed in [<a href="./rfc5389" title=""Session Traversal Utilities for NAT (STUN)"">RFC5389</a>]
specifies that the TURN client must include a username value in
the USERNAME STUN attribute. An adversary snooping the TURN
messages between the TURN client and server can identify the
users involved in the call, resulting in privacy leakage. If
TURN usernames are linked to real usernames, then privacy leakage
will result, but in certain scenarios TURN usernames need not be
linked to any real usernames given to users, as the usernames are
just provisioned on a per-company basis.
4. STUN authentication relies on HMAC-SHA1 [<a href="./rfc2104" title=""HMAC: Keyed- Hashing for Message Authentication"">RFC2104</a>]. There is no
mechanism for hash agility in the protocol itself, although
<a href="./rfc5389#section-16.3">Section 16.3 of [RFC5389]</a> does discuss a plan for migrating to a
more secure algorithm in case HMAC-SHA1 is found to be
compromised.
5. A man-in-the middle attacker posing as a TURN server challenges
the client to authenticate, learns the USERNAME of the client,
and later snoops the traffic from the client, thereby identifying
user activity; this results in privacy leakage.
6. Hosting multiple realms on a single IP address is challenging
with TURN. When a TURN server needs to send the REALM attribute
in response to an unauthenticated request, it has no useful
information for determining which realm it should send in the
response, except the source transport address of the TURN
request. Note that this is a problem with multi-tenant scenarios
only; this may not be a problem when the TURN server is located
in enterprise premises.
7. In WebRTC, the JavaScript code needs to know the username and
password to use in the W3C RTCPeerConnection API to access the
TURN server. This exposes user credentials to the JavaScript
code, which could be malicious; the malicious JavaScript code
could then misuse or leak the credentials. If the credentials
happen to be used for accessing services other than TURN, then
the security implications are much larger.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Security Considerations</span>
This document lists problems with current STUN authentication for
TURN so that it can serve as the basis for stronger authentication
mechanisms.
<span class="grey">Reddy, et al. Informational [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc7376">RFC 7376</a> STUN Authentication for TURN: Problems September 2014</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. References</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Normative References</span>
[<a id="ref-RFC5389">RFC5389</a>] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing,
"Session Traversal Utilities for NAT (STUN)", <a href="./rfc5389">RFC 5389</a>,
October 2008, <<a href="http://www.rfc-editor.org/info/rfc5389">http://www.rfc-editor.org/info/rfc5389</a>>.
[<a id="ref-RFC5766">RFC5766</a>] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using
Relays around NAT (TURN): Relay Extensions to Session
Traversal Utilities for NAT (STUN)", <a href="./rfc5766">RFC 5766</a>, April 2010,
<<a href="http://www.rfc-editor.org/info/rfc5766">http://www.rfc-editor.org/info/rfc5766</a>>.
[<a id="ref-RFC6156">RFC6156</a>] Camarillo, G., Novo, O., and S. Perreault, "Traversal
Using Relays around NAT (TURN) Extension for IPv6", <a href="./rfc6156">RFC</a>
<a href="./rfc6156">6156</a>, April 2011,
<<a href="http://www.rfc-editor.org/info/rfc6156">http://www.rfc-editor.org/info/rfc6156</a>>.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Informative References</span>
[<a id="ref-FIPS-140-2">FIPS-140-2</a>]
NIST, "Security Requirements for Cryptographic Modules",
FIPS PUB 140-2, May 2001, <<a href="http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf">http://csrc.nist.gov/</a>
<a href="http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf">publications/fips/fips140-2/fips1402.pdf</a>>.
[<a id="ref-RFC2104">RFC2104</a>] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", <a href="./rfc2104">RFC 2104</a>, February
1997, <<a href="http://www.rfc-editor.org/info/rfc2104">http://www.rfc-editor.org/info/rfc2104</a>>.
[<a id="ref-RFC3235">RFC3235</a>] Senie, D., "Network Address Translator (NAT)-Friendly
Application Design Guidelines", <a href="./rfc3235">RFC 3235</a>, January 2002,
<<a href="http://www.rfc-editor.org/info/rfc3235">http://www.rfc-editor.org/info/rfc3235</a>>.
[<a id="ref-RFC4787">RFC4787</a>] Audet, F. and C. Jennings, "Network Address Translation
(NAT) Behavioral Requirements for Unicast UDP", <a href="https://www.rfc-editor.org/bcp/bcp127">BCP 127</a>,
<a href="./rfc4787">RFC 4787</a>, January 2007,
<<a href="http://www.rfc-editor.org/info/rfc4787">http://www.rfc-editor.org/info/rfc4787</a>>.
[<a id="ref-RFC5128">RFC5128</a>] Srisuresh, P., Ford, B., and D. Kegel, "State of Peer-to-
Peer (P2P) Communication across Network Address
Translators (NATs)", <a href="./rfc5128">RFC 5128</a>, March 2008,
<<a href="http://www.rfc-editor.org/info/rfc5128">http://www.rfc-editor.org/info/rfc5128</a>>.
[<a id="ref-RFC5245">RFC5245</a>] Rosenberg, J., "Interactive Connectivity Establishment
(ICE): A Protocol for Network Address Translator (NAT)
Traversal for Offer/Answer Protocols", <a href="./rfc5245">RFC 5245</a>, April
2010, <<a href="http://www.rfc-editor.org/info/rfc5245">http://www.rfc-editor.org/info/rfc5245</a>>.
<span class="grey">Reddy, et al. Informational [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc7376">RFC 7376</a> STUN Authentication for TURN: Problems September 2014</span>
[<a id="ref-RFC6151">RFC6151</a>] Turner, S. and L. Chen, "Updated Security Considerations
for the MD5 Message-Digest and the HMAC-MD5 Algorithms",
<a href="./rfc6151">RFC 6151</a>, March 2011,
<<a href="http://www.rfc-editor.org/info/rfc6151">http://www.rfc-editor.org/info/rfc6151</a>>.
[<a id="ref-TURN-Mobility">TURN-Mobility</a>]
Wing, D., Patil, P., Reddy, T., and P. Martinsen,
"Mobility with TURN", Work in Progress, <a href="./draft-wing-tram-turn-mobility-02">draft-wing-tram-</a>
<a href="./draft-wing-tram-turn-mobility-02">turn-mobility-02</a>, September 2014.
[<a id="ref-WebRTC-Overview">WebRTC-Overview</a>]
Alvestrand, H., "Overview: Real Time Protocols for
Browser-based Applications", Work in Progress, <a href="./draft-ietf-rtcweb-overview-11">draft-ietf-</a>
<a href="./draft-ietf-rtcweb-overview-11">rtcweb-overview-11</a>, August 2014.
[<a id="ref-WebRTC-Use-Cases">WebRTC-Use-Cases</a>]
Holmberg, C., Hakansson, S., and G. Eriksson, "Web Real-
Time Communication Use-cases and Requirements", Work in
Progress, <a href="./draft-ietf-rtcweb-use-cases-and-requirements-14">draft-ietf-rtcweb-use-cases-and-requirements-14</a>,
February 2014.
Acknowledgments
The authors would like 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.
<span class="grey">Reddy, et al. Informational [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc7376">RFC 7376</a> STUN Authentication for TURN: Problems September 2014</span>
Authors' Addresses
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
Reddy, et al. Informational [Page 8]
</pre>
|