Re: [OAUTH-WG] Auth Code Swap Attack
"William J. Mills" <wmills@yahoo-inc.com> Sun, 14 August 2011 04:15 UTC
Return-Path: <wmills@yahoo-inc.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1D2B921F8715 for <oauth@ietfa.amsl.com>; Sat, 13 Aug 2011 21:15:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.243
X-Spam-Level:
X-Spam-Status: No, score=-17.243 tagged_above=-999 required=5 tests=[AWL=0.355, BAYES_00=-2.599, HTML_MESSAGE=0.001, USER_IN_DEF_WHITELIST=-15]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BUv7NF5a0M8Q for <oauth@ietfa.amsl.com>; Sat, 13 Aug 2011 21:15:47 -0700 (PDT)
Received: from nm34-vm5.bullet.mail.bf1.yahoo.com (nm34-vm5.bullet.mail.bf1.yahoo.com [72.30.239.77]) by ietfa.amsl.com (Postfix) with SMTP id 60EBC21F86BD for <oauth@ietf.org>; Sat, 13 Aug 2011 21:15:47 -0700 (PDT)
Received: from [98.139.212.153] by nm34.bullet.mail.bf1.yahoo.com with NNFMP; 14 Aug 2011 04:16:24 -0000
Received: from [98.139.212.248] by tm10.bullet.mail.bf1.yahoo.com with NNFMP; 14 Aug 2011 04:16:24 -0000
Received: from [127.0.0.1] by omp1057.mail.bf1.yahoo.com with NNFMP; 14 Aug 2011 04:16:24 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 743607.35354.bm@omp1057.mail.bf1.yahoo.com
Received: (qmail 77367 invoked by uid 60001); 14 Aug 2011 04:16:24 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo-inc.com; s=ginc1024; t=1313295383; bh=x4WSDRi6sUawrDfcJCcMK1+BTtPrSLBDSyhHpNCKa+0=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=Q6oYmHmu6hvFBMIbJtGsPdCUhRXDbIir+pR2S1tRnQaxfNEdtdd4yztzZ9xO/Vo7bVNfEHJk5Gv+QpkoSaaxFweegBzpQy4fiuoQztxGprdCX+RCwWSI4PRv96VwBrRNWUIjOw1F8aIqa5QelXzpA7QKp7Tgo6WAVCTfJRx+XHo=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=ginc1024; d=yahoo-inc.com; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=opUfFfcYKAE+caUySpYx+ZM+5s6pgZE19L1nsEsMmuQdPLsVdG4x73bR2Hp3YZigwjRpAsuXUWLeHxr8+ZnqNPvxNmyOJNiL3eZxY2/us7l37RAAymwslnsEfqTDljOg/MHOL4AzREOLXeEZd8VZLEuuW1UMw3HV0VxNvSpeB+k=;
X-YMail-OSG: MA6IhAUVM1lC7noGX.rC8R2gA.UGl_Iq0rijdEGO_98Zayr uV7spuGZi.jQV19XIj5WKqSoGgE2wWCw.ClzSWB11ls50zaTKbkIMwHl64Tc lkSPBCtKU8x32rb7kwdQdtYz_oR04FqfZwzzLVKMso5Ryx9zAfbWkdqA_H.z DNTsAKZaurN41Rjp61bpIa1ZD0B_Bxz5eh9jHuoPMt2u_Nd12BRJtJuYK.68 3F8G0yli4hZMOIrlArTiANMz6TAFyGLyWOqBljJXRpTtY4gNe0ZtxoGOmB7P rbAKp9r8OIUbgbznDrTUbpC6x50dYFqRnbtwR2I5.VPS_VOFdYPwjZ1qACMf pT8cp6LBWUZf8iju0Y8b5oymslJxose32FO90Er_Sm.oxV7B0yHsEAUYSmbk pfq7lUfmHIPGt8YAwQcrMWgXyTGXgyTSDOhVZ1kWVDNoRCflya.CVSIfdfPE .d__ciCgmZMeOXHjum2o_2GhgKhU5AtWWA5tq0uxrT8SL7kB6up.mu5TgtW9 0P1P5iCeNnocZK87HnqnhMCKSCgkcx2hscy.p
Received: from [209.131.62.115] by web31808.mail.mud.yahoo.com via HTTP; Sat, 13 Aug 2011 21:16:23 PDT
X-RocketYMMF: william_john_mills
X-Mailer: YahooMailWebService/0.8.113.315625
References: <CA6BD818.17E81%eran@hueniverse.com> <B478E5DF-6B05-4BAA-ACF3-B5C7C7B1F1AA@oracle.com>
Message-ID: <1313295383.69882.YahooMailNeo@web31808.mail.mud.yahoo.com>
Date: Sat, 13 Aug 2011 21:16:23 -0700
From: "William J. Mills" <wmills@yahoo-inc.com>
To: Phil Hunt <phil.hunt@oracle.com>, Eran Hammer-Lahav <eran@hueniverse.com>
In-Reply-To: <B478E5DF-6B05-4BAA-ACF3-B5C7C7B1F1AA@oracle.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1951798441-1313295383=:69882"
Cc: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Auth Code Swap Attack
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: "William J. Mills" <wmills@yahoo-inc.com>
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Aug 2011 04:15:49 -0000
The defense is the same though, correct? ________________________________ From: Phil Hunt <phil.hunt@oracle.com> To: Eran Hammer-Lahav <eran@hueniverse.com> Cc: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org> Sent: Saturday, August 13, 2011 4:41 PM Subject: Re: [OAUTH-WG] Auth Code Swap Attack There are two CSRF variations scenarios that I see. I can attack you and give my client access to your resources (original attack on the "resource"). I can attack you and give your client access to my resource (new attack on the "client"). Attack on the client vs. attack on the resource may be misleading here. Draft 20 only referred to attacks on the "resource" in its original CSRF description. Phil @independentid www.independentid.comphil.hunt@oracle.com On 2011-08-13, at 7:30 AM, Eran Hammer-Lahav wrote: All OAuth CSRF attacks are on the client. > > >EHL > >From: Phil Hunt <phil.hunt@oracle.com> >Date: Sat, 13 Aug 2011 00:21:50 -0700 >To: Torsten Lodderstedt <torsten@lodderstedt.net> >Cc: Eran Hammer-lahav <eran@hueniverse.com>, "OAuth WG (oauth@ietf.org)" <oauth@ietf.org> >Subject: Re: [OAUTH-WG] Auth Code Swap Attack > > > >+1 (to putting more detail in the Threat Model document) >> >> >>Yes, this is another CSRF attack (hence the change to 10.2). >> >> >>What is *new* is this is an attack on the client application rather than the resource server. As such, I agree this new attack vector is well deserving of wider review and discussion before finalizing the draft. >> >> >>Phil >> >> >>@independentid >>www.independentid.comphil.hunt@oracle.com >> >> >> >> >> >> >>On 2011-08-12, at 11:58 PM, Torsten Lodderstedt wrote: >> >> >>> >>>Am 12.08.2011 23:52, schrieb Eran Hammer-Lahav: >>>This is really just a flavor of CSRF attacks. I have no objections to better documenting it (though I feel the current text is already sufficient), but we can't realistically expect to identify and close every possible browser-based attack. A new one is invented every other week. >>>> >>>> >>>>The problem with this text is that developers who do no understand CSRF attacks are not likely to implement it correctly with this information. Those who understand it do not need the extra verbiage which is more confusing than helpful. >>>We are constantly facing the fact that a comprehensive description of security threats needs more space than we have in the core draft. That's the reason why the security document has 63 pages and that's also the reason why we decided to let the core spec refer to this document for in-depth explanations. This holds true for this threat as well. >>> >>>regards, >>>Torsten. >>> >>> >>> >>>> >>>>As for the new requirements, they are insufficient to actually accomplish what the authors propose without additional requirements on state local storage and verification to complete the flow. Also, the proposed text needs clarifications as noted below. >>>> >>>> >>>> >>>>From: Anthony Nadalin <tonynad@microsoft.com> >>>>Date: Fri, 12 Aug 2011 12:06:36 -0700 >>>>To: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org> >>>>Subject: [OAUTH-WG] Auth Code Swap Attack >>>> >>>> >>>> >>>> >>>> >>>> >>>>Recommended Changes to draft-ietf-oauth-v2 >>>>> >>>>>In section 4, request options (e.g. 4.1.1) featuring "state" should change from: >>>>> >>>>>state >>>>>OPTIONAL. An opaque value used by the client to maintain state between the request and callback. The authorization server includes this value when redirecting the user-agent back to the client. >>>>> >>>>>to: >>>>> >>>>>state >>>>>REQUIRED. An opaque value used by the client to maintain state between the request and callback. The authorization server includes this value when redirecting the user-agent back to the client. The encoded value SHOULD enable the client application to determine the user-context that was active at the time of the request (see section 10.12). The value MUST NOT be guessable or predictable, and MUST be kept confidential. >>>>> >>>> >>>> >>>>Making the parameter required without making its usage required (I.e. "value SHOULD enable") accomplishes nothing. Also, what does "MUST be kept confidential" mean? Confidential from what? Why specify an "encoded value"? >>>> >>>> >>>> >>>>Section 10.12 Cross-Site Request Forgery >>>>> >>>>>Change to: >>>>> >>>>>Cross-site request forgery (CSRF) is a web-based attack whereby HTTP requests are transmitted from the user-agent of an end-user the server trusts or has authenticated. CSRF attacks enable the attacker to intermix the attacker's security context with that of the resource owner resulting in a compromise of either the resource server or of the client application itself. In the OAuth context, such attacks allow an attacker to inject their own authorization code or access token into a client, which can result in the client using an access token associated with the attacker's account rather than the victim's. Depending on the nature of the client and the protected resources, this can have undesirable and damaging effects. >>>>> >>>>>In order to prevent such attacks, the client application MUST encode a non-guessable, confidential end-user artifact and submit as the "state" parameter to authorization and access token requests to the authorization server. The client MUST keep the state value in a location accessible only by the client or the user-agent (i.e., protected by same-origin policy), for example, using a DOM variable, HTTP cookie, or HTML5 client-side storage. >>>>> >>>>>The authorization server includes the value of the "state" parameter when redirecting the user-agent back to the client. Upon receiving a redirect, the client application MUST confirm that returned value of "state" corresponds to the state value of the user-agent's user session. If the end-user session represents an authenticated user-identity, the client MUST ensure that the user-identity has NOT changed. >>>>> >>>> >>>> >>>>The above text uses 'user-context' and this 'user-identity'. Neither term is defined. >>>> >>>> >>>>EHL >>>> >>>> >>>>_______________________________________________ OAuth mailing list OAuth@ietf.orghttps://www.ietf.org/mailman/listinfo/oauth _______________________________________________ >>>OAuth mailing list >>>OAuth@ietf.org >>>https://www.ietf.org/mailman/listinfo/oauth >>> >> _______________________________________________ OAuth mailing list OAuth@ietf.org https://www.ietf.org/mailman/listinfo/oauth
- [OAUTH-WG] Auth Code Swap Attack Anthony Nadalin
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Torsten Lodderstedt
- Re: [OAUTH-WG] Auth Code Swap Attack Phil Hunt
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack William J. Mills
- Re: [OAUTH-WG] Auth Code Swap Attack Phil Hunt
- Re: [OAUTH-WG] Auth Code Swap Attack William J. Mills
- Re: [OAUTH-WG] Auth Code Swap Attack Phillip Hunt
- Re: [OAUTH-WG] Auth Code Swap Attack John Kemp
- Re: [OAUTH-WG] Auth Code Swap Attack John Kemp
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Anthony Nadalin
- Re: [OAUTH-WG] Auth Code Swap Attack Barry Leiba
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Barry Leiba
- Re: [OAUTH-WG] Auth Code Swap Attack John Kemp
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Barry Leiba
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Blaine Cook
- Re: [OAUTH-WG] Auth Code Swap Attack William J. Mills
- Re: [OAUTH-WG] Auth Code Swap Attack William J. Mills
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Phil Hunt
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Torsten Lodderstedt
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack David Recordon
- Re: [OAUTH-WG] Auth Code Swap Attack Phil Hunt
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Phil Hunt
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Anthony Nadalin
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Torsten Lodderstedt
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Barry Leiba
- Re: [OAUTH-WG] Auth Code Swap Attack Anthony Nadalin
- Re: [OAUTH-WG] Auth Code Swap Attack Phil Hunt
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Anthony Nadalin
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Phil Hunt
- Re: [OAUTH-WG] Auth Code Swap Attack Eran Hammer-Lahav
- Re: [OAUTH-WG] Auth Code Swap Attack Anthony Nadalin