Re: [Trans] can CT defend against dual CA compromise?

Ben Laurie <benl@google.com> Mon, 22 February 2016 11:01 UTC

Return-Path: <benl@google.com>
X-Original-To: trans@ietfa.amsl.com
Delivered-To: trans@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C61F61B3090 for <trans@ietfa.amsl.com>; Mon, 22 Feb 2016 03:01:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.016
X-Spam-Level:
X-Spam-Status: No, score=0.016 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.006, SPF_PASS=-0.001] autolearn=no
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 NTqQE0zuT14u for <trans@ietfa.amsl.com>; Mon, 22 Feb 2016 03:01:28 -0800 (PST)
Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8B73E1B307F for <trans@ietf.org>; Mon, 22 Feb 2016 03:01:28 -0800 (PST)
Received: by mail-io0-x230.google.com with SMTP id l127so172532527iof.3 for <trans@ietf.org>; Mon, 22 Feb 2016 03:01:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3WdTaPK82jM6mrsYXPZ3BxrCHVVHuR97aWBj/UBqy54=; b=FYOrT3cQ1wt/VBxfQHW1gbLxuBIZHjLflJCPci/L0ssJmVr1MxCGXQ2+MoZJE8+YIl oEd21ZLmhsvmVWOo5PqrHV5ASIBAk3pWNCr0X6dtSRiKAmMXpfLqHwuTowDcagKhn4Gw T2U2Wh/hlElAXnzJId7CZYGG70PxwxidW+FRaKrQxuD70E3+NDtUys0tdwWP/rvNopsg wWeZm3PgQd6CJtXppEZ3pRZUCQ0cBGkWN4zWIVw06gI/VBpRkIEwRqpeibUHjI8cHrJ+ 8mvJkA7Sm5+BlWep6kl5ulnUUVeVawUO11OtCp5+QcTnZFAq6TznRyir1bTtFOhxt+/n iNiA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=3WdTaPK82jM6mrsYXPZ3BxrCHVVHuR97aWBj/UBqy54=; b=OhW/L4lgXGTxnFe/W7MtOiQLBs/F1gleZQpuzvc+xTIhEz9MhqN8FXJ20e/E8EYR2Y Xmpkdbnk+8jbwJgFUP+GooQ+RG2UP+1WsTwY+eZAXgVsLGSyM+AKAm5vExXMoXwZ0ZAv A/hUs9Q+ZLexEWS/SMFbCQFeE7cBD+qqruvVd8dAM6ZCUwuGT+BlJbdEiChuWsAEVEf0 Y3u4uINRr8NHQFFtBqq6WwH7Id1MKefu21v9xkOpZqFET0EhVc5dtbfWiq177MN1qJK8 MpSN/he314q7ZhAPAZ/IUYNC4m2qad6fRCoRwG8nCfMq0UTHPc7NH0ZXUu+SjGqql2gs rscw==
X-Gm-Message-State: AG10YORgyqYvhfVLR5AdzJmgzLlqxRGgJ8/yjHOnSFqKx/Vg39y6xRp9zfiEcbCMwsYWXe1xwhIfwMLhJ+wXTdyA
MIME-Version: 1.0
X-Received: by 10.107.16.17 with SMTP id y17mr32682757ioi.119.1456138887802; Mon, 22 Feb 2016 03:01:27 -0800 (PST)
Received: by 10.64.26.98 with HTTP; Mon, 22 Feb 2016 03:01:27 -0800 (PST)
In-Reply-To: <87io1i3gqw.fsf@alice.fifthhorseman.net>
References: <87io1i3gqw.fsf@alice.fifthhorseman.net>
Date: Mon, 22 Feb 2016 11:01:27 +0000
Message-ID: <CABrd9SQh5B8E8phCvgLdUntKBu=u4p2iUHJ7ZrjqMwz8edwLHA@mail.gmail.com>
From: Ben Laurie <benl@google.com>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Content-Type: multipart/alternative; boundary="001a113ff32827a807052c59c198"
Archived-At: <http://mailarchive.ietf.org/arch/msg/trans/tAsw6mulsuc5QErPN8A5igexA8c>
Cc: "trans@ietf.org" <trans@ietf.org>
Subject: Re: [Trans] can CT defend against dual CA compromise?
X-BeenThere: trans@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Public Notary Transparency working group discussion list <trans.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/trans>, <mailto:trans-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/trans/>
List-Post: <mailto:trans@ietf.org>
List-Help: <mailto:trans-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/trans>, <mailto:trans-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 22 Feb 2016 11:01:30 -0000

On 21 February 2016 at 03:05, Daniel Kahn Gillmor <dkg@fifthhorseman.net>
wrote:

> CT currently focuses on logging end-entity (leaf) certs; as a result, i
> think that an attacker who can compromise two CAs can keep one of those
> compromises secret from the CT ecosystem.
>
> Consider an attacker who has compromised two widely-accepted root CAs, A
> and B, and wants to mint usable credentials for host Z.
>
> The root CAs each control multiple intermediate authorities: A controls
> A_1,
> A_2, etc; B controls B_1, B_2, etc.
>
> The attacker creates a new secret key X and using A and B creates two
> new intermediate authorities A_X and B_X, which both have the same
> Subject, the same public key, and the same Subject Key Identifier
> extension.  The intermediate authority certs themselves differ, however,
> because of their issuers.
>
> The attacker generates a new end entity secret key Y and produces a cert
> C (Subject = Z, Public Key = Y), issued by X.
>
> Now we have two possible chains:
>
>   A -> A_X -> C
>
>   B -> B_X -> C
>
> The attacker logs one of those chains and gets an SCT for cert C.  For
> this example, let's say the A chain gets logged.
>
> If C is discovered and exposed as a forgery, then root CA A takes the
> heat.  Either they disavow/revoke their sub-CA A_X or they are rejected
> From TLS client root stores.
>
> However, the attacker can still use C in the wild, by supplying the B
> chain.
>

Up to here, I agree.


> Note that in this scenario, it's unlikely that space-constrained
> blacklist-style client updates (e.g. CRLset) will include every leaf
> certificate that chains to A after A is known-compromised.  So TLS
> clients won't necessarily be warned off of C directly.


It seems to me there are multiple solutions here. The easiest is to not
blacklist A_X, but instead to blacklists A_X's subject, which will also
blacklist B_X.

To be more selective, blacklist the individual certs that were mis-issued
(we have a complete list, of course, in the logs) and stop accepting new
certs signed by X.



>
> The B chain (and B_X in particular) won't ever surface in the logs'
> audit trails, though, because C has already been logged; this looks to
> me like CT will fail at its goal of detecting misissuance by B.
>
> Consider this scenario over time, as well.  Once A is publicly-known to
> be compromised, the attacker can impersonate new targets with the same
> approach: mint a new leaf cert using X (perhaps fiddling with the
> validity dates), submit to the logs (and get the SCT) with the A chain,
> and then deploy with the B chain.
>
> How to fix this?  A few ideas come to mind, but i'm not convinced of
> either of them yet:
>
>  * recommend that clients who care about transparency should expect that
>    all intermediate certs themselves are logged -- 6962bis already
>    permits this, though it seems to be mainly in contemplation of
>    name-constrained intermediate authorities.  This expands the number
>    of SCTs or inclusion proofs that need to accompany a chain, and makes
>    verification logic slightly more complicated.
>

Regardless of the argument above and mitigation thereof, I think this would
be a good idea.


>
>  * logs could refuse to log any certs that chain back to a known-failed
>    CA (or through a known-bad intermediate CA).  This would constrain a
>    dual-compromise attacker from minting new certs after the first CA is
>    known to be compromised.  This seems like a useful mitigation, but
>    it's also complictated and delicate.  What does "known-failed" mean?
>    What if there is a dispute over the validity of a cert, with one
>    party claiming that it was misissued, and the CA claiming its
>    legitimacy?  What if some browser vendors have dropped the CA, and
>    others have not?  This puts the logs in a position of being some kind
>    of arbiter of the root store, with very subtle knock-on effects to
>    security of the whole ecosystem if they decide to not drop a CA.
>

Not all that subtle, surely, and completely visible so we can see its going
on...


>
>    Even more subtly, if the public narrative of the compromise ends up
>    being "A_X is bad" (include the intermediate cert in client
>    blacklists and refuse to log things that chain through it) instead of
>    "A is bad" (include the root cert in client blacklists and refuse to
>    log things that chain to it), then the attacker can simply mint
>    multiple intermediate keys (X_0, X_1, etc) and corresponding
>    intermediate certificates at the time of the compromise, and
>    burn/expose them one spoofing attack at a time.
>

After a while, we would clearly decide that A is bad. :-)


>
> Any other ideas?  Any holes in the reasoning here?  I'd love for this
> analysis to be mistaken.
>

As I say, I think the problem is real, unfortunately. However, the
consequences don't seem quite as terrible as you think. I hope!