Re: [Acme] SNI extension for tls-alpn-01 challenge in draft-ietf-acme-ip-05

Ilari Liusvaara <ilariliusvaara@welho.com> Wed, 24 April 2019 17:34 UTC

Return-Path: <ilariliusvaara@welho.com>
X-Original-To: acme@ietfa.amsl.com
Delivered-To: acme@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9D6F112010F for <acme@ietfa.amsl.com>; Wed, 24 Apr 2019 10:34:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=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 7Wuf37_rwmNN for <acme@ietfa.amsl.com>; Wed, 24 Apr 2019 10:34:47 -0700 (PDT)
Received: from welho-filter2.welho.com (welho-filter2.welho.com [83.102.41.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 712171200F6 for <acme@ietf.org>; Wed, 24 Apr 2019 10:34:45 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter2.welho.com (Postfix) with ESMTP id 9281EC3F3B; Wed, 24 Apr 2019 20:34:43 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp2.welho.com ([IPv6:::ffff:83.102.41.85]) by localhost (welho-filter2.welho.com [::ffff:83.102.41.24]) (amavisd-new, port 10024) with ESMTP id knCRvDvW5zw8; Wed, 24 Apr 2019 20:34:43 +0300 (EEST)
Received: from LK-Perkele-VII (87-92-19-27.bb.dnainternet.fi [87.92.19.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by welho-smtp2.welho.com (Postfix) with ESMTPSA id D3E3172; Wed, 24 Apr 2019 20:34:39 +0300 (EEST)
Date: Wed, 24 Apr 2019 20:34:39 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Ryan Sleevi <ryan-ietf@sleevi.com>
Cc: Corey Bonnell <cbonnell@outlook.com>, "acme@ietf.org" <acme@ietf.org>
Message-ID: <20190424173439.GA503906@LK-Perkele-VII>
References: <MN2PR18MB28457CCBEF6FFE2B70E286FCC3250@MN2PR18MB2845.namprd18.prod.outlook.com> <20190424142331.GA502878@LK-Perkele-VII> <CAErg=HFZSo5XF8x9WtC=5tCcXFN3xweg2ewMZSZwh0ON8kWaNw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <CAErg=HFZSo5XF8x9WtC=5tCcXFN3xweg2ewMZSZwh0ON8kWaNw@mail.gmail.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/acme/NpyrlpksQkSahGO2wM_t2hKiahE>
Subject: Re: [Acme] SNI extension for tls-alpn-01 challenge in draft-ietf-acme-ip-05
X-BeenThere: acme@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Automated Certificate Management Environment <acme.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/acme>, <mailto:acme-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/acme/>
List-Post: <mailto:acme@ietf.org>
List-Help: <mailto:acme-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/acme>, <mailto:acme-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Apr 2019 17:34:50 -0000

On Wed, Apr 24, 2019 at 12:33:50PM -0400, Ryan Sleevi wrote:
> On Wed, Apr 24, 2019 at 10:23 AM Ilari Liusvaara <ilariliusvaara@welho.com>
> wrote:
> 
> > I am not sure ALPN extension prevents exploitation.
> >
> >
> > Consider TLS SNI NAT (yes, such things exist) with:
> >
> > - Connections without SNI are handled in some safe way.
> > - Loose registration practices (which made TLS-SNI-01/02 insecure)
> > - No TLS termination (or customer can disable termination for their
> >   name).
> > - No support for TLS-ALPN.
> >
> >
> > Now, attacker claims the RDNS name of the IP address of the host
> > and sets up TLS-ALPN responder (this fails with DNS-type names).
> >
> >
> > Then attacker requests certificate for the IP address. The NAT then
> > sees the SNI, ignores ALPN and sends the connection to the attacker,
> > which can then respond with validation certificate. The authorization
> > passes and CA issues fradulent certificate.
> >
> >
> > The attack exploits the different SNI in requests client would send
> > and what validation uses (TLS-ALPN with DNS names uses the same name,
> > so the attack will not work). The attack against TLS-SNI also exploited
> > this difference (but could work even if TLS termination could not be
> > disabled).
> >
> 
> Just to make sure - these are TLS SNI NAT based on inspecting the TLS
> handshake, without actually terminating it, right? That is, it's doing the
> "middlebox" thing that introduced huge amounts of complexity to deploying
> TLS 1.3, and we're wanting to make sure the IP validation similarly works
> around it.

These things are pretty transparent when it comes to TLS. They do not
need to inspect ServerHello, so they won't. They will not need to
understand most TLS extensions, so they won't. 0-RTT might break if
not taken into account.


However, this sort of thing could be much bigger headache with QUIC...


> The further assumption here is that these products are 'safe by default'
> when omitting SNI, but are otherwise ignorant of ALPN and its semantics.

Well, these need to do something sane when SNI omitted (which might be
just giving an error or sending the connection to some appropriate
default handler).

And whereever that goes is where the raw IP would go.


> If that's roughly correct, would you agree a possible mitigation
> (notwithstanding complexity concerns) 'could' be the use of a client hello
> extension, echo'd by the server (thus confirming it understands the
> protocol, and is not merely 'dumb' parsing but an active participant in the
> TLS handshake), that indicates the IP being verified?

The server must already acknowledge the IP address being verified.

And that mitigation does not work. If the NAT does not know about
TLS-ALPN, it will not know about whatever extension that would be,
and thus just copy it through straight to attacker, who can then
freely reply.



-Ilari