by gtklocker · 12y ago · 0 comments
$ curl -I https://www.openssl.org/
HTTP/1.1 200 OK
Date: Sun, 29 Dec 2013 03:57:54 GMT
Server: Apache/2.2.22 (Ubuntu)
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Length: 15686
Content-Type: text/html
[1]: https://en.wikipedia.org/wiki/HTTP_Strict_Transport_SecurityIt's obvious why it can be a grand target for Man in the Middle, defacement and worst of all integrity attacks. Apart from preventing many of the latter, implementing HSTS could have really mitigated the problem. Anyone who had already visited the site wouldn't see the defaced page. Furthermore, they could get added to an STS preloaded list[1], making the attack invisible to anyone using a modern browser.
If you are interested, the Wikipedia page[2] does a fair job at explaining more about why HSTS is needed.
[1]: https://src.chromium.org/viewvc/chrome/trunk/src/net/http/tr...
[2]: https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security...
But this is all crap, really. OpenSSL is a library distributed across tens of thousands of independent providers all over the internet. Nobody needs to get it from the main site, and even if they do, there's a multitude of ways to tell if it's the real deal or not. If you know what OpenSSL is, you can type in "https" and be totally secure without HSTS. Even if you needed HSTS (which you don't), who's going to the OpenSSL.org website time after time that HSTS would even be useful?
People make way too big a deal over half-baked countermeasures that don't apply to every case. You find me the person who's downloading vanilla OpenSSL libraries from the main site over multiple visits and is at risk of a client-side MITM and not verifying their sources, and i'll show you someone who's going to get owned even without a MITM.
Furthermore, it's just embarrassing to see such attacks on these high-profile sites. If they can't defend their site (even for users who don't type "https://"), who is to say their library is secure? These kinds of attacks threaten the confidence we have on our fundamental cryptographic building blocks and should be avoided.