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

Bjoern Hoehrmann <derhoermi@gmx.net> Sat, 02 October 2010 01:07 UTC

Return-Path: <derhoermi@gmx.net>
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 990243A6C86 for <hybi@core3.amsl.com>; Fri, 1 Oct 2010 18:07:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.642
X-Spam-Level:
X-Spam-Status: No, score=-2.642 tagged_above=-999 required=5 tests=[AWL=-0.043, 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 bsZ64+0nO4F4 for <hybi@core3.amsl.com>; Fri, 1 Oct 2010 18:07:22 -0700 (PDT)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 11AA93A6C5E for <hybi@ietf.org>; Fri, 1 Oct 2010 18:07:21 -0700 (PDT)
Received: (qmail invoked by alias); 02 Oct 2010 01:08:09 -0000
Received: from dslb-094-222-150-219.pools.arcor-ip.net (EHLO hive) [94.222.150.219] by mail.gmx.net (mp041) with SMTP; 02 Oct 2010 03:08:09 +0200
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1+4Sfl07Ly4DYIjSmx2cDpNNd66VLtLyp+SVGE1s3 kLuSu0phTH33V1
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Scott Ferguson <ferg@caucho.com>
Date: Sat, 02 Oct 2010 03:08:08 +0200
Message-ID: <4m0da6tid6vvj7e71t1jdqe5hju62nk0ra@hive.bjoern.hoehrmann.de>
References: <AANLkTikcH1W3bQwumqHbe-Yqa3XdoJqCa2b-mZuvoQ7g@mail.gmail.com> <9746E847-DC8B-45A7-ADF3-2ADB9DA7F82E@apple.com> <AANLkTik9igUwoxVrktoBoZrPoUW=Tjh7HyVbGJgQYes-@mail.gmail.com> <9F595226-FA0A-4C38-A6D0-0F4214BD7D21@apple.com> <4CA4BE10.1010709@caucho.com> <AANLkTi=wKFnNOuM+U3fktAFRn3R5OZ7c6PR2W3EAy7tm@mail.gmail.com> <4CA53E6B.1040808@caucho.com> <AANLkTikOyvF5AHTf4sDD=rWmK2FTD6R6LaHa4KTqkbcm@mail.gmail.com> <4CA68098.8010404@caucho.com>
In-Reply-To: <4CA68098.8010404@caucho.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
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: Sat, 02 Oct 2010 01:07:24 -0000

* Scott Ferguson wrote:
>Adam Barth wrote:
>> As a side note, using an exotic HTTP method is not a good idea.  The
>> first few bytes of the clients initial message are absolutely
>> critical.  Picking an exotic HTTP method is just rolling the dice
>> w.r.t. what protocols an attacker can exploit.  For example, some
>> attacks from HTTP to DNS rely critically on the fact that the first
>> byte of an HTTP POST message is an uppercase P.  The kinds of things
>> you can do with an uppercase W as the first byte are largely
>> unstudied.
>
>You misunderstand entirely.
>
>It's not an exotic HTTP method; it's identifying the protocol by the 
>initial sequence of bytes.
>
>If every client for every protocol sent a non-hijackable unique protocol 
>identifier as its initial sequence, and every server for every protocol 
>verified the protocol identifier before accepting any further bytes, 
>then cross protocol attacks would be impossible.
>
>We can't fix the older protocols that don't identify themselves 
>immediately and don't validate, but we can ensure that new protocols do.

I am not sure you understood Adam's point. Right now an attacker cannot
trick some person into opening a web page where the browser will then
open a TCP connection to a host and port of the attackers choosing and
have it send "WEBSOCKET ..." to it, and there may be environments and
protocols where that allows some form of attack. Since the attacker has
a good amount of control over the path that follows the verb, that's not
entirely impossible and should be considered if the group decides to use
a "WEBSOCKET" method.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/