33 ms·
> HTTPS stops MITM except for nation-state attackers. Technically yes, but in practice no. Sure, you can't MITM a running HTTPS connection. But in HTTPS witho
by pimterry 10y ago
> HTTPS stops MITM except for nation-state attackers.
Technically yes, but in practice no.
Sure, you can't MITM a running HTTPS connection. But in HTTPS without HSTS it's easy to transparently stop users getting to HTTPS in the first place, and unless they reliably check the URL bar and verify they have a cert and exactly the right domain then that gives you almost as much damage as a MITM, super easily. We can all agree that users are terrible at constant vigilance, and attacks like this are surprisingly practical.
MITMing HTTPS sites that you browse to directly:
* You type "site-without-hsts.com" into your URL bar.
* Your browser makes an initial plain HTTP request to site-without-hsts.com, and instead of getting an HTTPS redirect I MITM you, and just proxy the plain HTTP to the real HTTPS-only site.
* I see and/or change everything on your 'secure' site. Game over.
301's sort-of protect you here, but a) you don't want to user security to depend on browser caching, b) that doesn't work for the first load of a site, and c) if I'm running a wifi hotspot, it's reasonably easy to get people to clear their caches before you let them log in, since it's a fairly standard technical fix now.
Alternatively, MITMing HTTPS sites reached through some other page:
* You load any plain HTTP page while browsing, on route to a secure site.
* I MITM the plain HTTP, replace 'https' with 'http' in all links in the page, and MITM every subsequent page as above, proxying through to real HTTPS sites where required.
* I see and/or change everything on your 'secure' site. Game over.
Functionally, if you have any insecure step in your browser session, I can stop you reaching the secure step, and if you're not carefully paying attention you won't notice. Sometimes, sure, you might, but most of the time you won't, and 99.9999% of the time your average computer user won't ever check. HTTPS coverage is getting better, but I suspect the vast majority of browsing sessions still go through an insecure step somewhere along the pipeline.
HTTPS doesn't fully protect your users from MITMs. Add HSTS though (so the browser will refuse to ever make a plain HTTP request to your HTTPS site), and you get substantially closer.
- witty_username 10y agoBTW, why can't browsers try HTTPS first and then fallback to HTTP? I agree with you.