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

Greg Wilkins <gregw@webtide.com> Mon, 27 September 2010 07:15 UTC

Return-Path: <gregw@webtide.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 98FE33A6C7E for <hybi@core3.amsl.com>; Mon, 27 Sep 2010 00:15:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.148
X-Spam-Level:
X-Spam-Status: No, score=-0.148 tagged_above=-999 required=5 tests=[AWL=-1.371, BAYES_50=0.001, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_33=0.6]
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 3dCtsNRo1z5i for <hybi@core3.amsl.com>; Mon, 27 Sep 2010 00:15:26 -0700 (PDT)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by core3.amsl.com (Postfix) with ESMTP id B56D73A67CC for <hybi@ietf.org>; Mon, 27 Sep 2010 00:15:25 -0700 (PDT)
Received: by iwn3 with SMTP id 3so5289094iwn.31 for <hybi@ietf.org>; Mon, 27 Sep 2010 00:16:03 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.231.151.135 with SMTP id c7mr8488811ibw.184.1285571763811; Mon, 27 Sep 2010 00:16:03 -0700 (PDT)
Received: by 10.231.178.88 with HTTP; Mon, 27 Sep 2010 00:16:03 -0700 (PDT)
In-Reply-To: <AANLkTinRRX7GURvLvHAm5cNY2GXrAoRAEo9WW8S-Ae85@mail.gmail.com>
References: <AANLkTikszM0pVE-0dpZ2kv=i=y5yzS2ekeyZxtz9N=fQ@mail.gmail.com> <62B5CCE3-79AF-4F60-B3A0-5937C9D291D7@apple.com> <AANLkTikKc+4q_Q1+9uDo=ZpFF6S49i6vj2agZOGWVqKm@mail.gmail.com> <E2D38FF3-F1B9-4305-A7FC-A9690D2AEB4A@apple.com> <AANLkTikRYB_suPmSdH3uzGmdynozECRszDx+BpUvtZ4h@mail.gmail.com> <AANLkTikfYOCOm_+g3=QCTFOCo=rYsj8WpX8AS65qgkPm@mail.gmail.com> <AANLkTim0R-cHCKiMw-zA7r+NrQbbiyM2xPLVm8G-shCx@mail.gmail.com> <AANLkTinRRX7GURvLvHAm5cNY2GXrAoRAEo9WW8S-Ae85@mail.gmail.com>
Date: Mon, 27 Sep 2010 17:16:03 +1000
Message-ID: <AANLkTimnO7OkBO2ujmK2XVEb5sdnsS=JNpr9+r3BNriJ@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Adam Barth <ietf@adambarth.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
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, 27 Sep 2010 07:15:27 -0000

Adam,

Your email appears to proceed from the assumption that I'm arguing
against a TLS+NPN solution.   I'm am not and fully support efforts to
propose that as an alternative (and potentially only) websocket
handshake.

With regards to the HTTP upgrade handshake, I am trying to get this WG
to participate in exactly the analysis that you suggest is lacking so
that we may have some reasoned assurance.  Telling us that there are
some things that we have not thought of, while not even giving a vague
suggestion as to what they might be is hardly helpful.

I have tried to put the discussion in terms of capabilities that WS
might add to a browser, specifically are we enabling the transmission
of any hazardous bytes sequences to unsuspecting servers?    Both the
-02 draft has several defences that stop a compromised client from
being able to send the required structure of bytes and from knowing
what bytes they should send even if they could.   I do not believe
that my proposed handshake changes have weakened these defences in any
way and all you have been able to say to the contrary is that they
might have.

Well I can say the same: TLS might be vulnerable to man in the middle
attacks and recent experience proves that to be plausible. But that is
not an real argument against TLS, just the same as your suggestion
that my proposal might have weakened the handshake.

regards







On 27 September 2010 16:26, Adam Barth <ietf@adambarth.com> wrote:
> Your email appears to proceed from the assumption that the current
> handshake is sufficiently robust to cross-protocol attacks.  That
> might well be true.  However, I don't think we have any reasonable
> assurance that it is true.  If we can't have reasonable assurance of
> the security of the -76 handshake, then we certainly cannot have such
> assurance about your handshake since it is strictly weaker.
>
> On the other hand, we can be reasonably assured that the TLS+NPN
> handshake resists cross-protocol attacks.  I provided a security
> argument to that effect in an email a while ago.  No one has provided
> a similarly detailed security analysis of the -76 handshake or of the
> handshake that you propose.
>
> Adam
>
>
> On Sun, Sep 26, 2010 at 11:16 PM, Greg Wilkins <gregw@webtide.com> wrote:
>> On 27 September 2010 11:35, Adam Barth <ietf@adambarth.com> wrote:
>>> Browser also protect intranet servers which use connectivity as their
>>> sole means of authentication/authorization.
>>
>> True.
>>
>> So does the presence of WS capability in the browser and/or server
>> provide any additional capability to exploit such servers?
>>
>> If so, do the measures in the current and proposed handshakes help in
>> any significant way?
>>
>> If not, is there something that we need to do to explicitly protect
>> port ranges etc in the same way that browsers currently do for XHR?
>>
>>
>>> The existing HTTP mechanisms exposed to untrusted content in browser
>>> already respects these security invariants.  In adding new network
>>> APIs, browser wish to continue to maintain these invariants.
>>
>> Excellent and both the requirements document and all recent versions
>> of the specification have included text to the effect that the
>> existing browser security model will be used.
>>
>> Maybe that text needs clarification, but nobody has suggested watering
>> it down in any way.
>>
>>
>>
>>>> I think that any server that "performs any side effects in response to
>>>> messages from the client" will have a security vulnerability if they
>>>> do not correctly check the authentication and authorization of the
>>>> client.
>>>
>>> This is not an accurate understanding of the security invariants
>>> browsers seek to maintain.
>>
>> I was not attempting to describe the security invariants that a
>> browser seeks to maintain.
>>
>> I was making the observation that a server that performs side effects
>> on the basis of unauthenticated requests will by definition have a
>> security issue.   The ability to trigger that issue from a cross
>> protocol attack is essentially irrelevant if we are proposing the wide
>> spread deployment of a same protocol mechanism that can trigger the
>> same side effects.
>>
>>
>>>> Eventually most browsers will have WS available to the
>>>> javascript, so a server that is so vulnerable will be able to be
>>>> exploited just with WS instead of trying to trick HTTP.
>>>
>>> Browser seek to protect servers that have never heard of WebSockets
>>> and have no interest in these newer technologies.  From that
>>> perspective, it's important to compare the security invariants of the
>>> browser before and after introducing WebSockets.  We need to study any
>>> change in these invariants to make sure they don't introduce security
>>> vulnerabilities in existing servers.  This is a prerequisite for
>>> exposing the WebSocket API to untrusted content in the browser.
>>
>> Which is precisely why I have been advocating that we study the impact
>> of the current handshake and proposed changes.
>>
>> We need to discuss what type of byte sequences can a compromised WS
>> capable browser generate that a HTTP capable browser cannot? Are any
>> of these types of sequences a threat to WS unaware servers?   Does the
>> space counting and unframed bytes help in any way?
>>
>> I have suggested that the defence in depth of Sec-headers, nonce
>> generation, handshake sequence requirements and normal web
>> authentication/authorization should limit the byte sequence that can
>> be generated to nothing that is more harmful that what can already
>> been generated.
>>
>> All I have asked is if you have done any study that indicates that
>> suggests that space counting and unframed data provide any additional
>> meaningful security?
>>
>> regards
>>
>