Re: [OAUTH-WG] Mix-Up and CnP/ Code injection

Nat Sakimura <sakimura@gmail.com> Mon, 09 May 2016 03:43 UTC

Return-Path: <sakimura@gmail.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 B090212D1BC for <oauth@ietfa.amsl.com>; Sun, 8 May 2016 20:43:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E5w3lMQ6K6ah for <oauth@ietfa.amsl.com>; Sun, 8 May 2016 20:43:45 -0700 (PDT)
Received: from mail-qg0-x22d.google.com (mail-qg0-x22d.google.com [IPv6:2607:f8b0:400d:c04::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A454C12B061 for <oauth@ietf.org>; Sun, 8 May 2016 20:43:44 -0700 (PDT)
Received: by mail-qg0-x22d.google.com with SMTP id f74so82777846qge.2 for <oauth@ietf.org>; Sun, 08 May 2016 20:43:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=baOUO903ot63e1vcyf7QP9HR60FAiacA37KDUUbIxTc=; b=NtWqhBSt+5xipvvNTn2VLGXonEOUe8G6ZNVzGorR2yxqJal0u490Z8A+E58CutiP31 7LrX+U6bo/6r+sogYQ/AcjaFSOQUGMIUjoAv2R+CR8xoZ1Ez61u92Hp9dPJTRym8M2Ns 6mXJZPBr7kVFdn2mAT/V3ZUz+y/y+ki9dq+6PVHUCA/HvwNQDBZkryJlDYaFe099SBVZ a5htkTBWoxFWMcjSfbVxp5J28AMivkwD4Oo7/LWUIE9OYW0oTTAxJ51e155hK7V3CUUN 3hCe/CsoAkmIjyGkTITv6OLctsnNkCFXdvxNtFla/B6qzDTykP3IFlvoh2BI8J55Tqlw /0pQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=baOUO903ot63e1vcyf7QP9HR60FAiacA37KDUUbIxTc=; b=QjUxA2eDcofjyn+pPFIW8gJqdT115bEqcprzV5JYHaukE8Bv+LFkHkL4mYYwaJNlxW reh/Y+xZTF9P7YXb6eGbfzKsSm+mUNWfk21u3wuhXFcoVKnBldC6E7a5PYMDENWn4F+l n8Gq3/Lcdv/4OimtiocUdk2p8MfByj+iTwGud6+rUFSnzurDcRNFpNAqSLlLvLKzX/mx /invliRncNbEqVTqe61upsT5edEd0hkQe7A6I6u3J2zxHrjgjGhdDag6pidt/b0fq2vc /g/b5655HWHH6OEfQaMHF+np3yA7WCDYz2IODkDnPQSTtxd8vTgr40nmhJCm5eMQ2Uvm kmig==
X-Gm-Message-State: AOPr4FW3PQlDPtg4SZ//fvLJFNyhaKTQ7lt4TDDzzQ0GrAgHrOPfJZif9VpNPcQ9Tfwn4k4xnceb0JeqeoFeqg==
X-Received: by 10.140.21.164 with SMTP id 33mr32981099qgl.34.1462765423416; Sun, 08 May 2016 20:43:43 -0700 (PDT)
MIME-Version: 1.0
References: <571B60BA.8090301@lodderstedt.net> <CABzCy2DeMSGc_yjKi=NWJjh7RLoVsb+KyD9S_MuiQ_gJNg5+fw@mail.gmail.com> <49355f12-ef58-0637-47e0-7acd54e882d9@lodderstedt.net> <DA464416-4C42-4A3A-B829-70E14B6C1149@mit.edu> <CABzCy2DD+E4CNUHL3Bh_sZW+UF2Ea4tBA6am+LkJbrisepxMgQ@mail.gmail.com> <FA921CBC-C10F-4262-9D2F-BD2D4AC1A014@lodderstedt.net>
In-Reply-To: <FA921CBC-C10F-4262-9D2F-BD2D4AC1A014@lodderstedt.net>
From: Nat Sakimura <sakimura@gmail.com>
Date: Mon, 09 May 2016 03:43:34 +0000
Message-ID: <CABzCy2BoDtB9Mf00TOLZx9E7WdsRE9NhLT-OfBTU78axkrgFyg@mail.gmail.com>
To: Torsten Lodderstedt <torsten@lodderstedt.net>
Content-Type: multipart/alternative; boundary="001a11c13aca73fb690532609de2"
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/oJXb2UpwJWbKZTC6Bab4EemgUUE>
Cc: "<oauth@ietf.org>" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Mix-Up and CnP/ Code injection
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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: Mon, 09 May 2016 03:43:49 -0000

Yes, and unfortunately, that is a rather common attack these days.
Infesting a user device with a malware is probably easier than having the
client developer register its client to unknown server.

2016年5月1日(日) 16:54 Torsten Lodderstedt <torsten@lodderstedt.net>:

> Hi Nat,
>
> please explain the attack. I assume the attacker would need to control
> network transmission or client device.
>
> kind regards,
> Torsten.
>
> Am 01.05.2016 um 07:36 schrieb Nat Sakimura <sakimura@gmail.com>:
>
> It actually depends on what risk level the transaction is at. For low risk
> transactions, just having separate redirection endpoint may be adequate. On
> the other hand, I can easily think of an attack that replaces iss on the
> authz response making the control invalid posing questions on whether it is
> worth introducing it.
> On Sun, May 1, 2016 at 14:21 Justin Richer <jricher@mit.edu> wrote:
>
>> I agree that we’re getting dangerously close to recommending signed
>> assertions at every step of the process, thereby bypassing HTTP. This was
>> the same mistake that WS-* and SOAP made, let’s not repeat it if we can.
>>
>>  — Justin
>>
>> On Apr 30, 2016, at 10:57 AM, Torsten Lodderstedt <
>> torsten@lodderstedt.net> wrote:
>>
>> Hi Nat,
>>
>> sure, one could also authenticate and cryptographically protect the
>> redirect response. Leveraging OIDC concepts is an idea worth considering
>> but they should be adopted to the OAuth philosophy. The id token as used in
>> the hybrid flows mixes an identity assertion with elements of transport
>> security measures. A OAuth AS does not provide identity data to clients, so
>> we only need the transport security part.
>>
>> I personally would prefer a OAuth response object (similar to request
>> object you have proposed) over the id token. Such a response object could
>> contain (and directly protect) state, code and other response values. I
>> consider this the more elegant design and it is easier to implement then
>> having detached signatures over hash values of codes or access tokens.
>> Moreover, it would allow to encrypt the response as well.
>>
>> Generally, our threat analysis so far does not have provided
>> justification for cryptographically protected redirect responses. All
>> proposals currently on the table stop mix up and code injection using
>> simpler mechanisms.
>>
>> I think OAuth 2.0 is a huge success due to its balance of versatility,
>> security and _simplicity_. We definitely need to keep it secure, but we
>> should also keep it as simple as possible.
>>
>> kind regards,
>> Torsten.
>> Am 29.04.2016 um 10:08 schrieb Nat Sakimura:
>>
>> As I look at it more and more, it started to look like the problem of
>> accepting tainted values without message authentication. To fix the root
>> cause, we would have to authenticate response. ID Token was designed to
>> also serve as a solution anticipating it.
>>
>> Any concrete ideas?
>>
>> On Sat, Apr 23, 2016 at 04:47 Torsten Lodderstedt <
>> torsten@lodderstedt.net> wrote:
>>
>>> Hi all,
>>>
>>> discussion about Mix-Up and CnP seems to have stopped after the session
>>> in BA - at least in the OAuth WG. There is a discussion about
>>> mitigations in OpenId Connect going on at the OpenId Connect mailing
>>> list.
>>>
>>> I'm very much interested to find a solution within the OAuth realm as
>>> I'm not interested to either implement two solutions (for OpenId Connect
>>> and OAuth) or adopt a OpenId-specific solution to OAuth (use id! tokens
>>> in the front channel). I therefore would like to see progress and
>>> propose to continue the discussion regarding mitigations for both
>>> threats.
>>>
>>> https://tools.ietf.org/html/draft-ietf-oauth-mix-up-mitigation-00
>>> proposes reasonable mitigations for both attacks. There are alternatives
>>> as well:
>>> - mix up:
>>> -- AS specific redirect uris
>>> -- Meta data/turi
>>> (https://tools.ietf.org/html/draft-sakimura-oauth-meta-07#section-5)
>>> - CnP:
>>> -- use of the nonce parameter (as a distinct mitigation beside state for
>>> counter XSRF)
>>>
>>> Anyone having an opinion?
>>>
>>> best regards,
>>> Torsten.
>>>
>>> _______________________________________________
>>> 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
>>
>>
>> --
Nat Sakimura
Chairman of the Board, OpenID Foundation
Trustee, Kantara Initiative