Re: HSTS preload flaw

Austin William Wright <aaa@bzfx.net> Mon, 10 February 2020 06:33 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 4E599120098 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 9 Feb 2020 22:33:06 -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 (1024-bit key) header.d=bzfx.net
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 MPQ0lIf8OHPI for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 9 Feb 2020 22:33:04 -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 32EFD120077 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 9 Feb 2020 22:33:03 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1j12Yx-0004Xj-8N for ietf-http-wg-dist@listhub.w3.org; Mon, 10 Feb 2020 06:28:55 +0000
Resent-Date: Mon, 10 Feb 2020 06:28:55 +0000
Resent-Message-Id: <E1j12Yx-0004Xj-8N@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 <aaa@bzfx.net>) id 1j12Yq-0004Ws-05 for ietf-http-wg@listhub.w3.org; Mon, 10 Feb 2020 06:28:48 +0000
Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <aaa@bzfx.net>) id 1j12Yo-0005nk-6Z for ietf-http-wg@w3.org; Mon, 10 Feb 2020 06:28:47 +0000
Received: by mail-pg1-x533.google.com with SMTP id z12so3355749pgl.4 for <ietf-http-wg@w3.org>; Sun, 09 Feb 2020 22:28:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bzfx.net; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Z0VPllhsWDZ4JJZZNTLVrlZ9vVkmcEMocQDwVuNrXcw=; b=bvFm0yP+h3WQiw+RNoMBrIVzCbf+cHrNlbbdcAbxt26kVPvAedZo7BV0/lPXCevSWh AhNbaVWe4Yd6x4VM5cME5zqf1/wtcddbQpulbGYvEQ5yFEOnwuU1P4rGd4o8Un3fMLTk s4AUcGIbrug2O7g9wp97XMG4NhRgcZn4Db7qU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Z0VPllhsWDZ4JJZZNTLVrlZ9vVkmcEMocQDwVuNrXcw=; b=XA4+ukXqZ1HR9RUiynKjbUI1sMw3p1GP5Vv7lYYpxURqhl7tapgj99BwA9BqTRJr1a HpS4zevDsSOnRhj7+chue1ry5pcD8XNb0Lc01zx0yFBjFu2bIHlxwqVC0vkQeTp+6+Ib NKP29VK6rvHw9IEVGTF+U3aKhnzYbflFLASA6qj5THz2sfsNx3yNNF15kvDFAmAY8bp9 JPINxuvjsewO+ToHJMVjR+4zZCirFhL5OQ8gXwfSHLwMJhHqjYwHYs1+jhrGP4+8NhbO iyolB43xOLWGGzIgzi163SvIdgVGUeLRonZb6/wsq5KfViAgkOrQxW75wA9V/NUN7XQG r3FA==
X-Gm-Message-State: APjAAAWwFTZswPB7VbyzMaBlWIXsAmJ+mgzn8W5bgJ00MH6oacq3f7IU XtnqxFr9G1P1rGerBE4AJ5dGQg==
X-Google-Smtp-Source: APXvYqzXwbZdlf+76MOXBEWiULruKXPnrS6JjfDU+e6jNzTh+S7F27If1MDFVFbiFbalMr7mJNr0Ag==
X-Received: by 2002:a63:1d1a:: with SMTP id d26mr75644pgd.98.1581316124203; Sun, 09 Feb 2020 22:28:44 -0800 (PST)
Received: from [192.168.0.13] (71-223-240-170.phnx.qwest.net. [71.223.240.170]) by smtp.gmail.com with ESMTPSA id l21sm11079613pgo.33.2020.02.09.22.28.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Feb 2020 22:28:43 -0800 (PST)
From: Austin William Wright <aaa@bzfx.net>
Message-Id: <4E5E865B-27E8-4933-B413-29494817246F@bzfx.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_A9B808CB-2AE5-4F05-AADD-EE119C7D069C"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\))
Date: Sun, 09 Feb 2020 23:28:42 -0700
In-Reply-To: <CACMfZd_iPqj5Q1=NE9zi_uQV5UsXQeVb818vxgQzHsSJ8m3SBw@mail.gmail.com>
Cc: Rob Sayre <sayrer@gmail.com>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
To: Eric Mill <eric@konklone.com>
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> <CACMfZd_iPqj5Q1=NE9zi_uQV5UsXQeVb818vxgQzHsSJ8m3SBw@mail.gmail.com>
X-Mailer: Apple Mail (2.3608.60.0.2.5)
Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=aaa@bzfx.net; helo=mail-pg1-x533.google.com
X-W3C-Hub-Spam-Status: No, score=-6.1
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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1j12Yo-0005nk-6Z b1f27e39d539c4897023fe7768e060d8
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HSTS preload flaw
Archived-At: <https://www.w3.org/mid/4E5E865B-27E8-4933-B413-29494817246F@bzfx.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37348
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>

On Feb 9, 2020, at 20:19, Eric Mill <eric@konklone.com> wrote:
> 
> On Sun, Feb 9, 2020 at 6:51 PM Austin Wright <aaa@bzfx.net <mailto:aaa@bzfx.net>> wrote:
> If encrypted connections are important to you as a server operator, it seems the only foolproof way to avoid plaintext communication is don’t listen on port 80.
> 
> Without getting into the overall issue, I just want to note for readers of the thread - server operators can't avoid plaintext communication by clients by not listening on port 80. Clients can attempt to initiate a connection to a hostname over port 80 whether or not the "real" server is listening on port 80, and that connection can be interfered with by a malicious network actor. That's why HSTS exists - to provide some kind of signal to the client that they should never bother even trying to make that connection.
>  

This is correct, thanks for the correction. I should have noted this. Also, note how HSTS applies to all connections to a hostname, regardless of port number.

In an active (MITM) attack, the server operator doesn’t even have to be online, of course; the attacker will receive all connections to the intended host.

My comment is with regards to passive attacks where a server operator wants to avoid inadvertently accepting plaintext data: A Permanent Redirect would still allow the headers to be sent to the server (and the request body, if the client doesn’t follow 100-continue).

It seems to me if an attacker can get a victim to compose a sensitive request, but direct that request to an attacker-controlled scheme and port, why not an attacker-controlled host too, or any host not on an HSTS Preload list?

Austin.