Skip to content

TLS downgrade / MITM

1. Context & stakes

SSL stripping, downgrade and proxy MITM.

TLS protects data in transit, but the jump from an initial cleartext HTTP request to HTTPS is a seam: SSL stripping keeps the victim on HTTP while the attacker speaks HTTPS upstream, and downgrade tricks force weaker parameters. The user sees a working page while credentials cross in the clear. Preloaded HSTS and encrypted-by-default origins remove the stripping window.

2. Theory

TLS protects a session once established, but the bootstrap is attackable on-path: SSL stripping keeps the victim on HTTP by rewriting HTTPS links, downgrade forces weaker versions/ciphers, and a MITM proxy presents a forged certificate. Defences: HSTS (preload), strict validation/pinning and modern TLS that removes downgrade vectors.

3. Attack (PoC)

netlab-tls attack --i-own-this-network --iface veth-host
  1. SSL strip (HTTP<->HTTPS)
  2. Version downgrade, bogus cert

4. Detection

netlab-tls detect --iface veth-host

Indicators to watch, and the associated IDS rule (see netlab-ids).

5. Defense

  • HSTS (preload)
  • Pinning, strict chain validation

6. Exercise

Reproduce in the isolated lab (netns/veth): see lab setup.

7. Further reading