Re: HSTS preload flaw

Rob Sayre <sayrer@gmail.com> Mon, 10 February 2020 00:50 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 793EB120052 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 9 Feb 2020 16:50:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.749
X-Spam-Level:
X-Spam-Status: No, score=-2.749 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 bXlxiFQygCon for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 9 Feb 2020 16:50:35 -0800 (PST)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 92DF912004D for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 9 Feb 2020 16:50:35 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1j0xE0-0003Xf-MU for ietf-http-wg-dist@listhub.w3.org; Mon, 10 Feb 2020 00:46:56 +0000
Resent-Date: Mon, 10 Feb 2020 00:46:56 +0000
Resent-Message-Id: <E1j0xE0-0003Xf-MU@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <sayrer@gmail.com>) id 1j0xDv-0003Wt-JH for ietf-http-wg@listhub.w3.org; Mon, 10 Feb 2020 00:46:51 +0000
Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <sayrer@gmail.com>) id 1j0xDt-0006I2-O3 for ietf-http-wg@w3.org; Mon, 10 Feb 2020 00:46:51 +0000
Received: by mail-il1-x12e.google.com with SMTP id v13so4316600iln.4 for <ietf-http-wg@w3.org>; Sun, 09 Feb 2020 16:46:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MvsfHQy7+D3hx4nSo7bDUqs1PiqCtC3kptYuTcnNfJs=; b=SHxHIVcwQv5mMwnthuJc2gaE5svepbgDhUys1HTQJZ6ssIf/fm5liLIyXbeO4biF6z PDUi+VEV5633pPwTngqVxp4aoUzUcl0IgjVyzPLUjlcgwfn0iDYSV1K5fBjBe0k3W463 ApV1pqlJ2wuXakAeTpvN20EaDwmzWzJ9zHiWvSLXCft/lR+VX21S9ggtzHlBIJ/DhaSW hPgh9B/M73PErAWD9ZC65DPq4cA/O5eIQ18uLjHlImImtjRB8j7STIcs46EijKO/ac8+ Y8Yy9dt6I2tTzAEdS80ld5+jMc0fzQb+f1GGRyX6tc8aJm66wCsgtOZpIDmLbUIMSgJK F0gA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MvsfHQy7+D3hx4nSo7bDUqs1PiqCtC3kptYuTcnNfJs=; b=eQoLDczKjMdMuqZknPypn+4NFlT7U8Wd9we+udm4oG70XlbHKBeZmp28va+zsJLq4/ fYHiugNGnrdB9dVVTT4MXw3SRyN2RvO90FIdi+mhRt93O6mwMeLsG8uEEq20UhWiHslw lnCbRdrGtS2BjlGUJqeR1dp7I4OAm86jz5Ua1guNVtJK4ZvMiYXZfRAe8bCdDufX/R2d uYKRrd1fvedwiHgokVlVXPHbuu8lb8v8hW8+Gq9z5Yh6lrIMvjzPUWcWpFEOCm/lOJc2 n5XicSObfLt93v4a2rCa3qbvhyAL0KpLAJhf5eWk1rsHQiZeCBQZPkesrCDlzyLcyS9y TyeA==
X-Gm-Message-State: APjAAAUc3VCqXC7ecT7NqQj4Mcorx2rB6X+4e/lZ5A5ACrmK+bdB7uPP W0deY9th9LnW8FbEc5L8y+nVw+Zp3foMu3NAOksoF2rdBaQ=
X-Google-Smtp-Source: APXvYqy8rm1VyYCy/zHH2O342W6H0f99D6OKT6UKq/58Cs3gguiXl4sQZeJzAN5DHZ3hjlfWFSmGIPbmu6yxFAbESfA=
X-Received: by 2002:a92:5845:: with SMTP id m66mr10173028ilb.257.1581295608479; Sun, 09 Feb 2020 16:46:48 -0800 (PST)
MIME-Version: 1.0
References: <CAChr6Syfo-XpN0i4O0==G29KJ22oCvq+X_nbjgq8aAhtCR7BzA@mail.gmail.com> <A0F7BEB8-C236-429B-94F7-C2F748FDD70C@bzfx.net> <CAChr6SyG56wDh=EvEmMUzOfK5YWP3yhrQkXpmWx9MYe9BsghSw@mail.gmail.com> <2F2F0B6A-8FD5-459E-9395-FD0437A9E946@bzfx.net>
In-Reply-To: <2F2F0B6A-8FD5-459E-9395-FD0437A9E946@bzfx.net>
From: Rob Sayre <sayrer@gmail.com>
Date: Sun, 09 Feb 2020 16:46:37 -0800
Message-ID: <CAChr6SyCad45kL7=vASo4mNJJnXuGGHpOP_zTU9+dFyAoYTAeg@mail.gmail.com>
To: Austin Wright <aaa@bzfx.net>
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="000000000000074703059e2e13bc"
Received-SPF: pass client-ip=2607:f8b0:4864:20::12e; envelope-from=sayrer@gmail.com; helo=mail-il1-x12e.google.com
X-W3C-Hub-Spam-Status: No, score=-7.4
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TXREP=-3.299, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1j0xDt-0006I2-O3 642b4c51ae7cd16cedb2c9b358163ba6
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HSTS preload flaw
Archived-At: <https://www.w3.org/mid/CAChr6SyCad45kL7=vASo4mNJJnXuGGHpOP_zTU9+dFyAoYTAeg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37346
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Hi,

On Sun, Feb 9, 2020 at 3:47 PM Austin Wright <aaa@bzfx.net> wrote:

>
> HSTS is defined by RFC 6797. It's true that the preload list can vary
> between versions of browsers, but in this case I found that the macOS
> versions of browsers other than Safari had these TLDs preloaded, while the
> iOS versions of these browsers did not. I understand why this happened, but
> I think it would be a stretch to call it intentional. The discrepancy
> existed for over a year, and no browser vendor seemed aware of it.
>
>
> The preload list isn’t a part of RFC 6797, which is itself optional to
> implement.
>

Well, the contents of the list itself are not part of the RFC, so it is
possible to spec-lawyer one's way into saying this isn't a bug (and maybe
that's reasonable).

This topic is covered in RFC 6797, though. See "12.3.  HSTS Pre-Loaded
List" https://tools.ietf.org/html/rfc6797#section-12.3

That section discusses "the bootstrap MITM vulnerability" at hand here. A
second problem with these TLDs is that they were marketed with their
presence in the HSTS pre-load list as a benefit, but not even the owner of
these TLDs got this HSTS pre-load implemented in all of their products.



>
>
>
>> And even if it was, I don’t really see how you can say “At least 600k
>> domains were impacted”. What would an attack look like? You have to have a
>> user-agent willing to send a sensitive payload in plaintext, and a server
>> with port 80 open to receive it.
>>
>
> 600k is a conservative estimate based on the number of domains that seemed
> to be registered under these TLDs. Any browser without these TLDs preloaded
> would first attempt to connect via HTTP if supplied with an http:// URL
> or a schemeless URL (like "foo.dev").  At that point, any server could
> provide a response. You might think "surely there will be a scary warning",
> but this actually was not the case in all browsers, especially on mobile
> phones. Safari did say "Not Secure" in the address bar, but other browsers
> just showed an "(i)" info icon instead of a lock, so a user would have to
> notice the absence of a lock.
>
>
> Note that even TLS will indicate which domain you’re connecting to. If
> server operators make diligent use of HttpOnly and Secure for cookies, the
> only information at risk is the path component of the URI you’re connecting
> to, your user-agent details, and maybe a payload (if you can figure out a
> way to get an HTML form to POST to an http: endpoint without a warning).
>

I don't agree with this analysis. There are several ways to escalate this
attack once you get the user to load a single HTTP page without realizing
they've been mislead. If they're using an app, they probably won't get any
indication there's a problem. Ultimately, I'm glad this behavior was
improved in iOS, macOS, tvOS, watchOS, and for many apps running on them.
As in the top post, I hope we can start automating HSTS list checks using
continuous integration or telemetry.

thanks,
Rob