Re: [Unbearable] Possible attack on Token Binding with RSA key exchange

Andrei Popov <Andrei.Popov@microsoft.com> Wed, 06 September 2017 00:33 UTC

Return-Path: <Andrei.Popov@microsoft.com>
X-Original-To: unbearable@ietfa.amsl.com
Delivered-To: unbearable@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 78E661321A4 for <unbearable@ietfa.amsl.com>; Tue, 5 Sep 2017 17:33:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.02
X-Spam-Level:
X-Spam-Status: No, score=-2.02 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=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 HcOxLamvbXRC for <unbearable@ietfa.amsl.com>; Tue, 5 Sep 2017 17:33:28 -0700 (PDT)
Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0094.outbound.protection.outlook.com [104.47.37.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D578A1321A0 for <unbearable@ietf.org>; Tue, 5 Sep 2017 17:33:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HSx+uyXViHB+5/b8cp2wF+ygPdGo/IHWWZDzX7FwIKQ=; b=QlHWTEInGCFX5F9I7bQw5SSnL73QzGyNKmSab7FBrdcOOG7SfFwfwMTyEWojjD3zIAYV2Ucxf4pE+LCVdxWX6oyS+DtAaRxars/CPwFcn9I/9e4xKD1s9yZV2cF6FIwphDBcHBj186yEgW1VEBLgASX/FuFgtNnsugGsw0lFrfA=
Received: from CY4PR21MB0120.namprd21.prod.outlook.com (10.173.189.14) by CY4PR21MB0134.namprd21.prod.outlook.com (10.173.189.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.0; Wed, 6 Sep 2017 00:33:26 +0000
Received: from CY4PR21MB0120.namprd21.prod.outlook.com ([10.173.189.14]) by CY4PR21MB0120.namprd21.prod.outlook.com ([10.173.189.14]) with mapi id 15.20.0056.000; Wed, 6 Sep 2017 00:33:26 +0000
From: Andrei Popov <Andrei.Popov@microsoft.com>
To: Nick Harper <nharper@google.com>
CC: Subodh Iyengar <subodh@fb.com>, IETF Tokbind WG <unbearable@ietf.org>
Thread-Topic: [Unbearable] Possible attack on Token Binding with RSA key exchange
Thread-Index: AQHTI248h15PeY9U802Z73g90LEOZ6Kgm0WAgAABCgCABLlR4IABsAuAgAAAa2A=
Date: Wed, 06 Sep 2017 00:33:26 +0000
Message-ID: <CY4PR21MB012011050871BEBB54168C958C970@CY4PR21MB0120.namprd21.prod.outlook.com>
References: <CACdeXiJK_=C8-DB=jd=pTb5VBT250_3+ptScqT5S_kDPDZK+qg@mail.gmail.com> <MWHPR15MB14559C4298AF55C40193F405B6920@MWHPR15MB1455.namprd15.prod.outlook.com> <MWHPR15MB14556750C654628F47186232B6920@MWHPR15MB1455.namprd15.prod.outlook.com> <CY4PR21MB0120ED0B8619A2960F3462368C910@CY4PR21MB0120.namprd21.prod.outlook.com> <CACdeXiLJo_LAijxW0nE77NC+nHKm3n-VgJ5myWm6xtyqEO3=uQ@mail.gmail.com>
In-Reply-To: <CACdeXiLJo_LAijxW0nE77NC+nHKm3n-VgJ5myWm6xtyqEO3=uQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [2001:4898:80e8:1::4ca]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; CY4PR21MB0134; 6:dvOM4aQPlVg87+AvFDSFFNIvuqYYQjAlZ9JCB6Ha23FQIyZraCydtIiVTyCQqnxHibU34TWloCXwegtJo74rocigncM5oeZs0HlD4Q19EHCSCUxqqyEAf548hy+8VEfM8dgtRPLeuIo9aMw2shI5AVEaH4FvtdfTbkooE9BmrWGdfxOF0sYpC687Nmd1qIJDBAVPmlEG+lJ6GTySVrez4X+QZAYxj06iYPux4wvthqWnF6D3dLgY27DTmRxAp8NvCIvkNdDeFlvk2CtYN+pNn/dPvWgKPBpyVwrcOAt2OdhUDp06eO0zOdE3PRkCk+/LHXGfeIRoWERujXXp/ut09g==; 5:SyFb5CtwHqpM8WFC4ScCIZgrzF8XEbRy4Mvx+KRfOfKEESKV+FgW3d3uixBmynctAN9jWuWlpQEJ5M2v+xr4srlZhgaudcqfC3RcgBvgXGsAYQvhFhzifXxG6a+N2ZT6CcNcGjtFZSIOw/4jmzU7Fw==; 24:4Cf4VajtBASfuEePtUle6+w1rxH0qMMUVopg3QISHZB/fIcgz9XQKOdLD/sU/TiU0ZHR/hMqUcUpTyaJQLm8ViWJ+1vHKxU0fiDVfDZVBFw=; 7:HWC4DS+09HtjrbLFCAoVHYXvI7dLkID3sBcO27f5tE6fM3MWb5OyK5imNEJCJbNIrTTBwOOWY3aLA0yLA9E7x3C0A2DW2rml/WfIM+C3Hqs7CW123xst6TjoE0aZ1Y0Q80c0prm/J315v7a3ibRRUHW4LC8HFFpcW5r1lJorZ1zv44vZszqZg7PXSy+JJ/qUQQ6rZG2uQ6i5xb0TLB7U0Lzle++S6SV3VHeyPuRjQ/U=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 67526286-9d03-4c0a-f2f1-08d4f4bee3bc
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR21MB0134;
x-ms-traffictypediagnostic: CY4PR21MB0134:
x-exchange-antispam-report-test: UriScan:(158342451672863)(89211679590171)(192374486261705)(189930954265078)(67672495146484)(211936372134217)(153496737603132)(219752817060721);
x-microsoft-antispam-prvs: <CY4PR21MB01344136C04368B6927C8C6B8C970@CY4PR21MB0134.namprd21.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(920507026)(6055026)(61426038)(61427038)(6041248)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR21MB0134; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR21MB0134;
x-forefront-prvs: 0422860ED4
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(47760400005)(189002)(13464003)(199003)(24454002)(377454003)(55016002)(189998001)(6306002)(8936002)(33656002)(97736004)(575784001)(8676002)(99286003)(101416001)(86362001)(54356999)(50986999)(76176999)(7696004)(34040400001)(54906002)(966005)(68736007)(2950100002)(2906002)(86612001)(3280700002)(6506006)(3660700001)(6436002)(74316002)(81156014)(93886005)(2900100001)(5660300001)(81166006)(7736002)(8990500004)(106356001)(105586002)(305945005)(6916009)(4326008)(10090500001)(77096006)(6246003)(10290500003)(9686003)(102836003)(14454004)(6116002)(53546010)(229853002)(72206003)(110136004)(5005710100001)(25786009)(53936002)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0134; H:CY4PR21MB0120.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Andrei.Popov@microsoft.com;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2017 00:33:26.6763 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0134
Archived-At: <https://mailarchive.ietf.org/arch/msg/unbearable/dy8dPHzEmrspuKbsGbbEaXQzcwk>
Subject: Re: [Unbearable] Possible attack on Token Binding with RSA key exchange
X-BeenThere: unbearable@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "\"This list is for discussion of proposals for doing better than bearer tokens \(e.g. HTTP cookies, OAuth tokens etc.\) for web applications. The specific goal is chartering a WG focused on preventing security token export and replay attacks.\"" <unbearable.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/unbearable>, <mailto:unbearable-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/unbearable/>
List-Post: <mailto:unbearable@ietf.org>
List-Help: <mailto:unbearable-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/unbearable>, <mailto:unbearable-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Sep 2017 00:33:31 -0000

> Would it be reasonable to say that defending against attackers with possession of a server's private key is outside of the scope of Token Binding?
Server's private key, and/or client private key, and/or master secret... anything that enables the attacker to MITM a user's TLS session, or to duplicate a user's EKM on the attacker's TLS connection, will break TB.

-----Original Message-----
From: Nick Harper [mailto:nharper@google.com] 
Sent: Tuesday, September 5, 2017 5:23 PM
To: Andrei Popov <Andrei.Popov@microsoft.com>
Cc: Subodh Iyengar <subodh@fb.com>; IETF Tokbind WG <unbearable@ietf.org>
Subject: Re: [Unbearable] Possible attack on Token Binding with RSA key exchange

I agree that at this point it doesn't make sense to limit TB to (EC)DHE.

I'm fine with writing a PR to cover this, but I'm unsure what to put in it. I liked how draft-balfanz-tls-channelid started its security considerations by describing 4 classes of network attackers, and I'd like to do something similar here. However, it's unclear to me which of those classes of network attackers are considered as part of the threat model for Token Binding. Would it be reasonable to say that defending against attackers with possession of a server's private key is outside of the scope of Token Binding?

On Mon, Sep 4, 2017 at 3:59 PM, Andrei Popov <Andrei.Popov@microsoft.com> wrote:
> It seems clear that binding tokens to broken TLS channels does one no 
> good, but I don’t mind adding some statements to this effect in the 
> security considerations.
>
> The statements would need to be general enough to cover TLS client and 
> server compromise, PFS and non—PFS.
>
>
>
> Nick, please feel free to author a PR. If we get to IESG review 
> someday, there will be more edits, and we can incorporate this as well.
>
>
>
> I don’t think it makes sense to limit TB to (EC)DHE, especially if 
> we’re going to allow TB in combination with TLS 1.3 0-RTT mode.
>
>
>
> Cheers,
>
>
>
> Andrei
>
>
>
> From: Unbearable [mailto:unbearable-bounces@ietf.org] On Behalf Of 
> Subodh Iyengar
> Sent: Friday, September 1, 2017 3:28 PM
> To: Nick Harper <nharper@google.com>; IETF Tokbind WG 
> <unbearable@ietf.org>
>
>
> Subject: Re: [Unbearable] Possible attack on Token Binding with RSA 
> key exchange
>
>
>
> Having said that, even if we only support forward secure ciphers, I do 
> not think we can reasonably claim that we are secure against the 
> threat of stolen private keys.
>
> I like the the carrot opportunity this brings to encourage adoption of 
> forward secure cipher suites.
>
>
>
> Subodh
>
> ________________________________
>
> From: Subodh Iyengar
> Sent: Friday, September 1, 2017 3:24:25 PM
> To: Nick Harper; IETF Tokbind WG
> Subject: Re: [Unbearable] Possible attack on Token Binding with RSA 
> key exchange
>
>
>
> +1 to requiring that token binding only be used with forward secure 
> +cipher
> suites.
>
> I believe the extended master secret requirement of token binding 
> prevents the attack on forward secure suites, i.e. an attacker cannot 
> change the DH share advertised by the real server and thus needs to 
> get the private key for it.
>
> Subodh
>
> ________________________________
>
> From: Unbearable <unbearable-bounces@ietf.org> on behalf of Nick 
> Harper <nharper@google.com>
> Sent: Friday, September 1, 2017 3:03:37 PM
> To: IETF Tokbind WG
> Subject: [Unbearable] Possible attack on Token Binding with RSA key 
> exchange
>
>
>
> I came across an attack on Token Binding today, which I think is worth 
> addressing in TBPROTO in some fashion (likely another paragraph in 
> Security Considerations). This attack involves an adversary with the 
> private key of a server it wishes to impersonate, and was mentioned in 
> draft-balfanz-tls-channelid in the last paragraph of its Security 
> Considerations.
>
> In brief, if an attacker has possession of a server's private key, it 
> can hijack a TLS connection between client and server if the 
> connection uses RSA key exchange instead of (EC)DHE key exchange, 
> which allows the attacker to exercise the bound token without 
> possession of the Token Binding private key.
>
> I realize that we're past WGLC at this point, but I think this should 
> be addressed. On one end, we could require forward-secret key exchange 
> modes with Token Binding. We could also describe this specific attack 
> in the Security Considerations, or we could expand the Security 
> Considerations to describe what attacks are and aren't in the Token 
> Binding threat model, to say that attacks where the adversary has the 
> server's private key are out of scope.
>
> _______________________________________________
> Unbearable mailing list
> Unbearable@ietf.org
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furlde
> fense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttps-3A__www.ietf.org_mailman_l
> istinfo_unbearable%26d%3DDwICAg%26c%3D5VD0RTtNlTh3ycd41b3MUw%26r%3Dh3J
> u9EBS7mHtwg-wAyN7fQ%26m%3DaK_8DMmoWWiiQJmFt3JvhVLT6eh7Qm3nf3WuMhMC7vM%
> 26s%3DB0sKQEO8i8hDpLizsh7X8ins9EGGwOwcckYqZku7zEE%26e&data=02%7C01%7CA
> ndrei.Popov%40microsoft.com%7Cc4377a40e8734b28e71808d4f4bd73ea%7C72f98
> 8bf86f141af91ab2d7cd011db47%7C1%7C0%7C636402541906078858&sdata=l4HHrX6
> 7T4Dn1FVfBHlw1xVUv%2B3BSJ867Pf5ezGF3%2B0%3D&reserved=0=