Re: [OAUTH-WG] Endpoint Misconfiguration / Social Engineering Attack

Daniel Fett <fett@danielfett.de> Thu, 08 October 2020 12:39 UTC

Return-Path: <fett@danielfett.de>
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 4EA773A0DD8 for <oauth@ietfa.amsl.com>; Thu, 8 Oct 2020 05:39:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=danielfett.de
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 XpG2J2w5oXK7 for <oauth@ietfa.amsl.com>; Thu, 8 Oct 2020 05:39:18 -0700 (PDT)
Received: from d3f.me (redstone.d3f.me [5.9.29.41]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8D7003A0DD5 for <oauth@ietf.org>; Thu, 8 Oct 2020 05:39:18 -0700 (PDT)
Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by d3f.me (Postfix) with ESMTPA id BB11A12BFC for <oauth@ietf.org>; Thu, 8 Oct 2020 12:39:16 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=danielfett.de; s=dkim; t=1602160756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m7IUxpJaQdG0x16w5octvl/JtWjSqdRYc88FbqTB3Oo=; b=I/6hznEt9LwkY5Z7Y5gcrqh/22I4RxAkQ/2YLivr86laA4xc5uzI9363LS5FljKeNNYKYP Rh2u3NFiMP38sSbftMZNRcYwH+o45jq4+3J6QAwXczEUj7hnRiJvCnvjErEJVXhE8urgpy hlvrqL59CbVSntqKWgZ15GFoJz6wShk=
To: oauth@ietf.org
References: <91cca627-2250-366f-cc14-a153812ba902@gtrs.de>
From: Daniel Fett <fett@danielfett.de>
Message-ID: <6c0efe83-7f61-dbff-b0dd-36f529dce590@danielfett.de>
Date: Thu, 08 Oct 2020 14:39:16 +0200
MIME-Version: 1.0
In-Reply-To: <91cca627-2250-366f-cc14-a153812ba902@gtrs.de>
Content-Type: multipart/alternative; boundary="------------EBFD945E8625DA5988631F10"
Content-Language: de-DE
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=danielfett.de; s=dkim; t=1602160757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m7IUxpJaQdG0x16w5octvl/JtWjSqdRYc88FbqTB3Oo=; b=J322cMU22AWLE14GYkjMgiSRT/epJYf/XYMk3IVWn0WF35eCI8kgacDrq/ECAW7tjl5tGp RzWvKVMkBNImLFS3zUSy9PcRpcgFeGDZK4RAqVRXIQ1uycZJjyzfinZOgAHLC5m8+41HKs t3mGEyjF03XylcxhACblvo5b8Q7NAo8=
ARC-Seal: i=1; s=dkim; d=danielfett.de; t=1602160757; a=rsa-sha256; cv=none; b=P97iYsrzZ5gQ8TnxZ7suoB382dCo1a6VkHgg8WLfm7JjDZls9caHR4MWoM8vT1QSHigTlm cGTv/t5s9vhOdzvLsU5zUc26AzVDDPFZX1EqOJ7ogT+0+Fe2tnJy/9O7NnJ1zX2sdukQj/ AAvkGVJ+EndwRh4Sdy8KtE5AKrsXE8U=
ARC-Authentication-Results: i=1; d3f.me; auth=pass smtp.auth=fett@danielfett.de smtp.mailfrom=fett@danielfett.de
Authentication-Results: d3f.me; auth=pass smtp.auth=fett@danielfett.de smtp.mailfrom=fett@danielfett.de
X-Spamd-Bar: /
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/xc_EyBIUyZ2xG0mGC-w3p7K5jL4>
Subject: Re: [OAUTH-WG] Endpoint Misconfiguration / Social Engineering Attack
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: Thu, 08 Oct 2020 12:39:20 -0000

Hi Guido,

Am 08.10.20 um 14:17 schrieb Guido Schmitz:
> We just had a discussion in Stuttgart on the possibility of
> misconfigured endpoints, i.e., an honest client uses the wrong endpoints
> for interacting with some honest AS. Such a setting might be the outcome
> of a social engineering attack against the administrators of a client
> (e.g., the attacker disguises as an AS support agent and convinces the
> client admin that some endpoint needs to be changed). If some endpoint
> is configured to a URL controlled by some adversary, critical data can
> leak and the attacker can even tamper with the requests to this endpoint.
>
> Is this a realistic attack scenario? Does anybody have more insight or
> data on this problem? (I think that such a scenario had been mentioned
> at some OSW discussion.)

This scenario is also explicitly mentioned in FAPI 1.0:
https://bitbucket.org/openid/fapi/src/master/Financial_API_WD_002.md#markdown-header-832-client-credential-and-authorization-code-phishing-at-token-endpoint

> A potential mitigation against this problem could be the usage of AS
> metadata discovery (RFC8414). In this case, the client only needs to set
> the "issuer" to configure the endpoint URLs. A social engineering attack
> to change the issuer might be less likely as a social engineering attack
> to change some endpoint URLs (which a client admin might have less
> understanding of). Further, using AS metadata discovery also reduces the

I find it plausible that having the issuer as the single entry point
makes misconfigurations less likely.

One disadvantage could be that an attacker might use a bening-looking
issuer URL to "hide" the fact that he uses an honest server's
authorization endpoint but an attacker-controlled token endpoint. Such
attacks, however, need to be caught by mix-up mitigations anyway (see
https://danielfett.de/2020/05/04/mix-up-revisited/).

A positive side-effect of a more widespread use of RFC8414 could be that
it becomes easier to configure OAuth and new(ish) features such as PKCE
and PAR could be enabled/relied-upon by clients more easily.

> risk of misconfiguration at the client in general. Maybe it is a good
> idea to add a recommendation for the usage of RFC8414 in the security
> BCP. What do you think?

Publishing RFC8414 metadata is (almost) mandatory already, since servers
MUST declare their support of PKCE (but they can also use
deployment-specific ways to accomplish this).

I would support adding

- that servers SHOULD publish RFC8414 metadata and
- that clients SHOULD make use RFC8414 discovery.

-Daniel


-- 
https://danielfett.de