SSL Stripping Attacks

You're at a coffee shop. You type your bank's URL into the browser. Everything looks normal — the page loads, you log in. But someone on the same network just read your password in plain text. That's SSL stripping.

Moxie Marlinspike demonstrated SSL stripping at Black Hat DC in 2009. In just 24 hours of running the tool on a Tor exit node, he captured hundreds of credentials for Yahoo, Gmail, Hotmail, PayPal, LinkedIn, and Facebook. The attack remains viable on networks without proper HSTS enforcement.

How SSL Stripping Actually Works

The core idea is deceptively simple. When you type "bank.com" into your browser, the first request goes out over plain HTTP — not HTTPS. Normally, the bank's server responds with a redirect: "Hey, come back over HTTPS instead." Your browser follows the redirect and everything is encrypted from that point on.

An SSL stripping attacker sits between you and the server (a man-in-the-middle position). They intercept that initial HTTP request, follow the HTTPS redirect themselves, and then serve you the page over plain HTTP. You get the real content from your bank — but none of it is encrypted on your side of the connection.

The attacker sees everything. Every keystroke, every password, every session cookie.

The attack flow looks like this:

Your Browser HTTP request
Attacker (MitM) Intercepts & strips
Real Server HTTPS connection

The key detail: the connection between the attacker and the real server is fully encrypted over HTTPS. The server has no idea anything is wrong. It's only your side — the link between your browser and the attacker — that's been stripped down to unencrypted HTTP.

Why You Won't Notice It Happening

Most people don't actively check for the padlock icon in their browser's address bar. And even if they did, some SSL stripping tools go further:

Marlinspike's original tool, sslstrip, even replaced HTTPS links within the page content so that subsequent navigation stayed on HTTP. Every link you clicked kept you in the unencrypted channel.

Where SSL Stripping Happens

This attack requires the attacker to be in a man-in-the-middle position. Practically, that means:

Can HSTS Prevent SSL Stripping?

HTTP Strict Transport Security (HSTS) is the primary defense against SSL stripping. When a server sends an HSTS header, it tells the browser: "For the next X seconds, only connect to me over HTTPS. Don't even try HTTP."

# HSTS header example
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

This works well — after the first visit. And that's the problem.

HSTS has a "first visit problem." The very first time you visit a site, your browser doesn't know it should use HTTPS. That first request goes over HTTP, and that's the window an attacker needs. One request is all it takes.

Gaps in HSTS protection

Even with HSTS deployed, there are edge cases:

Honestly, HSTS alone isn't enough. It's a critical piece of the puzzle, but it leaves real gaps that attackers actively exploit.

How PhishClean Detects HTTPS Downgrades

PhishClean's HTTPS Downgrade Alert is one of its 15 detection signals. It works differently from HSTS because it monitors the actual behavior of your browser session rather than relying on server-side headers.

Here's what it checks:

All of this runs locally in your browser. No data is sent anywhere. PhishClean doesn't need to know which sites you visit — it just watches for the patterns that indicate something has gone wrong with the encryption.

Protecting Yourself Beyond HSTS

Related Threats

Phishing Attacks

SSL stripping is often combined with phishing to harvest credentials on fake pages.

Hidden iFrame Attacks

Invisible iframes can load HTTP content inside HTTPS pages, bypassing encryption.

Formjacking

Injected scripts that steal form data — another attack that targets unencrypted connections.

PhishClean vs Safe Browsing

Chrome's blocklist doesn't detect HTTPS downgrades. See the full comparison.

Frequently Asked Questions

Is HTTPS enough to prevent SSL stripping?

HTTPS alone doesn't prevent SSL stripping because the attack happens before HTTPS is established. The attacker intercepts the initial HTTP request and prevents the upgrade. HSTS helps, but only after your first visit to a site. A browser-level detection tool like PhishClean catches downgrades that HSTS misses.

Does a VPN prevent SSL stripping?

On public WiFi, yes — a VPN encrypts all traffic between your device and the VPN server, so local attackers can't intercept your HTTP requests. But a VPN doesn't protect against compromises beyond the VPN endpoint, or against malicious content injected by the destination server itself.

Can HSTS completely stop SSL stripping attacks?

HSTS significantly reduces the risk but has real gaps: the first-visit problem (your browser doesn't know about HSTS until it visits the site once over HTTPS), expired policies, missing subdomain coverage, and cleared browser data. The HSTS preload list covers major sites, but most of the web isn't on it.

Detect HTTPS Downgrades Automatically

PhishClean monitors every page for encryption issues — locally, in real time. 3-day free trial, no credit card required.

Install PhishClean