Re: [apps-discuss] [websec] [kitten] [saag] HTTP authentication: the next generation

Marsh Ray <marsh@extendedsubset.com> Mon, 13 December 2010 00:47 UTC

Return-Path: <marsh@extendedsubset.com>
X-Original-To: apps-discuss@core3.amsl.com
Delivered-To: apps-discuss@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id EF99E3A6D90; Sun, 12 Dec 2010 16:47:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.59
X-Spam-Level:
X-Spam-Status: No, score=-2.59 tagged_above=-999 required=5 tests=[AWL=0.009, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bWvmuEKtAYSh; Sun, 12 Dec 2010 16:47:35 -0800 (PST)
Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) by core3.amsl.com (Postfix) with ESMTP id 653B93A6D16; Sun, 12 Dec 2010 16:47:35 -0800 (PST)
Received: from xs01.extendedsubset.com ([69.164.193.58]) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from <marsh@extendedsubset.com>) id 1PRwbI-00080u-0i; Mon, 13 Dec 2010 00:49:12 +0000
Received: from [192.168.1.15] (localhost [127.0.0.1]) by xs01.extendedsubset.com (Postfix) with ESMTP id 2788E60C6; Mon, 13 Dec 2010 00:49:09 +0000 (UTC)
X-Mail-Handler: MailHop Outbound by DynDNS
X-Originating-IP: 69.164.193.58
X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1+LS98k8zKrRc2V9A6d+dLVfNCJcc+FPxg=
Message-ID: <4D056D83.2020704@extendedsubset.com>
Date: Sun, 12 Dec 2010 18:49:07 -0600
From: Marsh Ray <marsh@extendedsubset.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7
MIME-Version: 1.0
To: "Roy T. Fielding" <fielding@gbiv.com>
References: <4D02AF81.6000907@stpeter.im> <p06240809c928635499e8@[10.20.30.150]> <ADDEC353-8DE6-408C-BC75-A50B795E2F6C@checkpoint.com> <78BD0B98-0F20-478B-85F1-DBB45691EB0D@padl.com> <4D0479E3.4050508@gmail.com> <4D04D7D6.4090105@isode.com> <A23730A9-728B-4533-96D7-0B62496CC98A@checkpoint.com> <4D051731.1020400@isode.com> <2230EA03-32C5-4D34-BC6B-304E813BE3A7@gbiv.com>
In-Reply-To: <2230EA03-32C5-4D34-BC6B-304E813BE3A7@gbiv.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Mon, 13 Dec 2010 09:50:24 -0800
Cc: "apps-discuss@ietf.org" <apps-discuss@ietf.org>, websec <websec@ietf.org>, "kitten@ietf.org" <kitten@ietf.org>, "http-auth@ietf.org" <http-auth@ietf.org>, "saag@ietf.org" <saag@ietf.org>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Subject: Re: [apps-discuss] [websec] [kitten] [saag] HTTP authentication: the next generation
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Dec 2010 00:47:37 -0000

On 12/12/2010 04:39 PM, Roy T. Fielding wrote:
>
> Define them all and let's have a bake-off.  It has been 16 years
> since HTTP auth was taken out of our hands so that the security
> experts could define something perfect.  Zero progress so far.

Perhaps it's a bad idea?

> We
> should just define everything and let the security experts do what
> they do best -- find the holes and tell us what not to implement.

I know some professional pen-testers who would love that!

Check out these videos. This is what happens when you take a 
general-purpose authentication protocol and repurpose it for use across 
the internet for an insecure application protocol:

http://extendedsubset.com/smb_relay_fully_patched.wmv
http://extendedsubset.com/smb_reflection_arp_poisoning.wmv
http://extendedsubset.com/?p=36

This case is NTLMv2, but the phenomenon is not limited to that.

The problem is that most general-purpose authentication protocols do not 
require enough specificity about the context of the authentication: who 
and what are you authenticating, to whom, and how does each side know 
it's operating under the same beliefs as the other?

This means that even if the client wants to be careful and authenticate 
only for the purpose of setting up a secure connection, the attacker can 
possibly forward that authentication to auth his own connection or 
transaction on some other service (on the same or even a different server).

Most auth protocols don't let the client strongly verify the server's 
identity before the client has to authenticate with his own. This is 
probably at least in part because it requires some common infrastructure 
to do this. So Kerberos and x509 PKI systems can authenticate the server 
(and sometimes even the target service), but most others do not.

Since HTTP lacks connection integrity, it's meaningless to speak of "an 
authenticated client". Perhaps the only thing that could be meaningfully 
authenticated is the request data itself. But auth protocols designed 
for setting up persistent connections typically don't have defined 
inputs for the message data/digest being signed, so it's often 
impractical to reuse them for that purpose.

These issues have been mostly addressed at the protocol level for TLS 
client cert authentication. If it really just comes down to deployment 
and client usability issues, it's hard to imagine coming up with 
something at another layer which would have less risk than building on 
top of that.

Deploying new uses of compatible, standard authentication protocols over 
insecure application protocols can be bad for the greater security 
ecosystem because it widens the field for cross-protocol attacks.

- Marsh