Re: [rtcweb] Security implications of host candidates

Justin Uberti <juberti@google.com> Fri, 06 July 2018 19:35 UTC

Return-Path: <juberti@google.com>
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 5F84E130EF6 for <rtcweb@ietfa.amsl.com>; Fri, 6 Jul 2018 12:35:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.509
X-Spam-Level:
X-Spam-Status: No, score=-17.509 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J5zmcZYSrFBi for <rtcweb@ietfa.amsl.com>; Fri, 6 Jul 2018 12:35:43 -0700 (PDT)
Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4A92A130EF3 for <rtcweb@ietf.org>; Fri, 6 Jul 2018 12:35:43 -0700 (PDT)
Received: by mail-it0-x22b.google.com with SMTP id 16-v6so17863696itl.5 for <rtcweb@ietf.org>; Fri, 06 Jul 2018 12:35:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PVn4qyvoxZc88G/4C7Kg11pcX5eXT6Bw7JFqDOCGW9Y=; b=lExS/RhLJtW46qKDIHOZ00cVxRd307qR43uHvrptUI3Pb8mYnQUni/GgX34JbImXG6 BM91DrdhXCHNpcJzOsGkSf4+4NtVTzGLVXBNaOYKOmANu1p0WD2sXrah7S69lOA5wmPT rPb9PH8acEPwxNC3izH/e06uQ6VBh8zUep2/bVldg50sxBpe5L4CNjrfF1lkAgq2RddJ a9HsZnK/kARCbFd0u0Lub9PuxrvLXKL2bdYp8Khaa6WzouF/gnMMJC/NuzYqx8S78ymB LR59H/tnNsWx2H2xMK/O0IY6cJAa6hza75MjzZiGUR9ejKiTIonet2kioYI2pZ3rXoHp MTYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PVn4qyvoxZc88G/4C7Kg11pcX5eXT6Bw7JFqDOCGW9Y=; b=og3i21891u1j+ozpmkxlU7Ndw20QUVAQIvm1BlU5W5DLzh2AeojO+n/SvV2ZzOrrx0 PIKYfibtSd2c+tyDQkjxhW/NXXTOWNkqnBLZeIMLU9negfPR2QbGtA1nTzyc0vXEpKh+ tdS6QEE67qQOuFuWd/t4vEOMLX3DZJaXKLNAOORhG15Yn4t4j6i3jQdGqt9UWTOJg0Zz ONXXFrXRgpGf8KYQmo7kTvW/IlWtZmeTzNFRmt0Lxp0XD7Y+La5P0/eLCkio9IDC5n6g EjqQ4bIaTLYvuGVYglrvOkxrga9VULiGBg0T/yG2HHWv8iulI+iCuEyQkF2esiY8noCa hbug==
X-Gm-Message-State: APt69E0hl3VyLmcm9wz7LhyYnDKA2cuJxr04wcG04dizdhPwH1BCb3sN m3sTw4Gj/oDoVqoq76meqLpzUBIlkgB70WmMfSM5lA==
X-Google-Smtp-Source: AAOMgpdWNLJhIecCDwC75wl8K44uXT/k4pUgNwn7S/3/B6W0HSbVAumuhveSkH+Y5Mq+BZcQ4BEuJI+m3gsm7bdolbE=
X-Received: by 2002:a24:19d5:: with SMTP id b204-v6mr8907498itb.25.1530905742122; Fri, 06 Jul 2018 12:35:42 -0700 (PDT)
MIME-Version: 1.0
References: <CAOJ7v-1t_BDEEHmA4eqiS9ksYOOyHUz9LFLhQxs8FhjTdswP5w@mail.gmail.com> <CANN+akZLRdZdexjU44zPCA6vdQR0hVYT17_4P8DefC0JbRL5mA@mail.gmail.com> <CAOJ7v-2JdiMJ9iWE_cL8G7xDM6iekexJL8KLEbz0jD=p7hiGZg@mail.gmail.com> <CANN+akbv2mpyhgV5vxDHKcsA8UPsSEr0bEjJK4xYxtvbkXNA7w@mail.gmail.com> <CAOJ7v-3gHMCxHU02YG3NoqvWHtXgOSWSm+y88GNDW0qc=Sqq=A@mail.gmail.com> <CAOJ7v-3moUqwgxkz1Fek4vy-XV+WpDaO-PsQZEw4ougoCHjLww@mail.gmail.com> <CANN+akZ=Ebw41mA2wEX7-4u6q5WcZbFtM=VMLX4nDK39S=QGOQ@mail.gmail.com> <CAOJ7v-3X2Sj8Yid+i0=xadyH_Hmf4pMOF_iuOV+56Ty8HNnJuw@mail.gmail.com> <0ED74BE5-AC02-44C5-80E1-18532BD3D1FF@westhawk.co.uk>
In-Reply-To: <0ED74BE5-AC02-44C5-80E1-18532BD3D1FF@westhawk.co.uk>
From: Justin Uberti <juberti@google.com>
Date: Fri, 06 Jul 2018 12:35:30 -0700
Message-ID: <CAOJ7v-0TGqvp=MUmeEUjYZTcvV37qbYSTV0pFMoi1J0CJQ7Q4A@mail.gmail.com>
To: Tim Panton <thp@westhawk.co.uk>
Cc: youenn fablet <youennf@gmail.com>, RTCWeb IETF <rtcweb@ietf.org>, youenn fablet <yfablet@apple.com>
Content-Type: multipart/alternative; boundary="000000000000f26f70057059c462"
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/vYFSYqvDeMIfDprD3cEQR5MXDxU>
Subject: Re: [rtcweb] Security implications of host candidates
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.26
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: <https://mailarchive.ietf.org/arch/browse/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, 06 Jul 2018 19:35:47 -0000

On Fri, Jul 6, 2018 at 10:53 AM westhawk <thp@westhawk.co.uk> wrote:

> I think perhaps we should step back and see if we can block the threat
> earlier on.
>
> If I understand correctly the issue is that 2 pages of different origin
> could include 3rd party
> javascript that connects to a web service to exchange OA and establish a
> data channel
> between the pages. It then looks at the latency and figures out that the
> two are on
> the same network/device.
>
> Is there a way we can make this prohibitively expensive or inaccurate?
>
> It sorta feels like a same origin policy on the data channel might help.
> -Perhaps sign the webRTC certificates with the origin and have DTLS refuse
> a handshake if
> the two ends don’t have a common signature.
>

The issue is that two pages (probably of the same origin) can determine
that they are on the same host even when running in different browsing
contexts (e.g., one being in private browsing mode), by establishing a p2p
connection and measuring latency.

The key questions are a) whether this gives up information that is not
already present (e.g., by looking at your own IPv6 address), and b) what
mitigations might exist.

We'll have some time to discuss in Montreal.


> I’m obviously very keen to avoid forcing all data channel traffic through
> TURN.
>

>
>
> On 6 Jul 2018, at 18:15, Justin Uberti <
> juberti=40google.com@dmarc.ietf.org> wrote:
>
> Thanks for the new version. I tried a few scenarios and agree that this
> technique can identify a same-host situation fairly reliably, especially in
> wireless environments; I typically saw ~2 ms latency for same-host and 5-10
> ms latency (with occasional spikes) for over-the-air connections.
>
> I'm still not quite sure what we should do about it; as noted, public
> IPv4 + user-agent (http://www.whatsmyua.info/) is probably unique in the
> vast majority of cases, and the situation is unavoidable with IPv6.
>
>
>
> On Wed, Jul 4, 2018 at 2:12 PM youenn fablet <youennf@gmail.com> wrote:
>
>>
>> Le mar. 3 juil. 2018 à 14:40, Justin Uberti <juberti@google.com> a
>> écrit :
>>
>>> Updated fiddle (outputs to display as well as console):
>>> https://jsfiddle.net/juberti/x7a8ut0q/37/
>>>
>>
>> Right, this shows the local loopback latency.
>>
>>
>>> On Tue, Jul 3, 2018 at 11:16 AM Justin Uberti <juberti@google.com>
>>> wrote:
>>>
>>>> I wasn't able to get that example to work (tried with 2 Chrome and 2
>>>> Safari instances, got a setRemoteDescription error both times), but I was
>>>> able to make a JSFiddle <https://jsfiddle.net/juberti/x7a8ut0q/25/>
>>>> which does something similar in a single page. At present, even host-host
>>>> connections were seeing a 2 ms RTT, possibly because of the clamping
>>>> <https://developer.mozilla.org/en-US/docs/Web/API/Performance/now>
>>>> that has been applied to performance.now() to deal with Spectre et al.
>>>>
>>>
>> I updated
>> https://evening-thicket-98446.herokuapp.com/src/content/peerconnection/datachannel-b2b/,
>> it should hopefully be more intuitive to use this time:
>> 1. load the page in one device
>> 2. load the link provided by the page on another device
>> 3. click 'call' on the first page
>> 4. a latency value should appear on the page and be continuously updated
>>
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>
>
>