Re: [hybi] Shipping WebSockets

Bjoern Hoehrmann <derhoermi@gmx.net> Thu, 16 December 2010 09:48 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 AFC653A70A5 for <hybi@core3.amsl.com>; Thu, 16 Dec 2010 01:48:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.566
X-Spam-Level:
X-Spam-Status: No, score=-3.566 tagged_above=-999 required=5 tests=[AWL=-0.967, 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 fe5ODc7mUxDJ for <hybi@core3.amsl.com>; Thu, 16 Dec 2010 01:48:39 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 93D593A70AA for <hybi@ietf.org>; Thu, 16 Dec 2010 01:48:38 -0800 (PST)
Received: (qmail invoked by alias); 16 Dec 2010 09:50:21 -0000
Received: from dslb-094-222-156-080.pools.arcor-ip.net (EHLO xn--bjrn-6qa.xn--hhrmann-90a.de) [94.222.156.80] by mail.gmx.net (mp043) with SMTP; 16 Dec 2010 10:50:21 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX18LIGB6IHALrFvb1BLBGaR+0+BnGkvl4POhzgF1Cs wivVLSmiWq2M5b
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Gabriel Montenegro <gmonte@microsoft.com>
Date: Thu, 16 Dec 2010 10:50:12 +0100
Message-ID: <u0njg6p6gab1iontt8j1i8e0h4tncnu5u8@hive.bjoern.hoehrmann.de>
References: <B0B3789C-1D3C-4A4E-B37F-8F43FFC7D905@mnot.net> <AANLkTi=Z8Hcp7FBDumgMPH4YmQ1=yqOPwAxD095yzLBt@mail.gmail.com> <AANLkTik6etgMy7jDhWtg+xqhoMzsJy-4U-xveue2gD32@mail.gmail.com>, <AANLkTimw5bHL+GwkMhPC5DwLUJZzeSvfURQQy-XSJxpi@mail.gmail.com> <F16F4A8A-CFBD-44C1-B4A2-EC209E793AF7@mimectl>
In-Reply-To: <F16F4A8A-CFBD-44C1-B4A2-EC209E793AF7@mimectl>
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@ietf.org HTTP" <hybi@ietf.org>
Subject: Re: [hybi] Shipping WebSockets
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: Thu, 16 Dec 2010 09:48:40 -0000

* Gabriel Montenegro wrote:
>FYI, we have submitted a draft that's essentially the handshake that Greg proposed a while back.
>We'd like to use it as a basis for further iteration.
>
>http://tools.ietf.org/html/draft-montenegro-hybi-upgrade-hello-handshake

This seems broken to me if you make three assumptions: implementations
don't stop normal HTTP processing if they see a 101 (that's the working
assumption that makes us discuss handshakes at all); it's fairly common
for servers to send response bodies when they are not supposed to, e.g.
in response to HEAD requests, so implementations treat unexpected bodies
as part of the response to the previous request; implementations do only
very limited input validation, for instance, when looking for a method,
they just skip to the next white space octet.

With these assumptions it would seem the server->client hello would be
treated as response body and the client->server hello as request method.
Since what follows the unknown request method is essentially controlled
by the attacker, that amounts to a normal HTTP request. I am sure each
of these flaws can be found in deployed software; their combination plus
additional behavior that makes them exploitable (you also need, say,
persistent connections) is probably rare, but unless I am misreading the
document, this seems insufficient if you care a lot about this problem.
-- 
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/