SSL Stripping

A man-in-the-middle technique that downgrades secure HTTPS connections to unencrypted HTTP, exposing sensitive data in transit.

SSL stripping is a man-in-the-middle attack technique that exploits the transition between unencrypted HTTP and encrypted HTTPS connections. When a user navigates to a website by typing its address without "https://" or follows an HTTP link, the server typically responds with a redirect to the HTTPS version. An attacker positioned between the user and server intercepts this redirect, establishes an HTTPS connection with the legitimate server, but serves an unencrypted HTTP version to the victim. The user believes they are on the real site while all their traffic passes through the attacker in plain text.

The attack works because most users do not explicitly type "https://" when visiting websites and rarely check whether the connection is encrypted. The attacker maintains two separate connections: an encrypted HTTPS connection to the legitimate server (appearing as a normal user) and an unencrypted HTTP connection to the victim. All data — login credentials, personal information, financial details — passes through the attacker's system in readable form. Advanced SSL stripping tools can even modify page content to remove visual security indicators and replace HTTPS links with HTTP equivalents throughout the page.

SSL stripping was first demonstrated by researcher Moxie Marlinspike in 2009 and prompted the development of HTTP Strict Transport Security (HSTS). HSTS instructs browsers to always connect via HTTPS to a given domain, effectively preventing the HTTP-to-HTTPS transition that SSL stripping exploits. When combined with HSTS preload lists (where domains are hardcoded into browsers as HTTPS-only), the protection is comprehensive. However, sites that have not implemented HSTS remain vulnerable, and first-time visits to non-preloaded sites can still be intercepted.

Examples

  • An attacker on a public Wi-Fi network intercepts a user's connection to a banking site, stripping the HTTPS redirect and capturing login credentials.
  • A malicious proxy strips SSL from all connections passing through it, capturing form submissions across multiple websites.
  • An attacker uses a tool like sslstrip to downgrade a victim's webmail connection from HTTPS to HTTP, reading all email contents.

Prevention

  • Implement HTTP Strict Transport Security (HSTS) headers with a long max-age and include subdomains.
  • Submit your domain to the HSTS preload list for hardcoded HTTPS enforcement in browsers.
  • Use a VPN on untrusted networks to encrypt all traffic regardless of the application-layer protocol.
  • Train users to look for the HTTPS padlock icon and be suspicious if it is missing on sensitive sites.

Try These Tools

Security Headers Checker

Related Terms

Man-in-the-Middle Attack Session Hijacking DNS Spoofing

Stay Protected with Beacky

Detect phishing clones of your website in real-time with invisible beacon technology.

Get Started with Beacky