draft-ietf-rtcweb-security-04.txt   draft-ietf-rtcweb-security-05.txt 
RTC-Web E. Rescorla RTC-Web E. Rescorla
Internet-Draft RTFM, Inc. Internet-Draft RTFM, Inc.
Intended status: Standards Track January 22, 2013 Intended status: Standards Track July 15, 2013
Expires: July 26, 2013 Expires: January 16, 2014
Security Considerations for RTC-Web Security Considerations for WebRTC
draft-ietf-rtcweb-security-04 draft-ietf-rtcweb-security-05
Abstract Abstract
The Real-Time Communications on the Web (RTC-Web) working group is The Real-Time Communications on the Web (RTCWEB) working group is
tasked with standardizing protocols for real-time communications tasked with standardizing protocols for real-time communications
between Web browsers. The major use cases for RTC-Web technology are between Web browsers, generally called "WebRTC". The major use cases
real-time audio and/or video calls, Web conferencing, and direct data for WebRTC technology are real-time audio and/or video calls, Web
transfer. Unlike most conventional real-time systems (e.g., SIP- conferencing, and direct data transfer. Unlike most conventional
based soft phones) RTC-Web communications are directly controlled by real-time systems (e.g., SIP-based soft phones) WebRTC communications
some Web server, which poses new security challenges. For instance, are directly controlled by a Web server, which poses new security
a Web browser might expose a JavaScript API which allows a server to challenges. For instance, a Web browser might expose a JavaScript
place a video call. Unrestricted access to such an API would allow API which allows a server to place a video call. Unrestricted access
any site which a user visited to "bug" a user's computer, capturing to such an API would allow any site which a user visited to "bug" a
any activity which passed in front of their camera. This document user's computer, capturing any activity which passed in front of
defines the RTC-Web threat model and defines an architecture which their camera. This document defines the WebRTC threat model and
provides security within that threat model. analyzes the security threats of WebRTC in that model.
Legal Legal
THIS DOCUMENT AND THE INFORMATION CONTAINED THEREIN ARE PROVIDED ON THIS DOCUMENT AND THE INFORMATION CONTAINED THEREIN ARE PROVIDED ON
AN "AS IS" BASIS AND THE CONTRIBUTOR, THE ORGANIZATION HE/SHE AN "AS IS" BASIS AND THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE
IETF TRUST, AND THE INTERNET ENGINEERING TASK FORCE, DISCLAIM ALL IETF TRUST, AND THE INTERNET ENGINEERING TASK FORCE, DISCLAIM ALL
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION THEREIN WILL NOT INFRINGE WARRANTY THAT THE USE OF THE INFORMATION THEREIN WILL NOT INFRINGE
ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
skipping to change at page 2, line 7 skipping to change at page 2, line 7
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 26, 2013. This Internet-Draft will expire on January 16, 2014.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 14 skipping to change at page 3, line 14
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
3. The Browser Threat Model . . . . . . . . . . . . . . . . . . . 5 3. The Browser Threat Model . . . . . . . . . . . . . . . . . . . 5
3.1. Access to Local Resources . . . . . . . . . . . . . . . . 6 3.1. Access to Local Resources . . . . . . . . . . . . . . . . 6
3.2. Same Origin Policy . . . . . . . . . . . . . . . . . . . . 6 3.2. Same Origin Policy . . . . . . . . . . . . . . . . . . . . 6
3.3. Bypassing SOP: CORS, WebSockets, and consent to 3.3. Bypassing SOP: CORS, WebSockets, and consent to
communicate . . . . . . . . . . . . . . . . . . . . . . . 7 communicate . . . . . . . . . . . . . . . . . . . . . . . 7
4. Security for RTC-Web Applications . . . . . . . . . . . . . . 7 4. Security for WebRTC Applications . . . . . . . . . . . . . . . 7
4.1. Access to Local Devices . . . . . . . . . . . . . . . . . 7 4.1. Access to Local Devices . . . . . . . . . . . . . . . . . 8
4.1.1. Calling Scenarios and User Expectations . . . . . . . 8 4.1.1. Threats from Screen Sharing . . . . . . . . . . . . . 9
4.1.1.1. Dedicated Calling Services . . . . . . . . . . . . 9 4.1.2. Calling Scenarios and User Expectations . . . . . . . 9
4.1.1.2. Calling the Site You're On . . . . . . . . . . . . 9 4.1.2.1. Dedicated Calling Services . . . . . . . . . . . . 9
4.1.1.3. Calling to an Ad Target . . . . . . . . . . . . . 10 4.1.2.2. Calling the Site You're On . . . . . . . . . . . . 10
4.1.2. Origin-Based Security . . . . . . . . . . . . . . . . 10 4.1.3. Origin-Based Security . . . . . . . . . . . . . . . . 10
4.1.3. Security Properties of the Calling Page . . . . . . . 12 4.1.4. Security Properties of the Calling Page . . . . . . . 12
4.2. Communications Consent Verification . . . . . . . . . . . 12 4.2. Communications Consent Verification . . . . . . . . . . . 13
4.2.1. ICE . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2.1. ICE . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.2. Masking . . . . . . . . . . . . . . . . . . . . . . . 13 4.2.2. Masking . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.3. Backward Compatibility . . . . . . . . . . . . . . . . 14 4.2.3. Backward Compatibility . . . . . . . . . . . . . . . . 14
4.2.4. IP Location Privacy . . . . . . . . . . . . . . . . . 15 4.2.4. IP Location Privacy . . . . . . . . . . . . . . . . . 15
4.3. Communications Security . . . . . . . . . . . . . . . . . 15 4.3. Communications Security . . . . . . . . . . . . . . . . . 15
4.3.1. Protecting Against Retrospective Compromise . . . . . 16 4.3.1. Protecting Against Retrospective Compromise . . . . . 16
4.3.2. Protecting Against During-Call Attack . . . . . . . . 17 4.3.2. Protecting Against During-Call Attack . . . . . . . . 17
4.3.2.1. Key Continuity . . . . . . . . . . . . . . . . . . 17 4.3.2.1. Key Continuity . . . . . . . . . . . . . . . . . . 17
4.3.2.2. Short Authentication Strings . . . . . . . . . . . 18 4.3.2.2. Short Authentication Strings . . . . . . . . . . . 18
4.3.2.3. Third Party Identity . . . . . . . . . . . . . . . 19 4.3.2.3. Third Party Identity . . . . . . . . . . . . . . . 19
4.3.2.4. Page Access to Media . . . . . . . . . . . . . . . 19 4.3.2.4. Page Access to Media . . . . . . . . . . . . . . . 19
5. Security Considerations . . . . . . . . . . . . . . . . . . . 20 4.3.3. Malicious Peers . . . . . . . . . . . . . . . . . . . 20
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 20 4.4. Privacy Considerations . . . . . . . . . . . . . . . . . . 20
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.4.1. Correlation of Anonymous Calls . . . . . . . . . . . . 20
7.1. Normative References . . . . . . . . . . . . . . . . . . . 20 4.4.2. Browser Fingerprinting . . . . . . . . . . . . . . . . 21
7.2. Informative References . . . . . . . . . . . . . . . . . . 20 5. Security Considerations . . . . . . . . . . . . . . . . . . . 21
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 22 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 21
7. Changes Since -04 . . . . . . . . . . . . . . . . . . . . . . 21
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21
8.1. Normative References . . . . . . . . . . . . . . . . . . . 21
8.2. Informative References . . . . . . . . . . . . . . . . . . 22
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 24
1. Introduction 1. Introduction
The Real-Time Communications on the Web (RTC-Web) working group is The Real-Time Communications on the Web (RTCWEB) working group is
tasked with standardizing protocols for real-time communications tasked with standardizing protocols for real-time communications
between Web browsers. The major use cases for RTC-Web technology are between Web browsers, generally called "WebRTC"
real-time audio and/or video calls, Web conferencing, and direct data [I-D.ietf-rtcweb-overview]. The major use cases for WebTC technology
transfer. Unlike most conventional real-time systems, (e.g., SIP- are real-time audio and/or video calls, Web conferencing, and direct
based[RFC3261] soft phones) RTC-Web communications are directly data transfer. Unlike most conventional real-time systems, (e.g.,
SIP-based[RFC3261] soft phones) WebRTC communications are directly
controlled by some Web server. A simple case is shown below. controlled by some Web server. A simple case is shown below.
+----------------+ +----------------+
| | | |
| Web Server | | Web Server |
| | | |
+----------------+ +----------------+
^ ^ ^ ^
/ \ / \
HTTP / \ HTTP HTTP / \ HTTP
/ \ or / \ or
/ \ WebSockets / \ WebSockets
v v v v
JS API JS API JS API JS API
+-----------+ +-----------+ +-----------+ +-----------+
| | Media | | | | Media | |
| Browser |<---------->| Browser | | Browser |<---------->| Browser |
| | | | | | | |
+-----------+ +-----------+ +-----------+ +-----------+
Figure 1: A simple RTC-Web system Figure 1: A simple WebRTC system
In the system shown in Figure 1, Alice and Bob both have RTC-Web In the system shown in Figure 1, Alice and Bob both have WebRTC
enabled browsers and they visit some Web server which operates a enabled browsers and they visit some Web server which operates a
calling service. Each of their browsers exposes standardized calling service. Each of their browsers exposes standardized
JavaScript calling APIs (implementated as browser built-ins) which JavaScript calling APIs (implementated as browser built-ins) which
are used by the Web server to set up a call between Alice and Bob. are used by the Web server to set up a call between Alice and Bob.
While this system is topologically similar to a conventional SIP- The Web server also serves as the signaling channel to transport
based system (with the Web server acting as the signaling service and control messages between the browsers. While this system is
browsers acting as softphones), control has moved to the central Web topologically similar to a conventional SIP-based system (with the
server; the browser simply provides API points that are used by the Web server acting as the signaling service and browsers acting as
calling service. As with any Web application, the Web server can softphones), control has moved to the central Web server; the browser
move logic between the server and JavaScript in the browser, but simply provides API points that are used by the calling service. As
regardless of where the code is executing, it is ultimately under with any Web application, the Web server can move logic between the
control of the server. server and JavaScript in the browser, but regardless of where the
code is executing, it is ultimately under control of the server.
It should be immediately apparent that this type of system poses new It should be immediately apparent that this type of system poses new
security challenges beyond those of a conventional VoIP system. In security challenges beyond those of a conventional VoIP system. In
particular, it needs to contend with malicious calling services. For particular, it needs to contend with malicious calling services. For
example, if the calling service can cause the browser to make a call example, if the calling service can cause the browser to make a call
at any time to any callee of its choice, then this facility can be at any time to any callee of its choice, then this facility can be
used to bug a user's computer without their knowledge, simply by used to bug a user's computer without their knowledge, simply by
placing a call to some recording service. More subtly, if the placing a call to some recording service. More subtly, if the
exposed APIs allow the server to instruct the browser to send exposed APIs allow the server to instruct the browser to send
arbitrary content, then they can be used to bypass firewalls or mount arbitrary content, then they can be used to bypass firewalls or mount
skipping to change at page 5, line 24 skipping to change at page 5, line 26
document. document.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
3. The Browser Threat Model 3. The Browser Threat Model
The security requirements for RTC-Web follow directly from the The security requirements for WebRTC follow directly from the
requirement that the browser's job is to protect the user. Huang et requirement that the browser's job is to protect the user. Huang et
al. [huang-w2sp] summarize the core browser security guarantee as: al. [huang-w2sp] summarize the core browser security guarantee as:
Users can safely visit arbitrary web sites and execute scripts Users can safely visit arbitrary web sites and execute scripts
provided by those sites. provided by those sites.
It is important to realize that this includes sites hosting arbitrary It is important to realize that this includes sites hosting arbitrary
malicious scripts. The motivation for this requirement is simple: malicious scripts. The motivation for this requirement is simple:
it is trivial for attackers to divert users to sites of their choice. it is trivial for attackers to divert users to sites of their choice.
For instance, an attacker can purchase display advertisements which For instance, an attacker can purchase display advertisements which
direct the user (either automatically or via user clicking) to their direct the user (either automatically or via user clicking) to their
site, at which point the browser will execute the attacker's scripts. site, at which point the browser will execute the attacker's scripts.
Thus, it is important that it be safe to view arbitrarily malicious Thus, it is important that it be safe to view arbitrarily malicious
pages. Of course, browsers inevitably have bugs which cause them to pages. Of course, browsers inevitably have bugs which cause them to
fall short of this goal, but any new RTC-Web functionality must be fall short of this goal, but any new WebRTC functionality must be
designed with the intent to meet this standard. The remainder of designed with the intent to meet this standard. The remainder of
this section provides more background on the existing Web security this section provides more background on the existing Web security
model. model.
In this model, then, the browser acts as a TRUSTED COMPUTING BASE In this model, then, the browser acts as a TRUSTED COMPUTING BASE
(TCB) both from the user's perspective and to some extent from the (TCB) both from the user's perspective and to some extent from the
server's. While HTML and JS provided by the server can cause the server's. While HTML and JavaScript (JS) provided by the server can
browser to execute a variety of actions, those scripts operate in a cause the browser to execute a variety of actions, those scripts
sandbox that isolates them both from the user's computer and from operate in a sandbox that isolates them both from the user's computer
each other, as detailed below. and from each other, as detailed below.
Conventionally, we refer to either WEB ATTACKERS, who are able to Conventionally, we refer to either WEB ATTACKERS, who are able to
induce you to visit their sites but do not control the network, and induce you to visit their sites but do not control the network, and
NETWORK ATTACKERS, who are able to control your network. Network NETWORK ATTACKERS, who are able to control your network. Network
attackers correspond to the [RFC3552] "Internet Threat Model". Note attackers correspond to the [RFC3552] "Internet Threat Model". Note
that for HTTP traffic, a network attacker is also a Web attacker, that for HTTP traffic, a network attacker is also a Web attacker,
since it can inject traffic as if it were any non-HTTPS Web site. since it can inject traffic as if it were any non-HTTPS Web site.
Thus, when analyzing HTTP connections, we must assume that traffic is Thus, when analyzing HTTP connections, we must assume that traffic is
going to the attacker. going to the attacker.
skipping to change at page 6, line 28 skipping to change at page 6, line 30
forbids web servers from accessing those same resources. For forbids web servers from accessing those same resources. For
instance, while it is possible to produce an HTML form which will instance, while it is possible to produce an HTML form which will
allow file upload, a script cannot do so without user consent and in allow file upload, a script cannot do so without user consent and in
fact cannot even suggest a specific file (e.g., /etc/passwd); the fact cannot even suggest a specific file (e.g., /etc/passwd); the
user must explicitly select the file and consent to its upload. user must explicitly select the file and consent to its upload.
[Note: in many cases browsers are explicitly designed to avoid [Note: in many cases browsers are explicitly designed to avoid
dialogs with the semantics of "click here to screw yourself", as dialogs with the semantics of "click here to screw yourself", as
extensive research shows that users are prone to consent under such extensive research shows that users are prone to consent under such
circumstances.] circumstances.]
Similarly, while Flash SWFs can access the camera and microphone, Similarly, while Flash programs (SWFs) [SWF] can access the camera
they explicitly require that the user consent to that access. In and microphone, they explicitly require that the user consent to that
addition, some resources simply cannot be accessed from the browser access. In addition, some resources simply cannot be accessed from
at all. For instance, there is no real way to run specific the browser at all. For instance, there is no real way to run
executables directly from a script (though the user can of course be specific executables directly from a script (though the user can of
induced to download executable files and run them). course be induced to download executable files and run them).
3.2. Same Origin Policy 3.2. Same Origin Policy
Many other resources are accessible but isolated. For instance, Many other resources are accessible but isolated. For instance,
while scripts are allowed to make HTTP requests via the while scripts are allowed to make HTTP requests via the
XMLHttpRequest() API those requests are not allowed to be made to any XMLHttpRequest() API those requests are not allowed to be made to any
server, but rather solely to the same ORIGIN from whence the script server, but rather solely to the same ORIGIN from whence the script
came.[RFC6454] (although CORS [CORS] and WebSockets [RFC6455] came xref target="RFC6454"/> (although CORS [CORS] and WebSockets
provides a escape hatch from this restriction, as described below.) [RFC6455] provide a escape hatch from this restriction, as described
This SAME ORIGIN POLICY (SOP) prevents server A from mounting attacks below.) This SAME ORIGIN POLICY (SOP) prevents server A from
on server B via the user's browser, which protects both the user mounting attacks on server B via the user's browser, which protects
(e.g., from misuse of his credentials) and the server (e.g., from DoS both the user (e.g., from misuse of his credentials) and the server B
attack). (e.g., from DoS attack).
More generally, SOP forces scripts from each site to run in their More generally, SOP forces scripts from each site to run in their
own, isolated, sandboxes. While there are techniques to allow them own, isolated, sandboxes. While there are techniques to allow them
to interact, those interactions generally must be mutually consensual to interact, those interactions generally must be mutually consensual
(by each site) and are limited to certain channels. For instance, (by each site) and are limited to certain channels. For instance,
multiple pages/browser panes from the same origin can read each multiple pages/browser panes from the same origin can read each
other's JS variables, but pages from the different origins--or even other's JS variables, but pages from the different origins--or even
iframes from different origins on the same page--cannot. iframes from different origins on the same page--cannot.
3.3. Bypassing SOP: CORS, WebSockets, and consent to communicate 3.3. Bypassing SOP: CORS, WebSockets, and consent to communicate
skipping to change at page 7, line 44 skipping to change at page 7, line 47
difficult. In particular, Huang et al. [huang-w2sp] have shown difficult. In particular, Huang et al. [huang-w2sp] have shown
vulnerabilities in the existing Java and Flash consent verification vulnerabilities in the existing Java and Flash consent verification
techniques and in a simplified version of the WebSockets handshake. techniques and in a simplified version of the WebSockets handshake.
In particular, it is important to be wary of CROSS-PROTOCOL attacks In particular, it is important to be wary of CROSS-PROTOCOL attacks
in which the attacking script generates traffic which is acceptable in which the attacking script generates traffic which is acceptable
to some non-Web protocol state machine. In order to resist this form to some non-Web protocol state machine. In order to resist this form
of attack, WebSockets incorporates a masking technique intended to of attack, WebSockets incorporates a masking technique intended to
randomize the bits on the wire, thus making it more difficult to randomize the bits on the wire, thus making it more difficult to
generate traffic which resembles a given protocol. generate traffic which resembles a given protocol.
4. Security for RTC-Web Applications 4. Security for WebRTC Applications
4.1. Access to Local Devices 4.1. Access to Local Devices
As discussed in Section 1, allowing arbitrary sites to initiate calls As discussed in Section 1, allowing arbitrary sites to initiate calls
violates the core Web security guarantee; without some access violates the core Web security guarantee; without some access
restrictions on local devices, any malicious site could simply bug a restrictions on local devices, any malicious site could simply bug a
user. At minimum, then, it MUST NOT be possible for arbitrary sites user. At minimum, then, it MUST NOT be possible for arbitrary sites
to initiate calls to arbitrary locations without user consent. This to initiate calls to arbitrary locations without user consent. This
immediately raises the question, however, of what should be the scope immediately raises the question, however, of what should be the scope
of user consent. of user consent.
skipping to change at page 8, line 46 skipping to change at page 9, line 5
matter of protecting the user's privacy from malicious sites. By matter of protecting the user's privacy from malicious sites. By
contrast, consent to send network traffic is about preventing the contrast, consent to send network traffic is about preventing the
user's browser from being used to attack its local network. Thus, we user's browser from being used to attack its local network. Thus, we
need to ensure communications consent even if the site is not able to need to ensure communications consent even if the site is not able to
access the camera and microphone at all (hence WebSockets's consent access the camera and microphone at all (hence WebSockets's consent
mechanism) and similarly we need to be concerned with the site mechanism) and similarly we need to be concerned with the site
accessing the user's camera and microphone even if the data is to be accessing the user's camera and microphone even if the data is to be
sent back to the site via conventional HTTP-based network mechanisms sent back to the site via conventional HTTP-based network mechanisms
such as HTTP POST. such as HTTP POST.
4.1.1. Calling Scenarios and User Expectations 4.1.1. Threats from Screen Sharing
In addition to camera and microphone access, there has been demand
for screen and/or application sharing functionality. Unfortunately,
the security implications of this functionality are much harder for
users to intuitively analyze than for camera and microphone access.
(See
http://lists.w3.org/Archives/Public/public-webrtc/2013Mar/0024.html
for a full analysis.)
The most obvious threats are simply those of "oversharing". I.e.,
the user may believe they are sharing a window when in fact they are
sharing an application, or may forget they are sharing their whole
screen, icons, notifications, and all. This is already an issue with
existing screen sharing technologies and is made somewhat worse if a
partially trusted site is responsible for asking for the resource to
be shared rather than having the user propose it.
A less obvious threat involves the impact of screen sharing on the
Web security model. A key part of the Same Origin Policy is that
HTML or JS from site A can reference content from site B and cause
the browser to load it, but (unless explicitly permitted) cannot see
the result. However, if a web application from a site is screen
sharing the browser, then this violates that invariant, with serious
security consequences. For example, an attacker site might request
screen sharing and then briefly open up a new Window to the user's
bank or Gmail account, using screen sharing to read the resulting
displayed content. A more sophisticated attack would be open up a
source view window to a site and use the screen sharing result to
view anti cross-site request forgery tokens.
These threats suggest that screen/application sharing might need a
higher level of user consent than access to the camera or microphone.
4.1.2. Calling Scenarios and User Expectations
While a large number of possible calling scenarios are possible, the While a large number of possible calling scenarios are possible, the
scenarios discussed in this section illustrate many of the scenarios discussed in this section illustrate many of the
difficulties of identifying the relevant scope of consent. difficulties of identifying the relevant scope of consent.
4.1.1.1. Dedicated Calling Services 4.1.2.1. Dedicated Calling Services
The first scenario we consider is a dedicated calling service. In The first scenario we consider is a dedicated calling service. In
this case, the user has a relationship with a calling site and this case, the user has a relationship with a calling site and
repeatedly makes calls on it. It is likely that rather than having repeatedly makes calls on it. It is likely that rather than having
to give permission for each call that the user will want to give the to give permission for each call that the user will want to give the
calling service long-term access to the camera and microphone. This calling service long-term access to the camera and microphone. This
is a natural fit for a long-term consent mechanism (e.g., installing is a natural fit for a long-term consent mechanism (e.g., installing
an app store "application" to indicate permission for the calling an app store "application" to indicate permission for the calling
service.) A variant of the dedicated calling service is a gaming service.) A variant of the dedicated calling service is a gaming
site (e.g., a poker site) which hosts a dedicated calling service to site (e.g., a poker site) which hosts a dedicated calling service to
skipping to change at page 9, line 32 skipping to change at page 10, line 23
granting it permission to bug my computer whenever it wants. This granting it permission to bug my computer whenever it wants. This
suggests another consent model in which a site is authorized to make suggests another consent model in which a site is authorized to make
calls but only to certain target entities (identified via media-plane calls but only to certain target entities (identified via media-plane
cryptographic mechanisms as described in Section 4.3.2 and especially cryptographic mechanisms as described in Section 4.3.2 and especially
Section 4.3.2.3.) Note that the question of consent here is related Section 4.3.2.3.) Note that the question of consent here is related
to but distinct from the question of peer identity: I might be to but distinct from the question of peer identity: I might be
willing to allow a calling site to in general initiate calls on my willing to allow a calling site to in general initiate calls on my
behalf but still have some calls via that site where I can be sure behalf but still have some calls via that site where I can be sure
that the site is not listening in. that the site is not listening in.
4.1.1.2. Calling the Site You're On 4.1.2.2. Calling the Site You're On
Another simple scenario is calling the site you're actually visiting. Another simple scenario is calling the site you're actually visiting.
The paradigmatic case here is the "click here to talk to a The paradigmatic case here is the "click here to talk to a
representative" windows that appear on many shopping sites. In this representative" windows that appear on many shopping sites. In this
case, the user's expectation is that they are calling the site case, the user's expectation is that they are calling the site
they're actually visiting. However, it is unlikely that they want to they're actually visiting. However, it is unlikely that they want to
provide a general consent to such a site; just because I want some provide a general consent to such a site; just because I want some
information on a car doesn't mean that I want the car manufacturer to information on a car doesn't mean that I want the car manufacturer to
be able to activate my microphone whenever they please. Thus, this be able to activate my microphone whenever they please. Thus, this
suggests the need for a second consent mechanism where I only grant suggests the need for a second consent mechanism where I only grant
consent for the duration of a given call. As described in consent for the duration of a given call. As described in
Section 3.1, great care must be taken in the design of this interface Section 3.1, great care must be taken in the design of this interface
to avoid the users just clicking through. Note also that the user to avoid the users just clicking through. Note also that the user
interface chrome must clearly display elements showing that the call interface chrome must clearly display elements showing that the call
is continuing in order to avoid attacks where the calling site just is continuing in order to avoid attacks where the calling site just
leaves it up indefinitely but shows a Web UI that implies otherwise. leaves it up indefinitely but shows a Web UI that implies otherwise.
4.1.1.3. Calling to an Ad Target 4.1.3. Origin-Based Security
In both of the previous cases, the user has a direct relationship
(though perhaps a transient one) with the target of the call.
Moreover, in both cases he is actually visiting the site of the
person he is being asked to trust. However, this is not always so.
Consider the case where a user is a visiting a content site which
hosts an advertisement with an invitation to call for more
information. When the user clicks the ad, they are connected with
the advertiser or their agent.
The relationships here are far more complicated: the site the user
is actually visiting has no direct relationship with the advertiser;
they are just hosting ads from an ad network. The user has no
relationship with the ad network, but desires one with the
advertiser, at least for long enough to learn about their products.
At minimum, then, whatever consent dialog is shown needs to allow the
user to have some idea of the organization that they are actually
calling.
However, because the user also has some relationship with the hosting
site, it is also arguable that the hosting site should be allowed to
express an opinion (e.g., to be able to allow or forbid a call) since
a bad experience with an advertiser reflect negatively on the hosting
site [this idea was suggested by Adam Barth]. However, this
obviously presents a privacy challenge, as sites which host
advertisements in IFRAMEs often learn very little about whether
individual users clicked through to the ads, or even which ads were
presented.
4.1.2. Origin-Based Security
Now that we have seen another use case, we can start to reason about Now that we have seen another use case, we can start to reason about
the security requirements. the security requirements.
As discussed in Section 3.2, the basic unit of Web sandboxing is the As discussed in Section 3.2, the basic unit of Web sandboxing is the
origin, and so it is natural to scope consent to origin. origin, and so it is natural to scope consent to origin.
Specifically, a script from origin A MUST only be allowed to initiate Specifically, a script from origin A MUST only be allowed to initiate
communications (and hence to access camera and microphone) if the communications (and hence to access camera and microphone) if the
user has specifically authorized access for that origin. It is of user has specifically authorized access for that origin. It is of
course technically possible to have coarser-scoped permissions, but course technically possible to have coarser-scoped permissions, but
skipping to change at page 11, line 35 skipping to change at page 11, line 42
necessary to have individual consent in some case, this is not a necessary to have individual consent in some case, this is not a
suitable solution for (for instance) the calling service case. Where suitable solution for (for instance) the calling service case. Where
necessary, in-flow user interfaces must be carefully designed to necessary, in-flow user interfaces must be carefully designed to
avoid the risk of the user blindly clicking through. avoid the risk of the user blindly clicking through.
The other two options are designed to restrict calls to a given The other two options are designed to restrict calls to a given
target. Callee-oriented consent provided by the calling site not target. Callee-oriented consent provided by the calling site not
work well because a malicious site can claim that the user is calling work well because a malicious site can claim that the user is calling
any user of his choice. One fix for this is to tie calls to a any user of his choice. One fix for this is to tie calls to a
cryptographically established identity. While not suitable for all cryptographically established identity. While not suitable for all
cases, this approach may be useful for some. If we consider the cases, this approach may be useful for some. If we consider the case
advertising case described in Section 4.1.1.3, it's not particularly of advertising, it's not particularly convenient to require the
convenient to require the advertiser to instantiate an iframe on the advertiser to instantiate an iframe on the hosting site just to get
hosting site just to get permission; a more convenient approach is to permission; a more convenient approach is to cryptographically tie
cryptographically tie the advertiser's certificate to the the advertiser's certificate to the communication directly. We're
communication directly. We're still tying permissions to origin still tying permissions to origin here, but to the media origin
here, but to the media origin (and-or destination) rather than to the (and-or destination) rather than to the Web origin.
Web origin. [I-D.ietf-rtcweb-security-arch] and [I-D.ietf-rtcweb-security-arch] describes mechanisms which facilitate
[I-D.rescorla-rtcweb-generic-idp] describe mechanisms which this sort of consent.
facilitate this sort of consent.
Another case where media-level cryptographic identity makes sense is Another case where media-level cryptographic identity makes sense is
when a user really does not trust the calling site. For instance, I when a user really does not trust the calling site. For instance, I
might be worried that the calling service will attempt to bug my might be worried that the calling service will attempt to bug my
computer, but I also want to be able to conveniently call my friends. computer, but I also want to be able to conveniently call my friends.
If consent is tied to particular communications endpoints, then my If consent is tied to particular communications endpoints, then my
risk is limited. Naturally, it is somewhat challenging to design UI risk is limited. Naturally, it is somewhat challenging to design UI
primitives which express this sort of policy. The problem becomes primitives which express this sort of policy. The problem becomes
even more challenging in multi-user calling cases. even more challenging in multi-user calling cases.
4.1.3. Security Properties of the Calling Page 4.1.4. Security Properties of the Calling Page
Origin-based security is intended to secure against web attackers. Origin-based security is intended to secure against web attackers.
However, we must also consider the case of network attackers. However, we must also consider the case of network attackers.
Consider the case where I have granted permission to a calling Consider the case where I have granted permission to a calling
service by an origin that has the HTTP scheme, e.g., service by an origin that has the HTTP scheme, e.g.,
http://calling-service.example.com. If I ever use my computer on an http://calling-service.example.com. If I ever use my computer on an
unsecured network (e.g., a hotspot or if my own home wireless network unsecured network (e.g., a hotspot or if my own home wireless network
is insecure), and browse any HTTP site, then an attacker can bug my is insecure), and browse any HTTP site, then an attacker can bug my
computer. The attack proceeds like this: computer. The attack proceeds like this:
skipping to change at page 12, line 30 skipping to change at page 12, line 37
2. The attacker modifies my HTTP connection to inject an IFRAME (or 2. The attacker modifies my HTTP connection to inject an IFRAME (or
a redirect) to http://calling-service.example.com a redirect) to http://calling-service.example.com
3. The attacker forges the response apparently 3. The attacker forges the response apparently
http://calling-service.example.com/ to inject JS to initiate a http://calling-service.example.com/ to inject JS to initiate a
call to himself. call to himself.
Note that this attack does not depend on the media being insecure. Note that this attack does not depend on the media being insecure.
Because the call is to the attacker, it is also encrypted to him. Because the call is to the attacker, it is also encrypted to him.
Moreover, it need not be executed immediately; the attacker can Moreover, it need not be executed immediately; the attacker can
"infect" the origin semi-permanently (e.g., with a web worker or a "infect" the origin semi-permanently (e.g., with a web worker or a
popunder) and thus be able to bug me long after I have left the popped-up window that is hidden under the main window.) and thus be
infected network. This risk is created by allowing calls at all from able to bug me long after I have left the infected network. This
a page fetched over HTTP. risk is created by allowing calls at all from a page fetched over
HTTP.
Even if calls are only possible from HTTPS sites, if the site embeds Even if calls are only possible from HTTPS sites, if the site embeds
active content (e.g., JavaScript) that is fetched over HTTP or from active content (e.g., JavaScript) that is fetched over HTTP or from
an untrusted site, because that JavaScript is executed in the an untrusted site, because that JavaScript is executed in the
security context of the page [finer-grained]. Thus, it is also security context of the page [finer-grained]. Thus, it is also
dangerous to allow RTC-Web functionality from HTTPS origins that dangerous to allow WebRTC functionality from HTTPS origins that embed
embed mixed content. Note: this issue is not restricted to PAGES mixed content. Note: this issue is not restricted to PAGES which
which contain mixed content. If a page from a given origin ever contain mixed content. If a page from a given origin ever loads
loads mixed content then it is possible for a network attacker to mixed content then it is possible for a network attacker to infect
infect the browser's notion of that origin semi-permanently. the browser's notion of that origin semi-permanently.
4.2. Communications Consent Verification 4.2. Communications Consent Verification
As discussed in Section 3.3, allowing web applications unrestricted As discussed in Section 3.3, allowing web applications unrestricted
network access via the browser introduces the risk of using the network access via the browser introduces the risk of using the
browser as an attack platform against machines which would not browser as an attack platform against machines which would not
otherwise be accessible to the malicious site, for instance because otherwise be accessible to the malicious site, for instance because
they are topologically restricted (e.g., behind a firewall or NAT). they are topologically restricted (e.g., behind a firewall or NAT).
In order to prevent this form of attack as well as cross-protocol In order to prevent this form of attack as well as cross-protocol
attacks it is important to require that the target of traffic attacks it is important to require that the target of traffic
skipping to change at page 13, line 32 skipping to change at page 13, line 41
Verifying receiver consent also requires verifying the receiver wants Verifying receiver consent also requires verifying the receiver wants
to receive traffic from a particular sender, and at this time; for to receive traffic from a particular sender, and at this time; for
example a malicious site may simply attempt ICE to known servers that example a malicious site may simply attempt ICE to known servers that
are using ICE for other sessions. ICE provides this verification as are using ICE for other sessions. ICE provides this verification as
well, by using the STUN credentials as a form of per-session shared well, by using the STUN credentials as a form of per-session shared
secret. Those credentials are known to the Web application, but secret. Those credentials are known to the Web application, but
would need to also be known and used by the STUN-receiving element to would need to also be known and used by the STUN-receiving element to
be useful. be useful.
There also needs to be some mechanism for the browser to verify that There also needs to be some mechanism for the browser to verify that
the target of the traffic continues to wish to receive it. the target of the traffic continues to wish to receive it. Because
Obviously, some ICE-based mechanism will work here, but it has been ICE keepalives are indications, they will not work here, so some
observed that because ICE keepalives are indications, they will not other mechanism is needed as described in
work here, so some other mechanism is needed. [I-D.muthu-behave-consent-freshness].
[[ OPEN ISSUE: Do we need some way of verifying the expected traffic
rate, not just consent to receive traffic at all.]]
4.2.2. Masking 4.2.2. Masking
Once consent is verified, there still is some concern about Once consent is verified, there still is some concern about
misinterpretation attacks as described by Huang et al.[huang-w2sp]. misinterpretation attacks as described by Huang et al.[huang-w2sp].
As long as communication is limited to UDP, then this risk is Once consent is verified, there still is some concern about
probably limited, thus masking is not required for UDP. I.e., once misinterpretation attacks as described by Huang et al.[huang-w2sp].
communications consent has been verified, it is most likely safe to Where TCP is used the risk is substantial due to the potential
allow the implementation to send arbitrary UDP traffic to the chosen presence of transparent proxies and therefore if TCP is to be used,
destination, provided that the STUN keepalives continue to succeed. then WebSockets style masking MUST be employed.
In particular, this is true for the data channel if DTLS is used
because DTLS (with the anti-chosen plaintext mechanisms required by Since DTLS (with the anti-chosen plaintext mechanisms required by TLS
TLS 1.1) does not allow the attacker to generate predictable 1.1) does not allow the attacker to generate predictable ciphertext,
ciphertext. However, with TCP the risk of transparent proxies there is no need for masking of protocols running over DTLS (e.g.
becomes much more severe. If TCP is to be used, then WebSockets SCTP over DTLS, UDP over DTLS, etc.).
style masking MUST be employed. [Note: current thinking in the
RTCWEB WG is not to support TCP and to support SCTP over DTLS, thus
removing the need for masking.]
4.2.3. Backward Compatibility 4.2.3. Backward Compatibility
A requirement to use ICE limits compatibility with legacy non-ICE A requirement to use ICE limits compatibility with legacy non-ICE
clients. It seems unsafe to completely remove the requirement for clients. It seems unsafe to completely remove the requirement for
some check. All proposed checks have the common feature that the some check. All proposed checks have the common feature that the
browser sends some message to the candidate traffic recipient and browser sends some message to the candidate traffic recipient and
refuses to send other traffic until that message has been replied to. refuses to send other traffic until that message has been replied to.
The message/reply pair must be generated in such a way that an The message/reply pair must be generated in such a way that an
attacker who controls the Web application cannot forge them, attacker who controls the Web application cannot forge them,
generally by having the message contain some secret value that must generally by having the message contain some secret value that must
be incorporated (e.g., echoed, hashed into, etc.). Non-ICE be incorporated (e.g., echoed, hashed into, etc.). Non-ICE
candidates for this role (in cases where the legacy endpoint has a candidates for this role (in cases where the legacy endpoint has a
public address) include: public address) include:
o STUN checks without using ICE (i.e., the non-RTC-web endpoint sets o STUN checks without using ICE (i.e., the non-RTC-web endpoint sets
up a STUN responder.) up a STUN responder.)
o Use or RTCP as an implicit reachability check. o Use or RTCP as an implicit reachability check.
In the RTCP approach, the RTC-Web endpoint is allowed to send a In the RTCP approach, the WebRTC endpoint is allowed to send a
limited number of RTP packets prior to receiving consent. This limited number of RTP packets prior to receiving consent. This
allows a short window of attack. In addition, some legacy endpoints allows a short window of attack. In addition, some legacy endpoints
do not support RTCP, so this is a much more expensive solution for do not support RTCP, so this is a much more expensive solution for
such endpoints, for which it would likely be easier to implement ICE. such endpoints, for which it would likely be easier to implement ICE.
For these two reasons, an RTCP-based approach does not seem to For these two reasons, an RTCP-based approach does not seem to
address the security issue satisfactorily. address the security issue satisfactorily.
In the STUN approach, the RTC-Web endpoint is able to verify that the In the STUN approach, the WebRTC endpoint is able to verify that the
recipient is running some kind of STUN endpoint but unless the STUN recipient is running some kind of STUN endpoint but unless the STUN
responder is integrated with the ICE username/password establishment responder is integrated with the ICE username/password establishment
system, the RTC-Web endpoint cannot verify that the recipient system, the WebRTC endpoint cannot verify that the recipient consents
consents to this particular call. This may be an issue if existing to this particular call. This may be an issue if existing STUN
STUN servers are operated at addresses that are not able to handle servers are operated at addresses that are not able to handle
bandwidth-based attacks. Thus, this approach does not seem bandwidth-based attacks. Thus, this approach does not seem
satisfactory either. satisfactory either.
If the systems are tightly integrated (i.e., the STUN endpoint If the systems are tightly integrated (i.e., the STUN endpoint
responds with responses authenticated with ICE credentials) then this responds with responses authenticated with ICE credentials) then this
issue does not exist. However, such a design is very close to an issue does not exist. However, such a design is very close to an
ICE-Lite implementation (indeed, arguably is one). An intermediate ICE-Lite implementation (indeed, arguably is one). An intermediate
approach would be to have a STUN extension that indicated that one approach would be to have a STUN extension that indicated that one
was responding to RTC-Web checks but not computing integrity checks was responding to WebRTC checks but not computing integrity checks
based on the ICE credentials. This would allow the use of standalone based on the ICE credentials. This would allow the use of standalone
STUN servers without the risk of confusing them with legacy STUN STUN servers without the risk of confusing them with legacy STUN
servers. If a non-ICE legacy solution is needed, then this is servers. If a non-ICE legacy solution is needed, then this is
probably the best choice. probably the best choice.
Once initial consent is verified, we also need to verify continuing Once initial consent is verified, we also need to verify continuing
consent, in order to avoid attacks where two people briefly share an consent, in order to avoid attacks where two people briefly share an
IP (e.g., behind a NAT in an Internet cafe) and the attacker arranges IP (e.g., behind a NAT in an Internet cafe) and the attacker arranges
for a large, unstoppable, traffic flow to the network and then for a large, unstoppable, traffic flow to the network and then
leaves. The appropriate technologies here are fairly similar to leaves. The appropriate technologies here are fairly similar to
skipping to change at page 15, line 26 skipping to change at page 15, line 28
4.2.4. IP Location Privacy 4.2.4. IP Location Privacy
Note that as soon as the callee sends their ICE candidates, the Note that as soon as the callee sends their ICE candidates, the
caller learns the callee's IP addresses. The callee's server caller learns the callee's IP addresses. The callee's server
reflexive address reveals a lot of information about the callee's reflexive address reveals a lot of information about the callee's
location. In order to avoid tracking, implementations may wish to location. In order to avoid tracking, implementations may wish to
suppress the start of ICE negotiation until the callee has answered. suppress the start of ICE negotiation until the callee has answered.
In addition, either side may wish to hide their location entirely by In addition, either side may wish to hide their location entirely by
forcing all traffic through a TURN server. forcing all traffic through a TURN server.
In ordinary operation, the site learns the browser's IP address,
though it may be hidden via mechanisms like Tor
[http://www.torproject.org] or a VPN. However, because sites can
cause the browser to provide IP addresses, this provides a mechanism
for sites to learn about the user's network environment even if the
user is behind a VPN that masks their IP address. Implementations
wish to provide settings which suppress all non-VPN candidates if the
user is on certain kinds of VPN, especially privacy-oriented systems
such as Tor.
4.3. Communications Security 4.3. Communications Security
Finally, we consider a problem familiar from the SIP world: Finally, we consider a problem familiar from the SIP world:
communications security. For obvious reasons, it MUST be possible communications security. For obvious reasons, it MUST be possible
for the communicating parties to establish a channel which is secure for the communicating parties to establish a channel which is secure
against both message recovery and message modification. (See against both message recovery and message modification. (See
[RFC5479] for more details.) This service must be provided for both [RFC5479] for more details.) This service must be provided for both
data and voice/video. Ideally the same security mechanisms would be data and voice/video. Ideally the same security mechanisms would be
used for both types of content. Technology for providing this used for both types of content. Technology for providing this
service (for instance, DTLS [RFC4347] and DTLS-SRTP [RFC5763]) is service (for instance, SRTP [RFC3711], DTLS [RFC4347] and DTLS-SRTP
well understood. However, we must examine this technology to the [RFC5763]) is well understood. However, we must examine this
RTC-Web context, where the threat model is somewhat different. technology to the WebRTC context, where the threat model is somewhat
different.
In general, it is important to understand that unlike a conventional In general, it is important to understand that unlike a conventional
SIP proxy, the calling service (i.e., the Web server) controls not SIP proxy, the calling service (i.e., the Web server) controls not
only the channel between the communicating endpoints but also the only the channel between the communicating endpoints but also the
application running on the user's browser. While in principle it is application running on the user's browser. While in principle it is
possible for the browser to cut the calling service out of the loop possible for the browser to cut the calling service out of the loop
and directly present trusted information (and perhaps get consent), and directly present trusted information (and perhaps get consent),
practice in modern browsers is to avoid this whenever possible. "In- practice in modern browsers is to avoid this whenever possible. "In-
flow" modal dialogs which require the user to consent to specific flow" modal dialogs which require the user to consent to specific
actions are particularly disfavored as human factors research actions are particularly disfavored as human factors research
skipping to change at page 16, line 4 skipping to change at page 16, line 18
application running on the user's browser. While in principle it is application running on the user's browser. While in principle it is
possible for the browser to cut the calling service out of the loop possible for the browser to cut the calling service out of the loop
and directly present trusted information (and perhaps get consent), and directly present trusted information (and perhaps get consent),
practice in modern browsers is to avoid this whenever possible. "In- practice in modern browsers is to avoid this whenever possible. "In-
flow" modal dialogs which require the user to consent to specific flow" modal dialogs which require the user to consent to specific
actions are particularly disfavored as human factors research actions are particularly disfavored as human factors research
indicates that unless they are made extremely invasive, users simply indicates that unless they are made extremely invasive, users simply
agree to them without actually consciously giving consent. agree to them without actually consciously giving consent.
[abarth-rtcweb]. Thus, nearly all the UI will necessarily be [abarth-rtcweb]. Thus, nearly all the UI will necessarily be
rendered by the browser but under control of the calling service. rendered by the browser but under control of the calling service.
This likely includes the peer's identity information, which, after This likely includes the peer's identity information, which, after
all, is only meaningful in the context of some calling service. all, is only meaningful in the context of some calling service.
This limitation does not mean that preventing attack by the calling This limitation does not mean that preventing attack by the calling
service is completely hopeless. However, we need to distinguish service is completely hopeless. However, we need to distinguish
between two classes of attack: between two classes of attack:
Retrospective compromise of calling service. Retrospective compromise of calling service.
The calling service is is non-malicious during a call but The calling service is is non-malicious during a call but
subsequently is compromised and wishes to attack an older call. subsequently is compromised and wishes to attack an older call
(often called a "passive attack")
During-call attack by calling service. During-call attack by calling service.
The calling service is compromised during the call it wishes to The calling service is compromised during the call it wishes to
attack. attack (often called an "active attack").
Providing security against the former type of attack is practical Providing security against the former type of attack is practical
using the techniques discussed in Section 4.3.1. However, it is using the techniques discussed in Section 4.3.1. However, it is
extremely difficult to prevent a trusted but malicious calling extremely difficult to prevent a trusted but malicious calling
service from actively attacking a user's calls, either by mounting a service from actively attacking a user's calls, either by mounting a
MITM attack or by diverting them entirely. (Note that this attack MITM attack or by diverting them entirely. (Note that this attack
applies equally to a network attacker if communications to the applies equally to a network attacker if communications to the
calling service are not secured.) We discuss some potential calling service are not secured.) We discuss some potential
approaches and why they are likely to be impractical in approaches and why they are likely to be impractical in
Section 4.3.2. Section 4.3.2.
skipping to change at page 16, line 46 skipping to change at page 17, line 11
calling service. calling service.
If the calling service has access to the traffic keying material (as If the calling service has access to the traffic keying material (as
in SDES [RFC4568]), then retrospective attack is trivial. This form in SDES [RFC4568]), then retrospective attack is trivial. This form
of attack is particularly serious in the Web context because it is of attack is particularly serious in the Web context because it is
standard practice in Web services to run extensive logging and standard practice in Web services to run extensive logging and
monitoring. Thus, it is highly likely that if the traffic key is monitoring. Thus, it is highly likely that if the traffic key is
part of any HTTP request it will be logged somewhere and thus subject part of any HTTP request it will be logged somewhere and thus subject
to subsequent compromise. It is this consideration that makes an to subsequent compromise. It is this consideration that makes an
automatic, public key-based key exchange mechanism imperative for automatic, public key-based key exchange mechanism imperative for
RTC-Web (this is a good idea for any communications security system) WebRTC (this is a good idea for any communications security system)
and this mechanism SHOULD provide perfect forward secrecy (PFS). The and this mechanism SHOULD provide perfect forward secrecy (PFS). The
signaling channel/calling service can be used to authenticate this signaling channel/calling service can be used to authenticate this
mechanism. mechanism.
In addition, the system MUST NOT provide any APIs to extract either In addition, if end-to-end keying is in used, the system MUST NOT
long-term keying material or to directly access any stored traffic provide any APIs to extract either long-term keying material or to
keys. Otherwise, an attacker who subsequently compromised the directly access any stored traffic keys. Otherwise, an attacker who
calling service might be able to use those APIs to recover the subsequently compromised the calling service might be able to use
traffic keys and thus compromise the traffic. those APIs to recover the traffic keys and thus compromise the
traffic.
4.3.2. Protecting Against During-Call Attack 4.3.2. Protecting Against During-Call Attack
Protecting against attacks during a call is a more difficult Protecting against attacks during a call is a more difficult
proposition. Even if the calling service cannot directly access proposition. Even if the calling service cannot directly access
keying material (as recommended in the previous section), it can keying material (as recommended in the previous section), it can
simply mount a man-in-the-middle attack on the connection, telling simply mount a man-in-the-middle attack on the connection, telling
Alice that she is calling Bob and Bob that he is calling Alice, while Alice that she is calling Bob and Bob that he is calling Alice, while
in fact the calling service is acting as a calling bridge and in fact the calling service is acting as a calling bridge and
capturing all the traffic. While in theory it is possible to capturing all the traffic. Protecting against this form of attack
construct techniques which protect against this form of attack, in requires positive authentication of the remote endpoint such as
practice these techniques all require far too much user intervention explicit out-of-band key verification (e.g., by a fingerprint) or a
to be practical, given the user interface constraints described in third-party identity service as described in
[abarth-rtcweb]. [I-D.ietf-rtcweb-security-arch].
4.3.2.1. Key Continuity 4.3.2.1. Key Continuity
One natural approach is to use "key continuity". While a malicious One natural approach is to use "key continuity". While a malicious
calling service can present any identity it chooses to the user, it calling service can present any identity it chooses to the user, it
cannot produce a private key that maps to a given public key. Thus, cannot produce a private key that maps to a given public key. Thus,
it is possible for the browser to note a given user's public key and it is possible for the browser to note a given user's public key and
generate an alarm whenever that user's key changes. SSH [RFC4251] generate an alarm whenever that user's key changes. SSH [RFC4251]
uses a similar technique. (Note that the need to avoid explicit user uses a similar technique. (Note that the need to avoid explicit user
consent on every call precludes the browser requiring an immediate consent on every call precludes the browser requiring an immediate
manual check of the peer's key). manual check of the peer's key).
Unfortunately, this sort of key continuity mechanism is far less Unfortunately, this sort of key continuity mechanism is far less
useful in the RTC-Web context. First, much of the virtue of RTC-Web useful in the WebRTC context. First, much of the virtue of WebRTC
(and any Web application) is that it is not bound to particular piece (and any Web application) is that it is not bound to particular piece
of client software. Thus, it will be not only possible but routine of client software. Thus, it will be not only possible but routine
for a user to use multiple browsers on different computers which will for a user to use multiple browsers on different computers which will
of course have different keying material (SACRED [RFC3760] of course have different keying material (SACRED [RFC3760]
notwithstanding.) Thus, users will frequently be alerted to key notwithstanding.) Thus, users will frequently be alerted to key
mismatches which are in fact completely legitimate, with the result mismatches which are in fact completely legitimate, with the result
that they are trained to simply click through them. As it is known that they are trained to simply click through them. As it is known
that users routinely will click through far more dire warnings that users routinely will click through far more dire warnings
[cranor-wolf], it seems extremely unlikely that any key continuity [cranor-wolf], it seems extremely unlikely that any key continuity
mechanism will be effective rather than simply annoying. mechanism will be effective rather than simply annoying.
skipping to change at page 18, line 15 skipping to change at page 18, line 30
is a call to user Y" where Y is close to X. Even if the user actually is a call to user Y" where Y is close to X. Even if the user actually
checks the other side's name (which all available evidence indicates checks the other side's name (which all available evidence indicates
is unlikely), this would require (a) the browser to trusted UI to is unlikely), this would require (a) the browser to trusted UI to
provide the name and (b) the user to not be fooled by similar provide the name and (b) the user to not be fooled by similar
appearing names. appearing names.
4.3.2.2. Short Authentication Strings 4.3.2.2. Short Authentication Strings
ZRTP [RFC6189] uses a "short authentication string" (SAS) which is ZRTP [RFC6189] uses a "short authentication string" (SAS) which is
derived from the key agreement protocol. This SAS is designed to be derived from the key agreement protocol. This SAS is designed to be
read over the voice channel and if confirmed by both sides precludes compared by the users (e.g., read aloud over the the voice channel or
MITM attack. The intention is that the SAS is used once and then key transmitted via an out of band channel) and if confirmed by both
continuity (though a different mechanism from that discussed above) sides precludes MITM attack. The intention is that the SAS is used
is used thereafter. once and then key continuity (though a different mechanism from that
discussed above) is used thereafter.
Unfortunately, the SAS does not offer a practical solution to the Unfortunately, the SAS does not offer a practical solution to the
problem of a compromised calling service. "Voice conversion" problem of a compromised calling service. "Voice conversion"
systems, which modify voice from one speaker to make it sound like systems, which modify voice from one speaker to make it sound like
another, are an active area of research. These systems are already another, are an active area of research. These systems are already
good enough to fool both automatic recognition systems good enough to fool both automatic recognition systems
[farus-conversion] and humans [kain-conversion] in many cases, and [farus-conversion] and humans [kain-conversion] in many cases, and
are of course likely to improve in future, especially in an are of course likely to improve in future, especially in an
environment where the user just wants to get on with the phone call. environment where the user just wants to get on with the phone call.
Thus, even if SAS is effective today, it is likely not to be so for Thus, even if SAS is effective today, it is likely not to be so for
much longer. Moreover, it is possible for an attacker who controls much longer.
the browser to allow the SAS to succeed and then simulate call
failure and reconnect, trusting that the user will not notice that
the "no SAS" indicator has been set (which seems likely).
Even were SAS secure if used, it seems exceedingly unlikely that Additionally, it is unclear that users will actually use an SAS. As
users will actually use it. As discussed above, the browser UI discussed above, the browser UI constraints preclude requiring the
constraints preclude requiring the SAS exchange prior to completing SAS exchange prior to completing the call and so it must be
the call and so it must be voluntary; at most the browser will voluntary; at most the browser will provide some UI indicator that
provide some UI indicator that the SAS has not yet been checked. the SAS has not yet been checked. However, it it is well-known that
However, it it is well-known that when faced with optional mechanisms when faced with optional security mechanisms, many users simply
such as fingerprints, users simply do not check them [whitten-johnny] ignore them [whitten-johnny].
Thus, it is highly unlikely that users will ever perform the SAS
exchange.
Once uses have checked the SAS once, key continuity is required to Once uses have checked the SAS once, key continuity is required to
avoid them needing to check it on every call. However, this is avoid them needing to check it on every call. However, this is
problematic for reasons indicated in Section 4.3.2.1. In principle problematic for reasons indicated in Section 4.3.2.1. In principle
it is of course possible to render a different UI element to indicate it is of course possible to render a different UI element to indicate
that calls are using an unauthenticated set of keying material that calls are using an unauthenticated set of keying material
(recall that the attacker can just present a slightly different name (recall that the attacker can just present a slightly different name
so that the attack shows the same UI as a call to a new device or to so that the attack shows the same UI as a call to a new device or to
someone you haven't called before) but as a practical matter, users someone you haven't called before) but as a practical matter, users
simply ignore such indicators even in the rather more dire case of simply ignore such indicators even in the rather more dire case of
mixed content warnings. mixed content warnings.
Despite these difficulties, users should be afforded an opportunity
to view an SAS or fingerprint where available, as it is the only
mechanism for the user to directly verify the peer's identity without
trusting any third party identity system (assuming, of course, that
they trust their own software).
4.3.2.3. Third Party Identity 4.3.2.3. Third Party Identity
The conventional approach to providing communications identity has of The conventional approach to providing communications identity has of
course been to have some third party identity system (e.g., PKI) to course been to have some third party identity system (e.g., PKI) to
authenticate the endpoints. Such mechanisms have proven to be too authenticate the endpoints. Such mechanisms have proven to be too
cumbersome for use by typical users (and nearly too cumbersome for cumbersome for use by typical users (and nearly too cumbersome for
administrators). However, a new generation of Web-based identity administrators). However, a new generation of Web-based identity
providers (BrowserID, Federated Google Login, Facebook Connect, providers (BrowserID, Federated Google Login, Facebook Connect,
OAuth, OpenID, WebFinger), has recently been developed and use Web OAuth, OpenID, WebFinger), has recently been developed and use Web
technologies to provide lightweight (from the user's perspective) technologies to provide lightweight (from the user's perspective)
third-party authenticated transactions. It is possible (see third-party authenticated transactions. It is possible to use
[I-D.rescorla-rtcweb-generic-idp]) to use systems of this type to systems of this type to authenticate WebRTC calls, linking them to
authenticate RTCWEB calls, linking them to existing user notions of existing user notions of identity (e.g., Facebook adjacencies).
identity (e.g., Facebook adjacencies). Specifically, the third-party Specifically, the third-party identity system is used to bind the
identity system is used to bind the user's identity to cryptographic user's identity to cryptographic keying material which is then used
keying material which is then used to authenticate the calling to authenticate the calling endpoints. Calls which are authenticated
endpoints. Calls which are authenticated in this fashion are in this fashion are naturally resistant even to active MITM attack by
naturally resistant even to active MITM attack by the calling site. the calling site.
Note that there is one special case in which PKI-style certificates Note that there is one special case in which PKI-style certificates
do provide a practical solution: calls from end-users to large do provide a practical solution: calls from end-users to large
sites. For instance, if you are making a call to Amazon.com, then sites. For instance, if you are making a call to Amazon.com, then
Amazon can easily get a certificate to authenticate their media Amazon can easily get a certificate to authenticate their media
traffic, just as they get one to authenticate their Web traffic. traffic, just as they get one to authenticate their Web traffic.
This does not provide additional security value in cases in which the This does not provide additional security value in cases in which the
calling site and the media peer are one in the same, but might be calling site and the media peer are one in the same, but might be
useful in cases in which third parties (e.g., ad networks or useful in cases in which third parties (e.g., ad networks or
retailers) arrange for calls but do not participate in them. retailers) arrange for calls but do not participate in them.
4.3.2.4. Page Access to Media 4.3.2.4. Page Access to Media
Identifying the identity of the far media endpoint is a necessary but Identifying the identity of the far media endpoint is a necessary but
not sufficient condition for providing media security. In RTCWEB, not sufficient condition for providing media security. In WebRTC,
media flows are rendered into HTML5 MediaStreams which can be media flows are rendered into HTML5 MediaStreams which can be
manipulated by the calling site. Obviously, if the site can modify manipulated by the calling site. Obviously, if the site can modify
or view the media, then the user is not getting the level of or view the media, then the user is not getting the level of
assurance they would expect from being able to authenticate their assurance they would expect from being able to authenticate their
peer. In many cases, this is acceptable because the user values peer. In many cases, this is acceptable because the user values
site-based special effects over complete security from the site. site-based special effects over complete security from the site.
However, there are also cases where users wish to know that the site However, there are also cases where users wish to know that the site
cannot interfere. In order to facilitate that, it will be necessary cannot interfere. In order to facilitate that, it will be necessary
to provide features whereby the site can verifiably give up access to to provide features whereby the site can verifiably give up access to
the media streams. This verification must be possible both from the the media streams. This verification must be possible both from the
local side and the remote side. I.e., I must be able to verify that local side and the remote side. I.e., I must be able to verify that
the person I am calling has engaged a secure media mode. In order to the person I am calling has engaged a secure media mode. In order to
achieve this it will be necessary to cryptographically bind an achieve this it will be necessary to cryptographically bind an
indication of the local media access policy into the cryptographic indication of the local media access policy into the cryptographic
authentication procedures detailed in the previous sections. authentication procedures detailed in the previous sections.
skipping to change at page 20, line 15 skipping to change at page 20, line 19
However, there are also cases where users wish to know that the site However, there are also cases where users wish to know that the site
cannot interfere. In order to facilitate that, it will be necessary cannot interfere. In order to facilitate that, it will be necessary
to provide features whereby the site can verifiably give up access to to provide features whereby the site can verifiably give up access to
the media streams. This verification must be possible both from the the media streams. This verification must be possible both from the
local side and the remote side. I.e., I must be able to verify that local side and the remote side. I.e., I must be able to verify that
the person I am calling has engaged a secure media mode. In order to the person I am calling has engaged a secure media mode. In order to
achieve this it will be necessary to cryptographically bind an achieve this it will be necessary to cryptographically bind an
indication of the local media access policy into the cryptographic indication of the local media access policy into the cryptographic
authentication procedures detailed in the previous sections. authentication procedures detailed in the previous sections.
4.3.3. Malicious Peers
One class of attack that we do not generally try to prevent is
malicious peers. For instance, no matter what confidentiality
measures you employ the person you are talking to might record the
call and publish it on the Internet. Similarly, we do not attempt to
prevent them from using voice or video processing technology from
hiding or changing their appearance. While technologies (DRM, etc.)
do exist to attempt to address these issues, they are generally not
compatible with open systems and WebRTC does not address them.
Similarly, we make no attempt to prevent prank calling or other
unwanted calls. In general, this is in the scope of the calling
site, though because WebRTC does offer some forms of strong
authentication, that may be useful as part of a defense against such
attacks.
4.4. Privacy Considerations
4.4.1. Correlation of Anonymous Calls
While persistent endpoint identifiers can be a useful security
feature (see Section 4.3.2.1 they can also represent a privacy threat
in settings where the user wishes to be anonymous. WebRTC provides a
number of possible persistent identifiers such as DTLS certificates
(if they are reused between connections) and RTCP CNAMES (if
generated according to [RFC6222] rather than the privacy preserving
mode of [I-D.ietf-avtcore-6222bis]). In order to prevent this type
of correlation, browsers need to provide mechanisms to reset these
identifiers (e.g., with the same lifetime as cookies). Moreover, the
API should provide mechanisms to allow sites intended for anonymous
calling to force the minting of fresh identifiers.
4.4.2. Browser Fingerprinting
Any new set of API features adds a risk of browser fingerprinting,
and WebRTC is no exception. Specifically, sites can use the presence
or absence of specific devices as a browser fingerprint. In general,
the API needs to be balanced between functionality and the
incremental fingerprint risk.
5. Security Considerations 5. Security Considerations
This entire document is about security. This entire document is about security.
6. Acknowledgements 6. Acknowledgements
Bernard Aboba, Harald Alvestrand, Dan Druta, Cullen Jennings, Hadriel Bernard Aboba, Harald Alvestrand, Dan Druta, Cullen Jennings, Alan
Kaplan (S 4.2.1), Matthew Kaufman, Martin Thomson, Magnus Westerland. Johnston, Hadriel Kaplan (S 4.2.1), Matthew Kaufman, Martin Thomson,
Magnus Westerland.
7. References 7. Changes Since -04
7.1. Normative References o Replaced RTCWEB and RTC-Web with WebRTC, except when referring to
the IETF WG
o Removed discussion of the IFRAMEd advertisement case, since we
decided not to treat it specially.
o Added a privacy section considerations section.
o Significant edits to the SAS section to reflect Alan Johnston's
comments.
o Added some discussion if IP location privacy and Tor.
o Updated the "communications consent" section to reflrect draft-
muthu.
o Added a section about "malicious peers".
o Added a section describing screen sharing threats.
o Assorted editorial changes.
8. References
8.1. Normative References
[I-D.ietf-rtcweb-overview]
Alvestrand, H., "Overview: Real Time Protocols for Brower-
based Applications", draft-ietf-rtcweb-overview-06 (work
in progress), February 2013.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
7.2. Informative References 8.2. Informative References
[CORS] van Kesteren, A., "Cross-Origin Resource Sharing". [CORS] van Kesteren, A., "Cross-Origin Resource Sharing".
[I-D.ietf-avtcore-6222bis]
Begen, A., Perkins, C., Wing, D., and E. Rescorla,
"Guidelines for Choosing RTP Control Protocol (RTCP)
Canonical Names (CNAMEs)", draft-ietf-avtcore-6222bis-06
(work in progress), July 2013.
[I-D.ietf-rtcweb-security-arch] [I-D.ietf-rtcweb-security-arch]
Rescorla, E., "RTCWEB Security Architecture", Rescorla, E., "RTCWEB Security Architecture",
draft-ietf-rtcweb-security-arch-05 (work in progress), draft-ietf-rtcweb-security-arch-06 (work in progress),
October 2012. January 2013.
[I-D.kaufman-rtcweb-security-ui] [I-D.kaufman-rtcweb-security-ui]
Kaufman, M., "Client Security User Interface Requirements Kaufman, M., "Client Security User Interface Requirements
for RTCWEB", draft-kaufman-rtcweb-security-ui-00 (work in for RTCWEB", draft-kaufman-rtcweb-security-ui-00 (work in
progress), June 2011. progress), June 2011.
[I-D.rescorla-rtcweb-generic-idp] [I-D.muthu-behave-consent-freshness]
Rescorla, E., "RTCWEB Generic Identity Provider Perumal, M., Wing, D., R, R., and H. Kaplan, "STUN Usage
Interface", draft-rescorla-rtcweb-generic-idp-01 (work in for Consent Freshness",
progress), March 2012. draft-muthu-behave-consent-freshness-03 (work in
progress), February 2013.
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
A., Peterson, J., Sparks, R., Handley, M., and E. A., Peterson, J., Sparks, R., Handley, M., and E.
Schooler, "SIP: Session Initiation Protocol", RFC 3261, Schooler, "SIP: Session Initiation Protocol", RFC 3261,
June 2002. June 2002.
[RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC
Text on Security Considerations", BCP 72, RFC 3552, Text on Security Considerations", BCP 72, RFC 3552,
July 2003. July 2003.
[RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K.
Norrman, "The Secure Real-time Transport Protocol (SRTP)",
RFC 3711, March 2004.
[RFC3760] Gustafson, D., Just, M., and M. Nystrom, "Securely [RFC3760] Gustafson, D., Just, M., and M. Nystrom, "Securely
Available Credentials (SACRED) - Credential Server Available Credentials (SACRED) - Credential Server
Framework", RFC 3760, April 2004. Framework", RFC 3760, April 2004.
[RFC4251] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH) [RFC4251] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH)
Protocol Architecture", RFC 4251, January 2006. Protocol Architecture", RFC 4251, January 2006.
[RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security", RFC 4347, April 2006. Security", RFC 4347, April 2006.
skipping to change at page 21, line 48 skipping to change at page 23, line 31
[RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework
for Establishing a Secure Real-time Transport Protocol for Establishing a Secure Real-time Transport Protocol
(SRTP) Security Context Using Datagram Transport Layer (SRTP) Security Context Using Datagram Transport Layer
Security (DTLS)", RFC 5763, May 2010. Security (DTLS)", RFC 5763, May 2010.
[RFC6189] Zimmermann, P., Johnston, A., and J. Callas, "ZRTP: Media [RFC6189] Zimmermann, P., Johnston, A., and J. Callas, "ZRTP: Media
Path Key Agreement for Unicast Secure RTP", RFC 6189, Path Key Agreement for Unicast Secure RTP", RFC 6189,
April 2011. April 2011.
[RFC6222] Begen, A., Perkins, C., and D. Wing, "Guidelines for
Choosing RTP Control Protocol (RTCP) Canonical Names
(CNAMEs)", RFC 6222, April 2011.
[RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454,
December 2011. December 2011.
[RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol", [RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol",
RFC 6455, December 2011. RFC 6455, December 2011.
[SWF] Adobe, "SWF File Format Specification Version 19".
[abarth-rtcweb] [abarth-rtcweb]
Barth, A., "Prompting the user is security failure", RTC- Barth, A., "Prompting the user is security failure", RTC-
Web Workshop. Web Workshop.
[cranor-wolf] [cranor-wolf]
Sunshine, J., Egelman, S., Almuhimedi, H., Atri, N., and Sunshine, J., Egelman, S., Almuhimedi, H., Atri, N., and
L. cranor, "Crying Wolf: An Empirical Study of SSL Warning L. cranor, "Crying Wolf: An Empirical Study of SSL Warning
Effectiveness", Proceedings of the 18th USENIX Security Effectiveness", Proceedings of the 18th USENIX Security
Symposium, 2009. Symposium, 2009.
 End of changes. 60 change blocks. 
210 lines changed or deleted 295 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/