Re: [rtcweb] Strawman for how to prevent voice-hammer without ICE

Matthew Kaufman <matthew.kaufman@skype.net> Thu, 28 July 2011 17:29 UTC

Return-Path: <matthew.kaufman@skype.net>
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 98C1E11E80FC for <rtcweb@ietfa.amsl.com>; Thu, 28 Jul 2011 10:29:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.889
X-Spam-Level:
X-Spam-Status: No, score=-1.889 tagged_above=-999 required=5 tests=[AWL=-0.530, BAYES_00=-2.599, SARE_LWSHORTT=1.24]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iDPTNiS+oCzO for <rtcweb@ietfa.amsl.com>; Thu, 28 Jul 2011 10:29:38 -0700 (PDT)
Received: from mx.skype.net (mx.skype.net [78.141.177.88]) by ietfa.amsl.com (Postfix) with ESMTP id A905D11E80D0 for <rtcweb@ietf.org>; Thu, 28 Jul 2011 10:29:37 -0700 (PDT)
Received: from mx.skype.net (localhost [127.0.0.1]) by mx.skype.net (Postfix) with ESMTP id EF8F016FF; Thu, 28 Jul 2011 19:29:36 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=skype.net; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=mx; bh=Sa 6CS9AAijbSy3JryAkLTG10p/k=; b=df9jzDKfvBvRaHcePe5R1y7PQqJfre4PIo mtJRTDYDO8C8SByP+u+HX0G+yFS9ckrba4W/vmTXJxfaZl47RZFG34cFACvBDtOJ 6dPOMbHOcbi+apCk2LVWtltx6iXT09kEe4GW8CguVerhqe//9QuDU/DXwOkG1Mbo bVQAOUJEE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=skype.net; h=subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; q=dns; s=mx; b=H2tWe3kgKz4mVVWGtD4BNi tflINOXGMNf8zfe63C3ClLvBEzFUsugZf9IK91/Z6iHHSeWaoYBwR96jOthMgryv UX+4m7sCdKk/kzsBsyoBWBR1HOf96/6cvuExWM0B1K4Oha28rqURs0Acnkd04ibx GXOJMfhOQOMumem/3agZk=
Received: from zimbra.skype.net (zimbra.skype.net [78.141.177.82]) by mx.skype.net (Postfix) with ESMTP id E4A397F8; Thu, 28 Jul 2011 19:29:36 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1]) by zimbra.skype.net (Postfix) with ESMTP id CA7F23508109; Thu, 28 Jul 2011 19:29:36 +0200 (CEST)
X-Virus-Scanned: amavisd-new at lu2-zimbra.skype.net
Received: from zimbra.skype.net ([127.0.0.1]) by localhost (zimbra.skype.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8JRLCE83pyIH; Thu, 28 Jul 2011 19:29:36 +0200 (CEST)
Received: from dhcp-103b.meeting.ietf.org (dhcp-103b.meeting.ietf.org [130.129.16.59]) by zimbra.skype.net (Postfix) with ESMTPSA id 882113508113; Thu, 28 Jul 2011 19:29:35 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset="us-ascii"
From: Matthew Kaufman <matthew.kaufman@skype.net>
In-Reply-To: <E48CF4EF-50EE-4C08-BECA-9969B9A58F39@acmepacket.com>
Date: Thu, 28 Jul 2011 13:29:33 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <D2427BCF-0289-4D29-B812-BAE4107A953A@skype.net>
References: <B6527F21-4DE2-46B1-AE2E-891D56461313@acmepacket.com> <8D6E4E5F-E1E4-47FB-8D8D-F3D9976AC29E@skype.net> <E48CF4EF-50EE-4C08-BECA-9969B9A58F39@acmepacket.com>
To: Hadriel Kaplan <HKaplan@acmepacket.com>
X-Mailer: Apple Mail (2.1082)
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Strawman for how to prevent voice-hammer without ICE
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: Thu, 28 Jul 2011 17:29:38 -0000

On Jul 28, 2011, at 11:58 AM, Hadriel Kaplan wrote:

> 
> On Jul 28, 2011, at 7:38 AM, Matthew Kaufman wrote:
> 
>> 
>> This is not as safe. There are devices/software that do things upon receipt of RTP packets (like play them out through loudspeakers, or initiate ringing of the softphone), and more important RTP packets are not carefully designed to avoid imitating other types of traffic such as SNMP, whereas STUN packets contain a relatively large header with a magic number that makes them much less likely to be misinterpreted by other protocols.
> 
> No it's not as "safe", but it may be safe enough.  

I disagree. You need both 1) a large number of bits of transaction ID (on the order of the 128 bits provided by STUN), and 2) a shared secret passed out of band between the two ends (for example, the short term credentials used by STUN connectivity checks).

Failing to provide both of the above opens possibilities for attacks that I believe will not be acceptable to browser vendors due to the relative danger of exposing this capability "behind the firewall."

> With regards to being misinterpreted by others, since the web server javascript cannot define the actual payload of the RTP (correct?)

If datagrams are also allowed, a remarkable amount of the data being sent can be chosen from the Javascript. The datagram proposals assume that ICE is used to get consent ahead of time.

> , and things like sequence numbers would also be randomly chosen by the browser, so it's not like the javascript can purposefully craft an RTP packet to immitate other protocols.  For example it would be an astronmoical coincidence for any given RTP packet to be parsable as SNMP BER for a given ASN.1 dictionary.
> (Also as an aside, if I recall correctly SNMP is actually distinguishable from RTP by the first byte)
> 
> 
>> Additionally the STUN connectivity check used for ICE contains short-term credentials and a transaction ID that is unknown to the signaling layer (or Javascript) that ensure that you are in fact conducting a pairwise negotiation with the far end that you are thinking of. With RTP/RTCP packets alone you can create attacks both from the browser (by sending RTP/RTCP and using something else to spoof enough replies that the test passes) or on the browser (by sending it RTP from somewhere else).
> 
> If we used RTCP as part of the check, the reports contain a last received sequence number which would not be known to the javascript.  (it's a hack to be sure, but if we want to handle non-RTCWEB devices, a hack's better than nothing)

I don't believe this is enough bits, and it lacks the shared secret mechanism.

> 
> 
>> And of course ICE, or something like it, is required anyway for doing NAT traversal.
> 
> Not when communicating with legacy voip devices and the PSTN.

Correct, but my point is that the ICE implementation must exist.

> 
> 
>> I don't believe this is the case. There's so many cases where one side sends A+V but the other side sends audio only, and sending HD-video-rate traffic to an unsuspecting endpoint is unacceptable.
> 
> I should probably write it up in a draft to be much more clear, but to the above point that's not an issue.  I'm not suggesting the browser be allowed to do this RTP-based verification for any and all use-cases.  I'm only suggesting it to handle the large population of legacy VoIP devices, including to the PSTN.  Video without audio, or any future data-type streams, would not apply and we don't need to handle them this way and can restrict the browser from allowing it.

Again, I don't think it provides adequate protection to the other devices on the network behind the firewall that the browser is on. But do please write your proposal up in more detail.

Matthew Kaufman