Octet

What does HTTPS protect, and what can someone watching the network still see?

Show the answer

Say this first

HTTPS protects the content of the HTTP exchange: the URL path and query, headers, cookies and bodies are encrypted and tamper-proof, and the certificate proves the client is talking to the named server. An observer still sees the IP addresses and ports, the timing and size of the traffic, the DNS lookup unless it is encrypted, and the hostname in the SNI field of the ClientHello unless Encrypted Client Hello is used. With TLS 1.2 the server certificate is also visible.

Go deeper

Visible versus hidden

ItemVisible on the wire
Client and server IP, portsYes
DNS query for the nameYes, unless DNS over HTTPS or TLS
Hostname in SNIYes, unless ECH
Server certificateTLS 1.2 yes, TLS 1.3 no
Path, query string, headers, cookies, bodyNo
Size and timing of requestsYes, which allows traffic analysis

How enterprise firewalls filter HTTPS

  • Without decryption: by destination IP, SNI and, for TLS 1.2, the certificate.
  • With decryption: the firewall acts as a proxy and signs a substitute certificate with an enterprise CA that managed devices trust. Pinned or mutually authenticated applications break and are usually exempted.

HSTS

A Strict-Transport-Security header tells the browser to use HTTPS only for that site for a period, so a later typed http:// link is upgraded before any packet is sent. Preload lists ship that rule in the browser.

Traps

  • Saying HTTPS hides the domain name. The SNI is plaintext without ECH.
How did you do?Book 8.5 Example SystemsBook 9.1 Traditional Applications