This part of the series on traffic diversion and the man in the middle follows the evil twin and the wireless path, and comes before NTLM explained. Like relay, does not divert packets by itself. It rides a diversion that another method already made (a poisoned , a , an evil twin) and turns the position in the middle into readable traffic. It does that without breaking any cryptography: Transport Layer Security (TLS), which people still call SSL after its predecessor (see why we say SSL when we mean TLS), is never attacked, because the victim is kept from ever starting it. The answer the web adopted is HTTP Strict Transport Security (). The header itself, its directives and the mistakes that disable it are explained in HSTS and HTTPS enforcement; this part looks at the attack HSTS was written for, at the exact rules in 6797 that defeat it, at what remains open, and at the layers built since. After reading, you can recognize a stripped exchange, explain which rule stops it and why, and judge whether a site is protected on a user's first visit.

The step that was never encrypted

Most people do not type https://. They type a name, follow a link or press a bookmark, and the browser's first request goes out over plain HTTP; the site answers with a redirect to HTTPS, and only then does TLS begin. Moxie Marlinspike put the observation at the centre of his talk at DC in 2009: "Nobody types https:// (or http:// for that matter)", and "People generally encounter SSL in only two ways: Clicking on links. Through 302's", so "people only encounter SSL through HTTP" (Moxie Marlinspike, New Tricks for Defeating SSL in Practice, Black Hat DC 2009). His earlier tool, sslsniff, had attacked the TLS connection itself with forged certificates, and browsers had answered by making certificate errors frightening: in his words, a "negative feedback system" of warnings, against which "If we trigger the negative feedback, we're screwed. If we fail to trigger the positive feedback, it's not so bad" (same source). So the second tool, sslstrip, attacked the HTTP connection instead.

The technique, as his slides set it out, is a rewriting proxy in the middle of a plaintext conversation (same source):

  • watch the HTTP traffic; change every https:// link in a page to http://, and every redirect Location: https://... to http://..., keeping a map of what was changed;
  • when the victim requests one of the stripped addresses over HTTP, fetch it from the real server over HTTPS, so that "The server never knows the difference. Everything looks secure on their end", while "The client doesn't display any of the disastrous warnings";
  • remove what would give the game away: the Secure flag on cookies, compressed encodings that are hard to rewrite, and caching headers that would let the browser skip the rewritten pages;
  • serve a padlock as the favicon of stripped pages, to restore the "positive feedback" users look for;
  • and, so as to capture logins rather than session cookies, expire the sessions of new visitors so they have to log in again.

The slides report the result of running it: in 24 hours, "117 email accounts", "16 credit card numbers", "7 paypal logins" and "Over 300 other miscellaneous secure logins", with the number of people who balked given as zero (same source). Marlinspike's conclusion was the sentence the rest of this part answers: "Lots of times the security of HTTPS comes down to the security of HTTP, and HTTP is not secure" (same source).

A stripped exchange, written out

The example is a shop at shop.example that serves its site over HTTPS and redirects plain HTTP to it. A user on a network where an attacker already holds the path (any of the earlier parts of this series) types shop.example into the address bar.

What should happen. The browser sends the plaintext request; the server redirects:

GET / HTTP/1.1
Host: shop.example

HTTP/1.1 301 Moved Permanently
Location: https://shop.example/

The browser follows the redirect, opens a TLS connection to shop.example, checks the certificate, and everything after that is encrypted. The server's pages, its login form (<form action="https://shop.example/login">) and its session cookie (Set-Cookie: sid=...; Secure; HttpOnly) all travel inside TLS.

What the stripping proxy does instead. It forwards the first request, receives the 301, and does not pass it on. It follows the redirect itself, over HTTPS, and returns the page to the browser over plain HTTP with the secure references rewritten:

HTTP/1.1 200 OK
Content-Type: text/html
Set-Cookie: sid=...; HttpOnly

...<form action="http://shop.example/login" method="post">...

Two edits matter. The form's action now says http://, so the password the user types goes to the proxy in plaintext, and the proxy relays it to the real server over HTTPS. The Secure attribute is gone from the cookie, so the browser will send it back over plain HTTP. The Secure attribute exists precisely to stop that: "When a cookie has the Secure attribute, the user agent will include the cookie in an HTTP request only if the request is transmitted over a secure channel" (RFC 6265, section 4.1.2.5). It protects only the cookie's confidentiality, and the same section warns that "An active network attacker can overwrite Secure cookies from an insecure channel" (same source). Cookie security flags covers the attribute in detail.

From the server's side the session is an ordinary HTTPS session. From the browser's side it is an ordinary HTTP site, with an http:// address and nothing to warn about. The only visible difference is the absence of a padlock, and the 2009 slides show that a favicon could fake even that. That is the whole attack. What a defender can see on the wire is the same as what the user cannot: an HTTP session that continues for a site the network's users normally reach over HTTPS, and a login posted in plaintext.

What HSTS changes

HSTS was standardized in RFC 6797 in November 2012 by Jeff Hodges of PayPal, Collin Jackson of Carnegie Mellon University and Adam Barth of Google, building on ForceHTTPS, the proposal Jackson and Barth published at the World Wide Web Conference in 2008 (RFC 6797). Its threat model names this series' attackers: "A determined attacker can mount an active attack, either by impersonating a user's DNS server or, in a wireless network, by spoofing network frames or offering a similarly named evil twin access point" (section 2.3.1.2). It cites the passive attacker too, naming Firesheep, "a web browser extension" that obtains "other local users' session cookies for various web applications" (section 2.3.1.1).

The defence is not in the server's redirect, which an attacker in the middle can suppress, but in the browser. Three rules do the work.

The browser rewrites the request before it is sent. When the browser prepares to load any http address, "including when following HTTP redirects", it checks whether the host is a Known HSTS Host, and if it is, "before proceeding with the load: The UA MUST replace the URI scheme with 'https'", converting an explicit port 80 to 443 (RFC 6797, section 8.3). For a browser that knows shop.example as an HSTS host, the request in the example above never exists. The user types shop.example, the browser rewrites it to https://shop.example/ internally, and the first packet on the wire is a TLS ClientHello. There is no plaintext page for the proxy to rewrite, no form action to change, no cookie to strip.

The policy can only be learnt over a secure connection. A server "MUST NOT include the STS header field in HTTP responses conveyed over non-secure transport" (section 7.2), and "If an HTTP response is received over insecure transport, the UA MUST ignore any present STS header field(s)" (section 8.1). The attacker in the middle can therefore neither delete the policy for a site (it never sees the HTTPS response that set it) nor plant a false one.

There is no clicking through. If the connection to an HSTS host fails because of a certificate error or any other TLS warning, the failure "should be done with 'no user recourse'": the user "should not be presented with a dialog giving her the option to proceed", because "allowing user recourse such as 'clicking through warning/error dialogs', is a recipe for a attack" (section 12.1). This closes the other door, the one sslsniff used: a forged certificate for an HSTS host produces an error page, not a question.

The comparison with interception that the user has agreed to is instructive. A corporate proxy that inspects TLS, described in SSL forward proxy interception, presents certificates signed by a root the organization has installed on its own devices, so validation succeeds and HSTS has nothing to object to. HSTS does not judge who holds a trusted root; it makes the browser insist on one. The certificate checks themselves are in certificate validation.

The first visit, and the list that removes it

RFC 6797 is frank about its gap, and gives it a name: the "Bootstrap MITM Vulnerability", which arises when "the user manually enters, or follows a link, to an unknown HSTS Host using an 'http' URI rather than an 'https' URI", so that "such an initial interaction is vulnerable to various attacks" (RFC 6797, section 14.6). A browser that has never received the header over HTTPS does not know the host is an HSTS host, and a stripping proxy present at that first visit can make sure it never does. HSTS as a header is trust on first use, like the enterprise certificates of the previous part: it protects every visit except the one where the attacker was already there.

The RFC itself proposed the cure: "An HSTS pre-loaded list is a facility whereby web site administrators can have UAs pre-configured with HSTS Policy for their site(s) by the UA (s) ... in a manner similar to how root certificates are embedded in browsers 'at the factory'" (section 12.3). Chrome maintains such a list, and its submission site says that "Other major browsers (Firefox, Safari, IE 11 and Edge) also have HSTS preload lists based on the Chrome list"; it also notes that browsers which now upgrade every navigation to HTTPS on their own make preloading matter mainly "when these upgrades fail in the presence of an active attacker" (hstspreload.org). The same site sets the conditions a domain must meet: serve a valid certificate; redirect from HTTP to HTTPS on the same host; serve all subdomains over HTTPS; and send, on the base domain, a header with a max-age of "at least 31536000 seconds (1 year)", with includeSubDomains and the preload directive (hstspreload.org). It warns that preloading "applies to all subdomains, including internal subdomains that are not publicly accessible", that entries "can take several months before they reach the stable version", that removal "tends to be slow and painful", and that tools offering HSTS should "not include the preload directive by default" (same source).

The list is a file in Chromium's source, and it can be counted. The copy read for this part, from the main branch on 23 November 2026, holds 95,544 entries, every one of them with the mode force-https (Chromium source, net/http/transport_security_state_static.json). Its own header explains the categories, and their sizes show how the list grew:

Policy, as the file defines itEntries on 23 November 2026
bulk-1-year: "bulk entries with max-age >= 1 year (after Chrome 63)"85,502
public-suffix-requested: domains under a public suffix preloaded at the request of its owner, such as a top-level domain registry4,954
bulk-18-weeks: "bulk entries with max-age >= 18 weeks (Chrome 50-63)"4,315
custom: "entries without includeSubdomains or with HPKP"394
bulk-legacy: "bulk entries preloaded before Chrome 50"215
google: "Google-owned sites"105
public-suffix: public suffixes, such as top-level domains, "preloaded at the owner's request"59

The last row is the strongest form of the defence. Fifty-three of the entries are whole top-level domains, among them .dev, .app, .page, .bank and .insurance, so that every name registered under them is HTTPS-only in the browser from the day it is registered, with no header and no first visit (same source). A registry that preloads its whole zone removes the bootstrap problem for all its customers at once.

The other lesson of the list is that the header is easy to get wrong. Michael Kranch and Joseph Bonneau, studying deployment for the Network and Distributed System Security Symposium in 2015, found that "The majority of sites we observed trying to set an HSTS header did so with basic errors that significantly undermine the security this feature is meant to provide", and that "A substantial portion of HSTS domains and nearly all pinned domains leaked cookie values, including login cookies, due to the poorly-understood interaction between HTTP cookies and the same-origin policy" (Kranch and Bonneau, Upgrading HTTPS in Mid-Air, NDSS 2015). The configuration mistakes are catalogued in HSTS and HTTPS enforcement.

Where HSTS still leaves a gap

  • The first visit without preloading, described above.
  • Subdomains without includeSubDomains. A policy for shop.example that omits the directive leaves www.shop.example and every other name below it unprotected, and a cookie scoped to the parent domain can be sent to one of them over plain HTTP; that is the leak Kranch and Bonneau measured.
  • Clocks. The policy expires max-age seconds after it was last seen, so it depends on the client's clock. RFC 6797 notes that "Active network attacks can subvert network time protocols (such as the Network Time Protocol ()) -- making HSTS less effective against clients that trust NTP or lack a real time clock", and leaves the problem out of scope (RFC 6797, section 14.7). Jose Selvi demonstrated it at Black Hat Europe in 2014, using forged NTP answers to move a victim's clock forward until stored policies expired, and reported that, at the time, preloaded entries in Chrome carried a 1,000-day policy rather than a permanent one and could be affected too, while Safari held them as static values (Jose Selvi, Bypassing HTTP Strict Transport Security, Black Hat Europe 2014). That describes the browsers of 2014; the defence it points to is authenticated time, and the history of NTP is in the NTP family history.
  • IP addresses and non-browsers. HSTS applies to domain names; the RFC's matching step finds "no match with any Known HSTS Host" for an address written as an IP literal (section 8.3). And it is a browser policy: an application, an update client or a script that speaks HTTP has its own rules.
  • Trusted roots. HSTS insists on a valid certificate; it does not decide which roots are valid. An attacker who can get a root installed, or a certificate mis-issued, is outside its scope, and RFC 6797 itself describes the combination of a phished root certificate and DNS cache poisoning (section 14.8).

Beyond HSTS: HTTPS by default

Three newer mechanisms sit beside HSTS, and the browsers have started to make the whole question unnecessary.

HTTPS records in the DNS. RFC 9460 of November 2023 defines the , and its section on HSTS says that "An HTTPS RR directs the client to communicate with this host only over a secure transport, similar to HSTS"; before making an http request, the client "SHOULD perform a lookup" and, if a compatible record exists, behave as if it had received a 307 redirect to the https address (RFC 9460, section 9.5). The same section sets the limit: "Because HTTPS RRs are received over an often-insecure channel (DNS), clients MUST NOT place any more trust in this signal than if they had received a 307 (Temporary Redirect) response over cleartext HTTP" (same source). An attacker who controls the victim's resolver, as in the rogue DHCP part, can remove the record, unless the answer is protected by (see DNSSEC records in dig).

upgrade-insecure-requests. A W3C Candidate Recommendation of October 2015, edited by Mike West of Google, lets a page tell the browser "to upgrade a priori insecure resource requests to secure transport before fetching them" (W3C, Upgrade Insecure Requests). It fixes a site's own mixed references, not the first navigation, and the specification says so: it "does not deprecate, replace, or in any way reduce the value of the Strict-Transport-Security HTTP response header", which authors "should continue to use ... to ensure that their users are not subject to SSL stripping downgrade attacks" (section 8.2).

HTTPS-only modes. Browsers now try HTTPS first for every site. Firefox 83, released on 17 November 2020, introduced , which "ensures that every connection Firefox makes to the web is secure and alerts you when a secure connection is not available" (Mozilla, Firefox 83.0 release notes). Chrome launched its equivalent, "Always Use Secure Connections", as an opt-in in 2022; on 28 October 2025 its security team announced that it would turn on the variant for public sites by default with Chrome 154 "in October 2026", so that Chrome "will ask for the user's permission before the first access to any public site without HTTPS", and gave the reason in terms this part would recognize: "many plaintext HTTP connections today are entirely invisible to users, as HTTP sites may immediately redirect to HTTPS sites" (Google Online Security Blog, HTTPS by default, 28 October 2025). Chromium's guidance for site owners, read on 23 November 2026, still describes the change as one that "Chrome will start" in version 154, says that "if a site has HSTS configured, Chrome does not try to fall back to HTTP", and that "HSTS takes precedence over Chrome's automatic HTTPS upgrades and Ask-before-HTTP warnings"; enterprises can allow-list HTTP sites by policy (Chromium, Adapting your website for Chrome's Ask-before-HTTP warning). The Chromium schedule lists Chrome 154's stable date as 22 September 2026 (ChromiumDash, milestone 154). Chrome's own release notes, read on 23 November 2026, show that the default has shipped: those for Chrome 154 list "Ask before HTTP on by default", under which "Chrome prompts users by default when they connect to a site over an insecure (http) connection" (Google, Chrome 154 release notes), and the Chrome Enterprise release notes, last published on 18 November 2026, give the change as Chrome 154 on Windows, macOS and Linux and Chrome 155 on Android, while their entry on the setting itself names Chrome 155 for every platform (Google, Chrome Enterprise release notes, Chrome 155).

These modes change stripping from an invisible attack to a visible one. A browser that tries HTTPS first never sends the plaintext request the proxy needs, unless the attacker also blocks HTTPS; and then the browser warns before falling back, which is exactly the "negative feedback" Marlinspike's design set out to avoid. HSTS remains the stronger promise because it allows no fallback at all, which is why both Google and the W3C ask sites to keep sending it.

Google's own figures show how much plaintext is left. The share of Chrome page loads over HTTPS climbed from "around 30-45% in 2015" to "the 95-99% range"; excluding private addresses such as routers and intranet names, Linux rose from 84 per cent to nearly 97, Windows from 95 to 98, and Android and Mac to over 99 (Google Online Security Blog, 28 October 2025). The remaining few per cent are, as the 2009 slides predicted, mostly the first request before a redirect.

What it looks like on the wire

  • Plaintext where there should be none. For a site the organization's users normally reach over HTTPS, an HTTP session that carries pages, form posts or cookies, rather than a single redirect, is the signature of stripping.
  • Cookies without Secure. A Set-Cookie for a known session cookie arriving over HTTP without the Secure attribute that the real site sets.
  • Rewritten references. Pages delivered over HTTP whose forms and links point to http:// addresses that the real site serves as https://.
  • Certificate errors that users report. With HSTS and HTTPS-first modes, the attack mostly fails loudly; a cluster of certificate or "site does not support a secure connection" reports from one network is worth investigating.

The Brazilian angle

Brazil's place in the preload list can be counted from the same file. Of the 95,544 entries on 23 November 2026, 948 are under .br, 885 of them under .com.br (Chromium source, transport_security_state_static.json, read 23 November 2026). The federal government's domain, gov.br, is not on the list as a whole, and six of its subdomains are: defesa.gov.br, agricultura.gov.br, agro.gov.br, inmet.gov.br, mda.gov.br and mpa.gov.br (same source); the list's public status interface confirms that gov.br itself is not preloaded (hstspreload.org, status for gov.br, read 23 November 2026).

The comparison with .bank is the instructive one. The Comitê Gestor da Internet no Brasil () created .b.br in its resolution of 28 November 2008 as a category "reserved exclusively for financial institutions" (our translation; the original reads destinado exclusivamente às instituições financeiras), among the categories "with mandatory DNSSEC" (com obrigatoriedade da extensão DNSSEC) (CGI.br, Resolução CGI.br/RES/2008/008/P, 28 November 2008). DNSSEC protects the answer to "what is this name's address", which defeats the forged resolver of the earlier parts. It does not tell a browser to refuse plaintext. The .bank top-level domain is preloaded as a whole, so every bank under it is HTTPS-only in Chrome before any visit; .b.br is not on the list, as a public suffix or otherwise (same Chromium source; hstspreload.org, status for b.br, read 23 November 2026). Whether the registry or the banks have considered preloading the zone is not established by the sources read for this part. 's advice to the public, in its 2017 networks booklet, asked users on public networks to "make sure you use a secure connection and check whether the details of the digital certificate match those of the institution" (CERT.br, Fascículo Redes, edition kept by NIC.br); HSTS and preloading are how a site makes that check automatic, so that it no longer depends on the user.

What defenders can do

  • Serve every page over HTTPS, redirect HTTP to HTTPS on the same host, and send HSTS with a long max-age and includeSubDomains once every subdomain can serve HTTPS.
  • Preload the domain when the organization is ready to commit to HTTPS for every subdomain, knowing that removal is slow; registries and owners of whole zones can preload the zone.
  • Mark session cookies Secure and scope them narrowly, so that no subdomain without HSTS can receive them.
  • Publish HTTPS records and sign the zone with DNSSEC, so the DNS signal cannot simply be removed.
  • On managed browsers, enable HTTPS-only or HTTPS-first modes by policy, and keep the allow-list of plaintext sites short and reviewed.
  • Use authenticated time sources on clients where the threat model includes attackers on the local network.
  • Treat a plaintext login on a network as an incident, whatever the site, because it means either a stripped session or a site that should not exist in that form.

What to remember

  • SSL stripping attacks the HTTP that precedes HTTPS: links and redirects that the man in the middle rewrites, so TLS never starts on the victim's side.
  • HSTS moves the defence into the browser: it rewrites http to https before sending, learns policies only over HTTPS, and allows no clicking through errors.
  • The header protects every visit but the first; the preload list, and whole preloaded top-level domains, protect the first visit too.
  • includeSubDomains and Secure cookies close the side doors; clocks, IP literals and non-browser clients remain outside HSTS.
  • HTTPS records, upgrade-insecure-requests and HTTPS-first browser modes add layers, and turn stripping from silent to visible; HSTS still takes precedence.
  • In Brazil, .b.br requires DNSSEC but is not HSTS-preloaded, unlike .bank; gov.br is preloaded only for six subdomains.

Sources