Re: [hybi] Handshake was: The WebSocket protocol issues.

Scott Ferguson <ferg@caucho.com> Mon, 11 October 2010 16:55 UTC

Return-Path: <ferg@caucho.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 3850C3A6B1A for <hybi@core3.amsl.com>; Mon, 11 Oct 2010 09:55:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.521
X-Spam-Level:
X-Spam-Status: No, score=-2.521 tagged_above=-999 required=5 tests=[AWL=0.078, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AzTHtE2UPk9G for <hybi@core3.amsl.com>; Mon, 11 Oct 2010 09:55:41 -0700 (PDT)
Received: from smtp114.biz.mail.re2.yahoo.com (smtp114.biz.mail.re2.yahoo.com [66.196.116.99]) by core3.amsl.com (Postfix) with SMTP id 1EBAB3A6B1C for <hybi@ietf.org>; Mon, 11 Oct 2010 09:55:41 -0700 (PDT)
Received: (qmail 29617 invoked from network); 11 Oct 2010 16:56:50 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp114.biz.mail.re2.yahoo.com with SMTP; 11 Oct 2010 09:56:50 -0700 PDT
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: nhiO1VsVM1lJhxaD_v8OS7gzwmQgcaQsxvnWi9g6xATBet7 nqcceiid2oNTs4pwy4Gyy79SOVXgj89NOw1Fek.2DOOSa5rKrT3qwan5wpZ_ kEht57CQFnljaLfe1Yrwy.b4BGy2tjop1O73LdYE3XifNU0LSZ_U.PImcYJk sKlkKjdX_.XhJDPvHkdM6sLlcsE8Wxcs6okdCOJ9Qm4ANJhYGPF8RdotmeEk 1hGRRZR54C8E.mKZZTlEB9tv8Mh2SHZU7dxF8chem8mDZsltXP9gK9glsH0a wF15qAKo87suJk9tVmS6UWEzKaX3RmJexEYHIFaGBuEfPmNjngB0aZ5IesQ2 1zD91CUhor_GUcWmFpJadKu8GGZ8rzO3P1DcuX6gxDJq11G22X8VATvcqII9 NAuC_gipPh.TqJR9MNA--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4CB341CC.90300@caucho.com>
Date: Mon, 11 Oct 2010 09:56:44 -0700
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Bjoern Hoehrmann <derhoermi@gmx.net>
References: <4CAFA043.10101@caucho.com> <AANLkTi=eo-cjBz160FN0cn53v4-CpDSYaEneqkr_ZP7k@mail.gmail.com> <AANLkTi=B1rGBgi4jYZ_TqX9Qt1xtXoyneZtztnLOkW6b@mail.gmail.com> <4CAFBD75.4020004@caucho.com> <r7gva6tv01olonop6co9ftn63dlqmhnts3@hive.bjoern.hoehrmann.de> <4CB0915A.1030400@caucho.com> <at41b6tsldo70ddhkokv8laoie5m99p35s@hive.bjoern.hoehrmann.de> <4CB0A27D.9000307@caucho.com> <m2c1b6dkeesdbh66no4hdfn86mhkq1mfiv@hive.bjoern.hoehrmann.de> <4CB10E6D.8000706@caucho.com> <6o32b65n4kjrueo7e5fb1n9n3m2g7lfg5r@hive.bjoern.hoehrmann.de>
In-Reply-To: <6o32b65n4kjrueo7e5fb1n9n3m2g7lfg5r@hive.bjoern.hoehrmann.de>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] Handshake was: The WebSocket protocol issues.
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Oct 2010 16:55:42 -0000

Bjoern Hoehrmann wrote:
> * Scott Ferguson wrote:
>   
>> To sum up, the following are required for the attack to work:
>>
>> 1. the attacker has an account on the same physical/virtual machine as 
>> the target server
>> 2. the attacker has hijacked a browser inside the target's office IP 
>> 2.2.2.*
>> 3. the target restricts access to the office IP 2.2.2.*
>> 4. the target is too cheap to pay $11/month for a virtual instance for 
>> security
>> 5. the ISP is too lazy to add <Limit WEBSOCKET>
>> 6. the target has an open DELETE method with no authentication
>>     

I've reordered the responses.

> I agree you need 2 and 3, where to
> hijack a browser it is sufficient to trick someone on the office network
> to open a specific web page.

Necessary, not sufficient. They're not the same at all.

Your attack assumes a needle in a haystack on the part of the attacker. 
Not only must the attacker add a site to the target's own web server, he 
must hijack one of the target's own browsers while they're in the office 
which is a tiny universe of browsers.

> Well, points 1, 5, and 6 are not quite correct. For 1, both hosts must
> be behind the same IP address, how they achieve that is irrelevant. It's
> perfectly possible to run them on mutually disconnected machines.

Eric specifically insisted the shared machine configuration was the one 
he was worried about. If everyone agrees to drop that shared-machine 
scenario as implausible, we can move on to analyzing a proxied 
configuration. Until then, it's important to stick to one attack vector.

>  For 5, if the ISP blocks WEBSOCKET requests, that means none of the sites it is
> hosting can do Websocket over port 80. 

Adam insisted on a non-upgraded HTTP server. Until he drops that 
requirement, you can't change the attack to an upgraded WebSocket-aware 
server.

> If it allows it for some then the
> protection is meaningless, as the WEBSOCKET request goes to the attacker
> (and similarily on point 6, the DELETE request goes to the attacker).
You didn't address point #6, the open DELETE.

The target is pre-compromised because it has an open DELETE (point #6) 
and the target is pre-compromised because it's on the same machine as 
the attacker (point #1).

You're requiring a pre-compromised target to make this attack work.

> I do not quite understand point 4, but 
>   

The point of #4 is that the universe of potential targets is restricted 
to those who don't care about security. Any site can have its own web 
server for $11/month, eliminating this attack entirely. No site 
seriously concerned with security would use a shared machine 
configuration because it's basically pre-compromised.

In particular this restricts #3, the universe of browsers the target 
could hijack, because a small site with no security considerations is a 
tiny office with few target browsers.

-- Scott