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

Ilari Liusvaara <ilariliusvaara@welho.com> Wed, 24 April 2019 14:23 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 7478512009C for <acme@ietfa.amsl.com>; Wed, 24 Apr 2019 07:23:39 -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 rYS28NBOPwqD for <acme@ietfa.amsl.com>; Wed, 24 Apr 2019 07:23:37 -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 11A6B120020 for <acme@ietf.org>; Wed, 24 Apr 2019 07:23:36 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter2.welho.com (Postfix) with ESMTP id 78D97D0154; Wed, 24 Apr 2019 17:23:34 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp1.welho.com ([IPv6:::ffff:83.102.41.84]) by localhost (welho-filter2.welho.com [::ffff:83.102.41.24]) (amavisd-new, port 10024) with ESMTP id b7OrPXAUiHS6; Wed, 24 Apr 2019 17:23:34 +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-smtp1.welho.com (Postfix) with ESMTPSA id 18C8F286; Wed, 24 Apr 2019 17:23:32 +0300 (EEST)
Date: Wed, 24 Apr 2019 17:23:31 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Corey Bonnell <cbonnell@outlook.com>
Cc: "acme@ietf.org" <acme@ietf.org>
Message-ID: <20190424142331.GA502878@LK-Perkele-VII>
References: <MN2PR18MB28457CCBEF6FFE2B70E286FCC3250@MN2PR18MB2845.namprd18.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <MN2PR18MB28457CCBEF6FFE2B70E286FCC3250@MN2PR18MB2845.namprd18.prod.outlook.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/acme/LKiGBPC11EaHspXQ64Hk8uIM_14>
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 14:23:39 -0000

On Wed, Apr 17, 2019 at 01:54:51AM +0000, Corey Bonnell wrote:
> Hello,
> 
> Draft-ietf-acme-ip-05 specifies that for the tls-alpn-01 challenge,
> an SNI value with the in-addr/ipv6.arpa domain name corresponding to
> the iPAddress being validated MUST be specified. I have a concern
> that this requirement suffers the same problem that rendered
> tls-sni-01 insecure: namely, an arbitrary user on a shared hosting
> provider could upload an arbitrary certificate for the required
> .ip-addr/ipv6.arpa domain, thus circumventing any security provided
> by the mandatory SNI extension.
> 
> The mandatory ALPN extension prevents this from being exploited to
> obtain fraudulent certificates, but given how trivially the SNI
> requirement can be defeated in the same manner as for tls-sni-01, I
> don’t believe that requiring SNI provides any security value and is
> not necessary.

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).



-Ilari