Re: [OAUTH-WG] [EXTERNAL] Re: OAuth Redirection Attacks

Pieter Kasselman <pieter.kasselman@microsoft.com> Fri, 17 December 2021 20:44 UTC

Return-Path: <pieter.kasselman@microsoft.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 1F16E3A043E for <oauth@ietfa.amsl.com>; Fri, 17 Dec 2021 12:44:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.701, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 Dgqnj1oLfldj for <oauth@ietfa.amsl.com>; Fri, 17 Dec 2021 12:44:18 -0800 (PST)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp0208.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e0e::208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 265973A0403 for <oauth@ietf.org>; Fri, 17 Dec 2021 12:44:17 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xu0izzT0zlsCnZVrS0O+wUoF3Eh6Z6etI1UIIeBQ4oyuGliXl5uZMa9Ky2KYlAOBoPe4vrzmiEGMDK/1AgaY40KGS9pR+Pm8D8oooEiUrkurv7sxG4i+fNIUym+lC1AMC3IiY0q6Y2Dv/QLTKKp5TYxFDQPsw5iBkAWt8vWvLNkJFRSwOP7bx/Czu3irfbjwi5ZWVWiLrzOn4b0Ot9akSTHyoK5Pm7rQdhd+RZmp40J1pT5yGUf2Z6Bl9uFHkY5UmQxhQJ0qtc0UErYMQyxsTKDRUXRW/MeM5PdoEaQOMdcfFf3844jz9LiTkkr5Z6pIb3lxaT1M7H6b4CJrhG4OYQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PqGlUBnaCNseCyu63I7TR2w7Ob00++LhixJxFHgQnaA=; b=lIjAzdroKHFt2HixbNS2NQeKgohkpQJsgt3V2n6d9EtVzz5TplTqNDdr21n5GbZhB1Q1XXty4yvYpfGvfwKhPob+KYN22OYSgeup0kk4+y5DqjUikvb6SJ3FqPb374C1P6BSVIVjt24A+En2mJ/R16JWXeEG9vfU+DbiliDRAZNY5s81x2QHS9JWjsQq30Ro8Cu2pLlDY6h/FwfdL/VIE8wwCenBin366H2+2UmjB/5m2O/YY/axaumZMKACxs6/zb7rUmb9UwiUwuKQXNjd9HX6XngMOcD17OdFjI0GY1GhqTKZmLii2Be+oxZnLEMQEuXlwEf3h8/FQ7ym8qDylw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PqGlUBnaCNseCyu63I7TR2w7Ob00++LhixJxFHgQnaA=; b=VfYE/Jqr7uqJO9qgtZI/k+geNqQCSjTjk9BX2HQ0Lt6LNIkTznoG8U00du6MQxkcNrIrwAdQu3bZHp2rcssUepODQOvPY8y75/QxsPaZ7kP1DL6MpRvrKs8Y51sSk3gAkPwEbVqaaGjyojAPjCMC1dsxurXTN20r4n/8jUocV+0=
Received: from AM7PR83MB0452.EURPRD83.prod.outlook.com (2603:10a6:20b:1b6::10) by VI1PR83MB0350.EURPRD83.prod.outlook.com (2603:10a6:802:3b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.4; Fri, 17 Dec 2021 20:44:05 +0000
Received: from AM7PR83MB0452.EURPRD83.prod.outlook.com ([fe80::e17e:2ca8:5565:cf6d]) by AM7PR83MB0452.EURPRD83.prod.outlook.com ([fe80::e17e:2ca8:5565:cf6d%5]) with mapi id 15.20.4823.010; Fri, 17 Dec 2021 20:44:05 +0000
From: Pieter Kasselman <pieter.kasselman@microsoft.com>
To: Warren Parad <wparad=40rhosys.ch@dmarc.ietf.org>
CC: Vittorio Bertocci <Vittorio@auth0.com>, oauth <oauth@ietf.org>
Thread-Topic: [EXTERNAL] Re: [OAUTH-WG] OAuth Redirection Attacks
Thread-Index: AQHX80YWPcHBUYyLGkWkzKsSFOy7mqw3GYMAgAAD5UCAAATmgIAAAGcA
Date: Fri, 17 Dec 2021 20:44:05 +0000
Message-ID: <AM7PR83MB0452B729482E04F9B333D37791789@AM7PR83MB0452.EURPRD83.prod.outlook.com>
References: <CADNypP_AJFBc+HzKfFZ8d0hk7BZc=fYTDLNP6MroHUg-=r7FvQ@mail.gmail.com> <CAJot-L2X+Ma5BnXJ6Ys3UPJgHc_WnYtU33ast-myT2PN6rU5OQ@mail.gmail.com> <CAO_FVe5fUgS+=FoB9fJN7V0ujG+tDSb_20CgU2ffcPO3kENC=w@mail.gmail.com> <AM7PR83MB04521F9B225816B5D4D1A8F891789@AM7PR83MB0452.EURPRD83.prod.outlook.com> <CAJot-L2jB63K9RVK8F8PFEtOSXjJk+Eg4iJxs9qm7jt7zq1nMw@mail.gmail.com>
In-Reply-To: <CAJot-L2jB63K9RVK8F8PFEtOSXjJk+Eg4iJxs9qm7jt7zq1nMw@mail.gmail.com>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2021-12-17T20:43:49Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=a6d3fef6-c2ff-4589-b15b-edee184cf4ff; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 92d761c0-a1b5-459e-c0b7-08d9c19df793
x-ms-traffictypediagnostic: VI1PR83MB0350:EE_
x-microsoft-antispam-prvs: <VI1PR83MB035026CD95709B10CCFE26E091789@VI1PR83MB0350.EURPRD83.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: ukB/ha474ksBR3glcXq2NA4pk1R7DFit3G/6g49++ryCeHa584yCF1JvjEy8gmq+TssFlPi2OB0/QIZ+wBvRLGmWUh7Jd8aR9BDc1c6ys9gdvk+hBwaPvNwaSCBCUufmuAFxJZtKt+XBNk4dCBVuS7+PxPn0MdPwbiLaOtJCtqfXvlWfTeJHQVaqVrZf3BkzZ6piAWUC7a6IvwtMYBoFiyXRisjfBQ52TpwvdN3CtiaJvML7BrFPafye3LbS/U/KMBMQSYetG3/ippip2wh/k2LyWDwPuH5S8acCsnVV1Q+pxHE1dLofvX5MyU7gvLeWBc5neeHgTdQC1WTFFWhXzIzl/v9J4nBhPp5RqG5vv8e5OeJmPg45ApUISB4QJ+sAsVOetpTSdG0pTra5c5BRBADkJRRhmISjE3RpAqNW41ELoYuJtwz2EyUULvjrsDRiPOPoHguUogK3xLaC0VjwrcrOOCHhwRguDCL9fSVozU/xe+SVr4Irct2df7uqxgE8s+JQcbBfp4tn9nd3DqF0dCzAjI+Jfcp19yy3ieZgLaz4F+ZyNnLsVxjFG0Hqr59AfzsbsecoCXIPNLQXKLlFP+KWEqzefMapMfZu2CMWDaoCMHLeYmauR4eN4HLfvVveZFfUMIZ0LrIB556ZyrS6p2haec8oyrAEDG7vpa257kYhGNDpye/XMCN67ETflIMxz8paA307OzFQNBOvjYe6x1aMuDEAZZH5BHtiUfwxuTJWdlZxPV3Oyko5D0JypYEcKaJx09Q64p29MVxzmvDWAVR4EyrY1tD3hkVOz47w9lY58ZY8POr3voNFDd4NagBAKk2rgn4vHHLl+cVdtHRkXt6CAdlBqs1zHiyeUmtb2nWMaG/86MhWj3jsUethTd3k1Lg/9bAdqjvWK98672rWAw==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR83MB0452.EURPRD83.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(54906003)(8676002)(316002)(8936002)(66556008)(186003)(5660300002)(44832011)(38070700005)(8990500004)(38100700002)(2906002)(166002)(86362001)(66476007)(4326008)(52536014)(64756008)(66446008)(82950400001)(82960400001)(71200400001)(55016003)(99936003)(10290500003)(9686003)(83380400001)(33656002)(66946007)(7696005)(122000001)(76116006)(966005)(6506007)(53546011)(508600001)(91840200004)(20210929001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/7ufjYu6hlrciPwf9BcE+yUAbCdtuVceLDYnHzDxRNao93U4S5Gt5d5/8i5V?= =?us-ascii?Q?ZDTNLdqPbYWKdT+HUSKgz3e8WbG9tH/o6oDAIvQRnkzgswyfNzNSWiMs6544?= =?us-ascii?Q?HpsmxAAA28Xm5FfgQmF28uhatK0ntKL0s/GUjy8Jw2bY+LAU/xVDIS6N1/B8?= =?us-ascii?Q?+WVjcJ6pxSUppxL/qj7JrSkosxFCJChl2lMX32OVVmqn03gIP6v/VCuAPzY3?= =?us-ascii?Q?SVH3JPirfkYGpe/vQPGpTDHRib/BIhDSBVrzDb4bvTQpaRVv2A3a705BcQL4?= =?us-ascii?Q?eIG8ZBHPewWVlK3ao4/KMjR9AcQ2hwX2VAKcu17hz9BBFx11cKJQkqNOUIxG?= =?us-ascii?Q?gFUU7eu2rpwJuHBhMssaB+lutmytZWMUZXWKlcbQtng6P8bRk5pwSUGeWu/y?= =?us-ascii?Q?lHVjmQfQLz8zyWIIh9X2HqeUAMFbigyUHG3w/zBLS+9LlhREb/MvEakInJ8H?= =?us-ascii?Q?0nrSEiD/l2vY9rRscK3Wxep62WWkV7byw1UZbaTL50maHL/GJHHF5QoKd7cK?= =?us-ascii?Q?QLOKYvV0Znw8Xv9wmrTiOlfHAzISeWrFZsAyQ2EWYeyvuD1ccZIkk1eV5vvi?= =?us-ascii?Q?pjyyD4bvJCSBS/6+4U2wTIewY/MQPW4dra3CC8iE9yOPAe5lbjNWCBJ08MVR?= =?us-ascii?Q?mBELfHdojXNbT2GPS/s6G52/IVCJXv2osKqExylhnA8cyyYiLv0tyvYgh6jV?= =?us-ascii?Q?eDOjZ7GALcfiPYfDZIrOrFKcmLa1tHy5bspF7MpKLrPSvsvS5DydBCOU2N+q?= =?us-ascii?Q?CQV6HsX8VoPGh3qo5k/PrlK/0iuE9zKaVTx4JxmcH7cpNcP4eQrPTct8okVY?= =?us-ascii?Q?dzM5gXZcVUzxPvGZtH/uWfu+w8DYt6Vk7W5LYtZnKVQmXUmxUhCspRdSPNyf?= =?us-ascii?Q?63BMiNhe9BCvN9rYDQzp90rIV6XdIbz4JTdPjCFD+KrGK9+dYyV5OOWyl9hN?= =?us-ascii?Q?c17xnQpCuxD7JbFYpniEqXfLxcfF97tMv58LYFj5Emq4khI4QM1hxbBoKmsM?= =?us-ascii?Q?P0CRdH9D5C42DNKG8crYtTELmDDatRH83WE1PEiOmiUnx++kGkGVTbUvBDrL?= =?us-ascii?Q?McPUHKqXuflZ+/ZCMJew2uuam5K++D4V8A2RxVTUevFtLUGrxcdmD7lbGObO?= =?us-ascii?Q?5hlGmp6iKVTaQGNmQrj9QwQPOyEmwAHUb3zIr1MyD+m3SLHXOv6/JSKyZhmO?= =?us-ascii?Q?FL5IUyk1qZ/qA3KYVskHp078og7vMYyg8U+R0oC0vRyZirKhuR0ruerZ1LzD?= =?us-ascii?Q?gF0d2YYC0/GisCqXKHNyHgM1yBBhn2m4VUYVH6HpSj3fR1xHq42c2I33MeYm?= =?us-ascii?Q?l9aKh20ZETNcVzVcTAIPD/MRfxu82By1EotZ4yGqxgKiO5HbUOwPsCj3A+Qj?= =?us-ascii?Q?IrCyGztVo2BHCkptkMGqLmfrInHwT/cIcKqy7nsbktk+nrIn+BKpdc8JV2zA?= =?us-ascii?Q?m6fovqgQj4h8xj7gFEsWVIDjacR5KYi78qRbM7kHiMXQf4tMeKRS0OwQydyC?= =?us-ascii?Q?K2MxzbzofQCp7RuDteKMokhBr6l+VcaNkV6t0R2iMg2TY4CNQ3o1+RFsUPL4?= =?us-ascii?Q?Fc2zrW0QR79LUPXFQnV0PKbbtJ+Any8ecMMQw7sr3Nut2GxZu8XcC+hFLsEM?= =?us-ascii?Q?tTybee9EmN7UbGv7Kwtns19yj+2vQvVtbKlkKf8xex6zhFB282q2Was222Xi?= =?us-ascii?Q?8dKmZQ=3D=3D?=
Content-Type: multipart/related; boundary="_004_AM7PR83MB0452B729482E04F9B333D37791789AM7PR83MB0452EURP_"; type="multipart/alternative"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM7PR83MB0452.EURPRD83.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 92d761c0-a1b5-459e-c0b7-08d9c19df793
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2021 20:44:05.5867 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: KfXACJS0qOLzRfnQijDsTl+SA0y+cSY2ufUQ5Y7opVDxtW0i3CR52uEeWD8ls2ujkockxTvf9A6flgUqTV6vblExMkXC+ZBJb/8tiAUmVP4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR83MB0350
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/p_E80LD7zm1DQQk5wSqeEEAW8nY>
Subject: Re: [OAUTH-WG] [EXTERNAL] Re: OAuth Redirection Attacks
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 17 Dec 2021 20:44:23 -0000

The problem isn't invalid URLs but malicious ones. Given a choice between a sub-optimal user experience and a phished end-user, perhaps an option that allows the authorization server to handle the error, rather than redirecting can serve end-users better. But as Vittorio points, out, there are probably other options as well to consider. URL reputation services is another option, but problematic since they are imperfect and I expect hard to standardise to a point that creates a common minimum level of assurance (similar to any fraud calculation or risk score).

From: Warren Parad <wparad=40rhosys.ch@dmarc.ietf.org>
Sent: Friday 17 December 2021 20:27
To: Pieter Kasselman <pieter.kasselman@microsoft.com>
Cc: Vittorio Bertocci <Vittorio@auth0.com>; oauth <oauth@ietf.org>
Subject: Re: [EXTERNAL] Re: [OAUTH-WG] OAuth Redirection Attacks

You want to redirect on some errors because the last thing an AS wants is to leave the user in the AS because the user can't do anything there and the AS can't do anything either. It's just bad UX. But if the redirect url isn't valid, this is absolutely the time that the AS should keep the user there for user's protection.  Any AS redirecting the user to an invalid redirect url, isn't doing the right thing.

But that only solves the illegitimate phishing urls, it doesn't solve the class of problem where a phishing application is legitimately registered.


[Image removed by sender.]

Warren Parad

Founder, CTO
Secure your user data with IAM authorization as a service. Implement Authress<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fauthress.io%2F&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C10cc087500b9437ac09408d9c19b9d90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637753696441984307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=bD0m3JF8HeDpcw65ZHO4H29FaU2Lc6rvGwxr%2FzF52w0%3D&reserved=0>.


On Fri, Dec 17, 2021 at 9:23 PM Pieter Kasselman <pieter.kasselman=40microsoft.com@dmarc.ietf.org<mailto:40microsoft.com@dmarc.ietf.org>> wrote:
Agreed that the attackers goal is to bypass phishing filters and they found a way to achieve this by using an IdP that adheres to the standards. I don't have the context for the design choice to redirect on an error condition, but am curious why the IdP should not be allowed to handle the error condition, rather than redirect (or at least have the option to do so)?

From: OAuth <oauth-bounces@ietf.org<mailto:oauth-bounces@ietf.org>> On Behalf Of Vittorio Bertocci
Sent: Friday 17 December 2021 19:55
To: Warren Parad <wparad=40rhosys.ch@dmarc.ietf.org<mailto:40rhosys.ch@dmarc.ietf.org>>
Cc: oauth <oauth@ietf.org<mailto:oauth@ietf.org>>
Subject: [EXTERNAL] Re: [OAUTH-WG] OAuth Redirection Attacks

The attack doesn't rely on redirecting to unregistered URLs, that's the problem.
The goal of the attack is to circumvent phishing filters, by presenting a URL from a legitimate domain (the AS) that eventually redirects to the actual phishing URL. The actual phishing page doesn't need to target the same authorization server, or an authorization server at all for that matter.
An attacker can register a legitimate app on any authorization server as a service, on their own tenant. The goal is just to have a starting URL that phishing filters won't block, and the attacker is in full control of the redirect URIs they register in their own tenant.

My take: it might be tricky to change the redirect on error behavior at this point, but we should at least note the issue in the security considerations/BCPs and possibly give some advice. For example, on top of my head: AS should expose their endpoints on a domain dedicated to OAuth/OIDC operations, and avoid using its top level domains (different area/service, but think herokuapp.com<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fherokuapp.com%2F&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C10cc087500b9437ac09408d9c19b9d90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637753696441984307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6oiRh6TMVJnXYUGdDJt%2BLQQI0gCtOs7au%2BU7ctOd%2Bjo%3D&reserved=0> vs heroku.com<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fheroku.com%2F&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C10cc087500b9437ac09408d9c19b9d90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637753696441984307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=egS2AEI1FmpbL09upMutgGCUtpgyEn2l1FtdDb7WCdI%3D&reserved=0>) so that if a phishing filter decides to block direct links to the issuing endpoints will only impact things like IdP initiated flows (solvable by adding jumpstart endpoints on the RP anyway, just like IdP initiated sign in works in OIDC). I am sure there are lots of other things we can come up with that can make the problem better.

On Fri, Dec 17, 2021 at 5:00 AM Warren Parad <wparad=40rhosys.ch@dmarc.ietf.org<mailto:40rhosys.ch@dmarc.ietf.org>> wrote:
I think this just falls into the category of never redirect the user to a url that doesn't match one of the preregistered redirect urls (or logout urls for that matter). Any application that has redirects anywhere provides an opportunity for this attack vector, OAuth isn't unique in that way, it just is consistent and documented. And the 2.1 draft is pretty clear on this front:

https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-04#section-4.1.2.1<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdatatracker.ietf.org%2Fdoc%2Fhtml%2Fdraft-ietf-oauth-v2-1-04%23section-4.1.2.1&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C10cc087500b9437ac09408d9c19b9d90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637753696441984307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=M7ZtR%2BTYVIVzXZmHaeJS6rGVLC84RUisnfl5KCF0rHg%3D&reserved=0>
   If the request fails due to a missing, invalid, or mismatching
   redirect URI, or if the client identifier is missing or invalid, the
   authorization server SHOULD inform the resource owner of the error
   and MUST NOT automatically redirect the user agent to the invalid
   redirect URI.

I want to call this attack vector "illegitimate phishing applications" which is easily blocked by preregistration and/or PARs. And is only a very small subset of phishing attacks with OAuth, of which the larger group is "legitimate phishing applications". An app can be registered correctly, and still issue a phishing attack as phishing attacks through OAuth are actually indistinguishable from standard user delegation. There is no way to prevent these without an application review before registration is completed, here's an example that cloned Google apps y creating a fake app called google defender: https://www.trendmicro.com/en_us/research/17/d/pawn-storm-abuses-open-authentication-advanced-social-engineering-attacks.html<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.trendmicro.com%2Fen_us%2Fresearch%2F17%2Fd%2Fpawn-storm-abuses-open-authentication-advanced-social-engineering-attacks.html&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C10cc087500b9437ac09408d9c19b9d90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637753696441984307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9kKah9zgc66ew2AD5iGhgX2Qnzbnq3UJ%2FHoHsuzUU5w%3D&reserved=0>

If we can't protect against these latter ones, I hardly think protecting against the former is useful/interesting/valuable.


[Image removed by sender.]

Warren Parad

Founder, CTO
Secure your user data with IAM authorization as a service. Implement Authress<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fauthress.io%2F&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C10cc087500b9437ac09408d9c19b9d90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637753696441984307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=bD0m3JF8HeDpcw65ZHO4H29FaU2Lc6rvGwxr%2FzF52w0%3D&reserved=0>.


On Thu, Dec 16, 2021 at 9:05 PM Rifaat Shekh-Yusef <rifaat.s.ietf@gmail.com<mailto:rifaat.s.ietf@gmail.com>> wrote:

All,



An article was recently published discussing some OAuth Redirection Attacks to try to bypass phishing detection solutions. See the details of these attacks in the following link:



https://www.proofpoint.com/us/blog/cloud-security/microsoft-and-github-oauth-implementation-vulnerabilities-lead-redirection<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.proofpoint.com%2Fus%2Fblog%2Fcloud-security%2Fmicrosoft-and-github-oauth-implementation-vulnerabilities-lead-redirection&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C10cc087500b9437ac09408d9c19b9d90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637753696441984307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=itNmcvlkuKrPzG6%2F23Iod8zyH%2FqSjhcNuxJMw3dZslU%3D&reserved=0>




The article discusses attacks on Microsoft and GitHub, but these attacks are not unique to these companies.

The attacks take advantage of how OAuth handles error responses, which sends responses to the application's redirect URL.


I would like to get the thoughts of the working group on these types of attacks.

What is the best way to mitigate these attacks?

Do we need a new approach for handling errors with OAuth?


Regards,

 Rifaat

_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Foauth&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C10cc087500b9437ac09408d9c19b9d90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637753696442034307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9S1YCx61RDItp9TtylYb4bgxMTABCZJ9MbjwUHV%2FStM%3D&reserved=0>
_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Foauth&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C10cc087500b9437ac09408d9c19b9d90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637753696442034307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9S1YCx61RDItp9TtylYb4bgxMTABCZJ9MbjwUHV%2FStM%3D&reserved=0>