Re: [rtcweb] No Interim on SDES at this juncture

Richard Barnes <rlb@ipv.sx> Fri, 21 June 2013 02:14 UTC

Return-Path: <rlb@ipv.sx>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BB8BF1F0D3D for <rtcweb@ietfa.amsl.com>; Thu, 20 Jun 2013 19:14:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.425
X-Spam-Level:
X-Spam-Status: No, score=-0.425 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FH_RELAY_NODNS=1.451, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RDNS_NONE=0.1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PrDGaOX8IQ27 for <rtcweb@ietfa.amsl.com>; Thu, 20 Jun 2013 19:14:23 -0700 (PDT)
Received: from mail-ob0-x236.google.com (mail-ob0-x236.google.com [IPv6:2607:f8b0:4003:c01::236]) by ietfa.amsl.com (Postfix) with ESMTP id 28A241F0D38 for <rtcweb@ietf.org>; Thu, 20 Jun 2013 19:14:23 -0700 (PDT)
Received: by mail-ob0-f182.google.com with SMTP id va7so7998163obc.13 for <rtcweb@ietf.org>; Thu, 20 Jun 2013 19:14:22 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=1J3YpGUl0W3XSH5Rx3rmDA+1YZux5/yYGM3GqQp9e3c=; b=eh4f7nNmHh18Fn42Hk05ovyB3DBL06iuUUyMY4Tmg7/YHy1mP0ZumNy4tYloGSbYsm iH2wFnvncOVvW9npz5SdLoed/5m6rnldcnDkMBqUZIe4XqcIW+I8qPF80osA8Cv+YyTe Oj1VgkwHrwBDJyq0+cQ/n2y6Ef8xlijLJjQAJENa7T2AZoq3BxxWXmS7sX9CX0RbHHvC jEECKPw/eFRO0x2SOMULUFIdqh9VPeExMPs+Hnf53z881b96LLhTGcmtFyo6vxI+LIou flHNT8bOhwhP+xzV/5USSVqDwIPqe0H8yLBRxKkhiNqYGD4gbxJz0+ZMe8hEgKHwMLq9 8QvA==
MIME-Version: 1.0
X-Received: by 10.60.95.136 with SMTP id dk8mr5803895oeb.4.1371780862699; Thu, 20 Jun 2013 19:14:22 -0700 (PDT)
Received: by 10.60.26.135 with HTTP; Thu, 20 Jun 2013 19:14:22 -0700 (PDT)
X-Originating-IP: [128.89.255.40]
In-Reply-To: <30761469-F5CC-4858-8D40-4632A7D5A682@oracle.com>
References: <CA+9kkMDnjCNXGV0GU7x6gbbZMf4WiEuVvCRY8_Fix5tmdOB-Kg@mail.gmail.com> <AD220324-EEE7-4800-8512-FD7BADA9EC34@oracle.com> <CA+9kkMDY2Z_5_1uYJ1K_ZmrJB2a1-RE7V3aPqNHQg82DyagjCg@mail.gmail.com> <2975A93F-44DA-4020-B4DE-42E7ED98C08F@oracle.com> <51BAC9BC.6070708@ericsson.com> <94846970-4694-4EC8-AEFA-AEECEE0135AA@oracle.com> <51C02EE8.5070809@ericsson.com> <AE1A6B5FD507DC4FB3C5166F3A05A4841A2C78AD@TK5EX14MBXC273.redmond.corp.microsoft.com> <CAL02cgTFSbYSX7v3q37tsjzaPMshyyBroGWr=qmy-HGm82GJFg@mail.gmail.com> <AE1A6B5FD507DC4FB3C5166F3A05A4841A2C7EF8@TK5EX14MBXC273.redmond.corp.microsoft.com> <CAL02cgQMkHu-NqEeScT2ObfknJ+3OjXi7Y=7rUJtqeu3CbewMQ@mail.gmail.com> <8E9D2A9F-3D8B-4480-A85D-320CF30FEAA6@oracle.com> <CAL02cgT3KEb0VB9kz=QCe7Mt3oj5tZvZouFe5-Uy90Cmm0H0dQ@mail.gmail.com> <30761469-F5CC-4858-8D40-4632A7D5A682@oracle.com>
Date: Thu, 20 Jun 2013 22:14:22 -0400
Message-ID: <CAL02cgSS1e5zH2YRh4uTb8qxXF5Ng5y8RxRw-bGP5xmQLkiQ+Q@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: Hadriel Kaplan <hadriel.kaplan@oracle.com>
Content-Type: multipart/alternative; boundary="089e0112caf007fe8504dfa09f14"
X-Gm-Message-State: ALoCoQkLWL34l2KWOz678TTpCVXJWfseycd3OLt0IIDrl8+kPCv903HWbE1q2SwAt1nmfRC88Fp5
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] No Interim on SDES at this juncture
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Jun 2013 02:14:27 -0000

On Thu, Jun 20, 2013 at 9:11 PM, Hadriel Kaplan
<hadriel.kaplan@oracle.com>wrote:

>
> On Jun 20, 2013, at 6:24 PM, Richard Barnes <rlb@ipv.sx> wrote:
>
> > It's more secure in the sense that it makes a malicious web server do
> more work: It forces the web server to act as the PBX and terminate DTLS,
> instead of just pulling the key out of the SDP and decrypting media.  So
> the browser user is (incrementally) better protected against the malicious
> web server.
>
> Uh huh.  So, like, the only people who could afford to do that and would
> want to do that would be criminals, drug dealers, mobsters, casinos, news
> organizations, political parties, and governments then?  Phew!  And here I
> was being worried.
>
> But wait a minute... I was under the distinct impression from people in
> this group that doing DTLS-SRTP termination on the gateways was no big deal
> for "modern" servers... that it was so cheap and trivial that your cell
> phone could do it for umpteen streams... that we shouldn't be worried about
> the overhead of it whatsoever.  Surely you can't be telling me that it's at
> all difficult for someone running a malicious web site to do it?!?
> ;)


Look, I said it was "incremental", right?  :)  At the very least, it keeps
out the script kiddies.   If you compromise my web site, you have to have
some other resources to compromise the users' voice sessions; you can't
just do it from the web server you've pwned.  You might not be up against a
tiger every time; sometimes, it's just a house cat.



> > It's more secure in the sense that JS can't access the key, so an
> injected script can't grab the key and exfiltrate it.  So the browser user
> is better protected against XSS risks.
>
> This part I'd like to understand better.  Can you explain it?
> If a Browser cannot determine what server the JS being executed for WebRTC
> API calls/callbacks came from, or cannot tell if it came from one over
> HTTPS in particular, then using SDES might be a real problem.  I was under
> the impression browsers did know those things (or at least that they're
> theoretically supposed to, ignoring that  there are "bugs" here and there).


As with many things in the web security model, the answer is "It's
complicated".  The wikipedia article on XSS is pretty good.
<http://en.wikipedia.org/wiki/Cross-site_scripting>

The upshot is that your typical web page gets cobbled together out of many
pieces, often from different domains.  Scripts from multiple sources get
imported into the overall security context of the page.  This composition
can happen deliberately (e.g., mashups, JS libraries) or maliciously (XSS).
 Let me provide an example of each:

1. Suppose I use jQuery to do pretty layout on my page.  There's nothing
that actually constrains jQuery to only do layout.  If jQuery is out to get
me, it could do something like overwrite window.PeerConnection, so that all
of the page's WebRTC calls go through the jQuery library and are subject to
its control.  So if the PeerConnection API exposes keys, jQuery can steal
them.

2. Suppose the overall page is loaded over HTTPS, but one of the scripts is
loaded over HTTP.  Then the overall security context for the page is HTTPS,
but if an attacker can hijack that HTTP load to introduce a script, in
which case he can do the same bad stuff that jQuery could in the above
example.  (This is why we have the following sentence in
draft-ietf-rtcweb-security-arch: "It is RECOMMENDED that browsers which
allow active mixed content nevertheless disable RTCWEB functionality in
mixed content settings."

There are mitigations to a lot of these sorts of issues, but some are still
being developed.  And of course, there's no guarantee that a given site
will follow all the best practices.  So it seems sensible to limit the
damage that an injected script can do.

--Richard



> > It's more secure in the sense that SDES has no end-to-end authentication
> [1], so implementing SDES creates bid-down attacks.  If an attacker can't
> get a valid identity, he just claims not to support DTLS-SRTP.  So the
> browser user is better protected against bid-down attacks by remote users
> (e.g., the malicious web server's PBX).
>
> This is just another symptom of talking to a malicious web server, and
> basically a repeat of the argument that DTLS-EKT is "more secure" because a
> malicious web server has to do a little more work to steal everything.
>  It's like being stuck in a big cage with a man-eating lion and deciding to
> run around in circles in the hopes the lion isn't going to chase you.  If
> he's hungry at all, you're dead; chasing you down is not sufficiently more
> difficult for him to stay hungry.
>
> -hadriel
>
>