Re: [OAUTH-WG] Draft 20 last call comment (Resource Owner Impersonation)

"William J. Mills" <wmills@yahoo-inc.com> Thu, 18 August 2011 19:25 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 3F29111E808C for <oauth@ietfa.amsl.com>; Thu, 18 Aug 2011 12:25:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.332
X-Spam-Level:
X-Spam-Status: No, score=-17.332 tagged_above=-999 required=5 tests=[AWL=0.266, 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 sJa2J1XGwDBP for <oauth@ietfa.amsl.com>; Thu, 18 Aug 2011 12:25:52 -0700 (PDT)
Received: from nm25.bullet.mail.sp2.yahoo.com (nm25.bullet.mail.sp2.yahoo.com [98.139.91.95]) by ietfa.amsl.com (Postfix) with SMTP id D784921F8BA7 for <oauth@ietf.org>; Thu, 18 Aug 2011 12:25:52 -0700 (PDT)
Received: from [98.139.91.62] by nm25.bullet.mail.sp2.yahoo.com with NNFMP; 18 Aug 2011 19:26:47 -0000
Received: from [98.139.91.56] by tm2.bullet.mail.sp2.yahoo.com with NNFMP; 18 Aug 2011 19:26:47 -0000
Received: from [127.0.0.1] by omp1056.mail.sp2.yahoo.com with NNFMP; 18 Aug 2011 19:26:47 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 585784.73664.bm@omp1056.mail.sp2.yahoo.com
Received: (qmail 30461 invoked by uid 60001); 18 Aug 2011 19:26:47 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo-inc.com; s=ginc1024; t=1313695606; bh=CmdEieAdjNV/Na55VBUsOowBACC7+gNpjxsRPl2HtaE=; 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=DZwKg7r6XuAy34VvFBY8u5+Uta0C2UHP2cweRsoalTd9asZif3x9J2/dpltgqRNrqPnvOdBqcqIdxvMmO0QNO7ZTLFxbhZbh6U2aw3Wif59bquiuIHxrvLXTm+FuUENRSgEkZhTeNIZP5uRpkS8YTQ+l1DAli3H7JF0T42wf0cE=
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=tOwqs095C2CCTQg5jPXdz9XK94P2lYzGRil3WueF2OC2AZXPo42D6Rt51wZ3ZfXYq9IqUQ+lV7wyLecdIJtwVfsZiyAqbXzhNuuDbd+fDCkJgc0dJQtZzl5BxFF8/JWpOXHJPmJrQ0yy/2dnPCyCLZFsmIgal5YjSqxVP0gvReY=;
X-YMail-OSG: YSkv9xUVM1mm_rMkWLn1K52qiCqLocYTD2lzxdRTCXpEte6 1o2WvfFAkfKBJQtLOuUskrZIFZMJ59FLMOnibZIpCL3eTv51SZ02UJfUiyLB bKa6OeDFnoiNIJsPnIf6ti3yo2U._E7CHWNmYOshDItJXHZGwxoGc8XaWCzO vlvCSWnHCugOS1Kn7_JUp5vtdxzqO9ezlDyGey05ic7sOr_DQVfShUQjwrJL 9QGFTYGWgVF4pqN77jVycUHRV8pbIWuOr_s98cpb.kFwNQkgOuKhNvyZzy6_ DxiLhsTPPDMTc2mHPscMwWixcJKqHfz5evLp3qg23jIIdiu5yWOjaKoaL2ui sHdU2tTuwi.cIS57fvegMfSvS6pB8YbVri56OTIVUEjgUZuhu7IHPeopqRvQ 13YrvtD42jFy1ZUKOmMCji8GyjcJ42.TVmGhuCEAg2x1h_VRP5Hja0AvmUfx 3DwJ50X5bCfwCO36GJYa4TBdJnsKUT4RJ1dJHWdbxix3m6qXNnp2LW8sKktJ 8pHVoFzoThQ--
Received: from [209.131.62.113] by web31806.mail.mud.yahoo.com via HTTP; Thu, 18 Aug 2011 12:26:46 PDT
X-RocketYMMF: william_john_mills
X-Mailer: YahooMailWebService/0.8.113.315625
References: <b7df18688b7612cb85418ed587b80044@lodderstedt-online.de> <90C41DD21FB7C64BB94121FBBC2E72345029DFA960@P3PW5EX1MB01.EX1.SECURESERVER.NET> <CACEVmuoYO5NJrGNAHJsHennt_si+DTdA0QuLps8UBvMb=aLVoA@mail.gmail.com> <90C41DD21FB7C64BB94121FBBC2E72345029DFAA22@P3PW5EX1MB01.EX1.SECURESERVER.NET> <CACEVmuoJR2yFBBzjqT4nbGt28PDu4yFEYTnV9c893FAAuqvT+g@mail.gmail.com> <90C41DD21FB7C64BB94121FBBC2E72345029DFAA5B@P3PW5EX1MB01.EX1.SECURESERVER.NET> <CACEVmuqCx2Nv_OEAx30HZEqbx58zxhWweOMctaxp2E3S3rDWig@mail.gmail.com> <90C41DD21FB7C64BB94121FBBC2E72345029DFAA81@P3PW5EX1MB01.EX1.SECURESERVER.NET> <CACEVmuoQuQGemjv0r2PzDBSD1D9XJjQo9cjZCs5-jxFbNc4JNA@mail.gmail.com>
Message-ID: <1313695606.21151.YahooMailNeo@web31806.mail.mud.yahoo.com>
Date: Thu, 18 Aug 2011 12:26:46 -0700
From: "William J. Mills" <wmills@yahoo-inc.com>
To: Niv Steingarten <nivstein@gmail.com>, Eran Hammer-Lahav <eran@hueniverse.com>
In-Reply-To: <CACEVmuoQuQGemjv0r2PzDBSD1D9XJjQo9cjZCs5-jxFbNc4JNA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-260224373-1313695606=:21151"
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Draft 20 last call comment (Resource Owner Impersonation)
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: Thu, 18 Aug 2011 19:25:54 -0000

This is, in my opinion, another style of CSRF.  I the attacker present your browser (user agent) with a link, and your browser presents a credential automatically to the token endpoint, which automatically issues a token to be given back to me?  That's a classic CSRF, how to fix it is interesting.  I'm of the opinion that the user *should* be pesented with some UI at that point so they can make an informed choice about issuing a credential.  Not everyone agrees with me though (mostly business folks that want to avoid user interaction because it's too scary .... and somehow informing the user what they are doign is a bad thing).

-bill



________________________________
From: Niv Steingarten <nivstein@gmail.com>
To: Eran Hammer-Lahav <eran@hueniverse.com>
Cc: "oauth@ietf.org" <oauth@ietf.org>
Sent: Thursday, August 18, 2011 12:11 PM
Subject: Re: [OAUTH-WG] Draft 20 last call comment (Resource Owner Impersonation)

On Thu, Aug 18, 2011 at 21:17, Eran Hammer-Lahav <eran@hueniverse.com> wrote:
>
>
>> -----Original Message-----
>> From: Niv Steingarten [mailto:nivstein@gmail.com]
>> Sent: Thursday, August 18, 2011 11:08 AM
>> To: Eran Hammer-Lahav
>> Cc: Torsten Lodderstedt; oauth@ietf.org
>> Subject: Re: [OAUTH-WG] Draft 20 last call comment (Resource Owner
>> Impersonation)
>>
>> On Thu, Aug 18, 2011 at 20:31, Eran Hammer-Lahav <eran@hueniverse.com>
>> wrote:
>> >
>> >
>> >> -----Original Message-----
>> >> From: Niv Steingarten [mailto:nivstein@gmail.com]
>> >> Sent: Thursday, August 18, 2011 10:16 AM
>> >> To: Eran Hammer-Lahav
>> >> Cc: Torsten Lodderstedt; oauth@ietf.org
>> >> Subject: Re: [OAUTH-WG] Draft 20 last call comment (Resource Owner
>> >> Impersonation)
>> >>
>> > Can you provide another example with the same level of detail as you
>> provided below?
>>
>> The malicious client sends a request to the authorization endpoint with the
>> appropriate parameters, and in return receives the markup of the web-page
>> which should be displayed to the user in order to get consent. In addition,
>> since the request is launched not via a sandboxed user-agent, the client also
>> has access to any 'Set-Cookie'
>> HTTP headers.
>>
>> Instead of displaying the page to the user, the client extracts the web-form
>> data (including the hidden nonce/token) which would be submitted when
>> 'Allow' is clicked. It then forges the appropriate POST request with the
>> cookies, form data and referrer, and dispatches it,
>
> SCENE MISSING [1]
>
>> to finally receive an access token/authorization code in the redirection.
>
> You skipped the best part!
>
> What do you mean by "dispatches it"? How is the resource owner tricked or abused to grant authorization unknowingly? I understand how your proposal "fixes" the first half, but not what kind of attack is happening in the second half.
>

I might have accidentally skipped the part where the user is already
logged in at the authorization endpoint, so no log-in is required but
rather just allowing/denying access (correction: the first request is
sent using an HTTP framework/WebKit, so no access to cookies). Once it
extracts the data from the web-form, the client has all the
information it needs in order to create an HTTP request and launch it
using the same HTTP framework/WebKit, simulating the "Allow" button.

>
> [1] http://www.ibras.dk/montypython/episode34.htm
>

+1 for more Monty Python references.

-- Niv
_______________________________________________
OAuth mailing list
OAuth@ietf.org
https://www.ietf.org/mailman/listinfo/oauth