[secdir] secdir review of draft-ietf-httpauth-basicauth-update-06 - security considerations on counterfeiting attacks

Julian Reschke <julian.reschke@gmx.de> Fri, 20 February 2015 13:53 UTC

Return-Path: <julian.reschke@gmx.de>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com []) by ietfa.amsl.com (Postfix) with ESMTP id 8BFE31A7D81; Fri, 20 Feb 2015 05:53:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id dQEbTaRqC0T2; Fri, 20 Feb 2015 05:53:21 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net []) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 104391A710C; Fri, 20 Feb 2015 05:53:21 -0800 (PST)
Received: from [] ([]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0Lv8hi-1XOpmz22SY-010OSP; Fri, 20 Feb 2015 14:53:00 +0100
Message-ID: <54E73C32.6070108@gmx.de>
Date: Fri, 20 Feb 2015 14:52:50 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: "http-auth@ietf.org" <http-auth@ietf.org>
References: <874mqjd49v.fsf@alice.fifthhorseman.net> <54E50FC3.9080708@gmx.de> <871tllbw2c.fsf@alice.fifthhorseman.net> <54E6348A.3080606@gmx.de> <87mw49ac9h.fsf@alice.fifthhorseman.net> <54E648B9.6030606@gmx.de> <9A93C4F9-C14E-410E-81B7-E36E05270FD2@gbiv.com>
In-Reply-To: <9A93C4F9-C14E-410E-81B7-E36E05270FD2@gbiv.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:moybVFRhPayWO/el3nE88vk+uXPw5ZD0U6//Ghp9yFtblo7CkF5 YoOKtUBgvuSfQj0mpwFyPZkZQiYJ246fD4KYvTuf1SMaWAG+ocEkYpeS2hk6wI28nn58n0j HOL8FI3MGy0XplzO9fVGG2nmdQju5JVP+FviwcJ46Y2x9D2CSHzjrqOqPhd7/1/820CzQWl tKo+AS1SwRnAofJz6m6Iw==
X-UI-Out-Filterresults: notjunk:1;
Archived-At: <http://mailarchive.ietf.org/arch/msg/secdir/If_fHxagz5QTrl3YZs8HRGZT2kc>
Cc: "secdir@ietf.org" <secdir@ietf.org>, "Roy T. Fielding" <fielding@gbiv.com>, "http-auth@ietf.org" <http-auth@ietf.org>, iesg@ietf.org, draft-ietf-httpauth-basicauth-update.all@tools.ietf.org
Subject: [secdir] secdir review of draft-ietf-httpauth-basicauth-update-06 - security considerations on counterfeiting attacks
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/secdir/>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Feb 2015 13:53:23 -0000

On 2015-02-20 00:06, Roy T. Fielding wrote:
> ...
>>>>> And sorry, one more question arises for me on re-read. i'm not sure i
>>>>> understand what this means:
>>>>>      Server implementers SHOULD guard against the possibility of this sort
>>>>>      of counterfeiting by gateways or CGI scripts.  In particular it is
>>>>>      very dangerous for a server to simply turn over a connection to a
>>>>>      gateway.  That gateway can then use the persistent connection
>>>>>      mechanism to engage in multiple transactions with the client while
>>>>>      impersonating the original server in a way that is not detectable by
>>>>>      the client.
>>>>> How should the server guard against this attack?  what sort does it mean
>>>>> to "turn over a connection to a gateway"?  does "gateway" mean
>>>>> "transparent HTTP proxy" or does it refer to something else?  Sorry if
>>>>> this is elementary stuff, but the term "gateway" only appears in this
>>>>> paragraph.
>>>> That text is present in RFC 2617; I don't understand it completely either.
> This is about web server internals.  Back in the early days, when HTTP was
> limited to one request per connection, there was a thing called NPH scripts
> that would allow a script to directly respond to the client instead of their
> response being framed by the server; a trivial implementation could hand
> off the file descriptor to the script and exit.  However, that kind of
> implementation became a potential security hole when persistent connections
> were introduced, since the script could redirect the client to a
> protected space within the same origin (controlled by someone else)
> and receive the redirected request within the script input, bypassing the
> web server's normal request-target hierarchy and collecting the credentials.
> The solution is to never delegate message framing.
> ...

Thanks for the explanation, Roy. I have changed that paragraph to:

>    Basic authentication is also vulnerable to spoofing by counterfeit
>    servers.  If a user can be led to believe that she is connecting to a
>    host containing information protected by Basic authentication when,
>    in fact, she is connecting to a hostile server or gateway, then the
>    attacker can request a password, store it for later use, and feign an
>    error.  Server implementers ought to guard against this sort of
>    counterfeiting; in particular, software components which can take
>    over control over the message framing on an existing connection (for
>    instance, "NPH" ("non parsing of headers") scripts) need to be used
>    carefully or not at all.


Best regards, Julian