Re: [OAUTH-WG] Recap of two well known OAuth related attacks

John Bradley <ve7jtb@ve7jtb.com> Fri, 17 May 2013 15:46 UTC

Return-Path: <ve7jtb@ve7jtb.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 7B2B721F96C3 for <oauth@ietfa.amsl.com>; Fri, 17 May 2013 08:46:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.144
X-Spam-Level:
X-Spam-Status: No, score=-1.144 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FRT_ADOBE2=2.455, RCVD_IN_DNSWL_LOW=-1]
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 dakvzHePE45P for <oauth@ietfa.amsl.com>; Fri, 17 May 2013 08:46:01 -0700 (PDT)
Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by ietfa.amsl.com (Postfix) with ESMTP id 8132E21F968B for <oauth@ietf.org>; Fri, 17 May 2013 08:46:00 -0700 (PDT)
Received: by mail-ee0-f54.google.com with SMTP id e50so2686293eek.41 for <oauth@ietf.org>; Fri, 17 May 2013 08:45:59 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:message-id:references:to:x-mailer:x-gm-message-state; bh=9XsjNfwK0Ek+g3d3nfnkuNFpIYkcKDYWgidMYwYO/po=; b=BId8ubALMEtKpu0cUaRJbDLdHtjKLN4NPmNx5iooqiZGUnr6QV63dCPUAjwy7m5oMZ Aix7P1zUcpdnfPyvpVZLQ0YSh5ceDvSy6yOFFpr/L5CPtPaKZm6d+LFcsHuQj9wW9JKz X0OO1fmM/0uf9Q6YAI24X4G1IY6tDslqF7yL5coGUpSSVyw4B1hQKpGRRjpjDY1CCpwA AREN1p3yMojPDErPpLBU7AlQ+LYDUOVbaVtbaXfFVtThiApiJNe+NVuepLyHwY95o5kS 7jlC7atWrYCwbg6s/JZbHqXu+WYVfMXC8aQDXINtZnbAOayO5OC9ACux8aXumSYD4FLG F+5w==
X-Received: by 10.14.87.9 with SMTP id x9mr115970710eee.3.1368805559255; Fri, 17 May 2013 08:45:59 -0700 (PDT)
Received: from [10.121.233.103] ([195.50.165.102]) by mx.google.com with ESMTPSA id bj12sm19537456eeb.8.2013.05.17.08.45.57 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 May 2013 08:45:57 -0700 (PDT)
Content-Type: multipart/signed; boundary="Apple-Mail=_6059D5BB-2EFA-40A0-8213-D5083C2A2156"; protocol="application/pkcs7-signature"; micalg="sha1"
Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\))
From: John Bradley <ve7jtb@ve7jtb.com>
In-Reply-To: <59E470B10C4630419ED717AC79FCF9A96599A278@BY2PRD0411MB441.namprd04.prod.outlook.com>
Date: Fri, 17 May 2013 17:46:03 +0200
Message-Id: <B21D32C7-A3D5-4CD9-8FF5-DC6566D7E246@ve7jtb.com>
References: <DC65FEE5-9CA0-45CF-B44B-912F0474C4DB@adobe.com> <2AF08A9B-0E0A-42E1-9575-E582065D66D8@mitre.org> <59E470B10C4630419ED717AC79FCF9A96599A278@BY2PRD0411MB441.namprd04.prod.outlook.com>
To: Lewis Adam-CAL022 <Adam.Lewis@motorolasolutions.com>
X-Mailer: Apple Mail (2.1503)
X-Gm-Message-State: ALoCoQlDkMo4iwUmmn/WnISKo4jUv1f6p2/xoaH99B1ImuuRhn5A7brbKwrpsVTu51BjdjW2f5Hy
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Recap of two well known OAuth related attacks
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
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: Fri, 17 May 2013 15:46:05 -0000

The implicit flow is secure in Connect, but we added a number of things to make it so.

The reason to have it in OAuth 2 is for clients in the browser there are use cases for that and it allows the browser to receive and extract the token without passing it to a web server backend.
Used as intended it is fine as the browser based JS App is receiving the the token directly over TLS so there is no substitution attack possible.   

The problem is when the client is not in the browser the browser itself is an attack surface, that an attacker can use to confuse a client.

If people want to do SSO based on OAuth they need to follow the example of Google, PayPal and others who are implementing Connect rather than rolling there own protocol on top of OAuth 2.

John B.


On 2013-05-17, at 5:22 PM, Lewis Adam-CAL022 <Adam.Lewis@motorolasolutions.com> wrote:

> One wonders that - if in hindsight - the implicit flow was a mistake to include in the framework.  Yes it saves a single round trip for use cases where the tokens are exposed to the UA, but it's not clear that optimization is worth the security headaches that are going to be caused down the road (or are already going on for that matter) by people using it in scenarios where it should not be (because as stated, it is easier).  Probably would have been better to let the subset of cases that didn't need the extra step of the code just go ahead and implement it anyway, and ensure that the majority of native apps use cases would have been implemented with better security. 
> 
> adam
> 
> -----Original Message-----
> From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf Of Richer, Justin P.
> Sent: Wednesday, May 15, 2013 3:22 PM
> To: Antonio Sanso
> Cc: "WG <oauth@ietf.org>"@il06exr01.mot.com
> Subject: Re: [OAUTH-WG] Recap of two well known OAuth related attacks
> 
> The biggest problem with this attack is the passing of the access token to a backend server (and its subsequent passing of that token to someone else) and the assumption that the presentation of the access token means that the user is authenticated and present. It simply doesn't mean that, and this is a bad assumption that unfortunately many people make thanks to providers like Facebook using OAuth (or, mostly-OAuth since they're not actually RFC compliant) in the authentication protocol.
> 
> It's also a problem that so many people are using the implicit flow "because it's easy", missing the point of why it's there in the first place. The implicit flow is really only intended for cases where you can't hide secrets from the user agent, cases like an in-browser application. The flow diagrams that you have don't fit the implicit flow very well at all, since the access token is getting passed back to some other service. 
> 
> -- Justin
> 
> On May 13, 2013, at 11:14 AM, Antonio Sanso <asanso@adobe.com>
> wrote:
> 
>> Hi *,
>> 
>> I wrote a blog post showing two well known OAuth related attacks. I paste here the link for your consideration:
>> 
>> http://intothesymmetry.blogspot.ch/2013/05/oauth-2-attacks-introducing-devil-wears.html
>> 
>> Any comment is more than appreciated.
>> 
>> Regards
>> 
>> Antonio
>> _______________________________________________
>> 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 mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth