3 ms·
I think that instead of HPKP, the parent poster meant to refer to HSTS. If the attacker MITMs an HTTPS request, then they have to provide a forged certificate
by konklone 11y ago
I think that instead of HPKP, the parent poster meant to refer to HSTS.
If the attacker MITMs an HTTPS request, then they have to provide a forged certificate (whether HSTS is set or not).
If the attacker MITMs an HTTP request which would have normally been redirected (e.g. typing "facebook.com" into the URL bar), then HSTS is required. Without it, no forged certificate required.
HTTPS and HSTS should have just been the baseline the web shipped with, but the web shipped before people thought about these things, and arguably before encryption was stable/secure/fast enough to be practical for the whole web.
I'm very happy that the federal HTTPS-policy includes an HSTS requirement for federal agencies: https://https.cio.gov/ https://https.cio.gov/
- JoshTriplett 11y agoVery good point. However, even if the attacker MITMs an HTTP request that would have been redirected, for a site that didn't use HSTS, they won't get cookies marked "secure", and they won't get permissions that require HTTPS. So the browser mechanism limiting those permissions to HTTPS still works even in that case, though the user and site both have other problems.
- konklone 11y agoThey won't get secure cookies [for the site they're attacking], though they could plausibly redirect the user to a similar-looking HTTPS domain under their control and get permissions requiring a secure origin.
- JoshTriplett 11y agoTrue, but they won't get permissions that the user grants on a site-by-site basis, which also means the attack can't silently happen in the background.