Why Your Static Website Needs HTTPS (2018)
troyhunt.com
troyhunt.com
Worse, Cloudflare can inject JavaScript into your site. The default settings will show Captchas to users if CF thinks they are not trustworthy. So you end up with MITM anyway if you aren't careful. For a static site, does a captcha really make sense? Cloudflare makes the internet worse with insane defaults like this.
https://community.cloudflare.com/t/getting-cloudflare-captch... https://www.techrez.com/remove-cloudflare-challange-page/
Takes defaults far more insane than Cloudflare to do worse than the internet status quo.
FWIW I've found more websites that prompt for Cloudflare captcha than I've seen websites offline due to DDoS. I've seen lots of websites offline because they get too popular though. Many websites that I've known were currently under DDoS attack stayed online while I used them (like GitHub using Akamai).
At the risk of Troy writing a blog post proving me wrong... does the average static website need DDoS protection? I'd guess they don't.
Yes, that's the difference between 99.9% and 100%. Cloudflare cited traffic percentages which match what most experienced site operators have seen, with a much higher percentage of malicious activity using Tor than most other networks and no easy way to have per-user reputation (that was the impetus for developing the “Privacy Pass” feature).
Here's what they said at the time, which also has some answers for your question about non-DoS problems:
> On the other hand, anonymity is also something that provides value to online attackers. Based on data across the CloudFlare network, 94% of requests that we see across the Tor network are per se malicious. That doesn’t mean they are visiting controversial content, but instead that they are automated requests designed to harm our customers. A large percentage of the comment spam, vulnerability scanning, ad click fraud, content scraping, and login scanning comes via the Tor network. To give you some sense, based on data from Project Honey Pot, 18% of global email spam, or approximately 6.5 trillion unwanted messages per year, begin with an automated bot harvesting email addresses via the Tor network.
Does it? I know the defaults can be overly sensitive, but I wouldn't call it impossible.
I have my site behind Cloudflare, using it's protections:
> ALPN, server accepted to use h2
> Server certificate:
> subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
> ...
> GET / HTTP/2
> Host: sixteenmm.org
But you won't find any issues streaming the videos on it under Tor. I, and several others, regularly do.
[1] https://support.cloudflare.com/hc/en-us/articles/200170416-E...
Takes 30 seconds with letsencrypt to create your own TLS cert.
If you are suggesting CF do it server side then it's nothing more than snakeoil.
You know very well that's not true, and that kind of exaggeration does Let's Encrypt no favours. I'm sure it doesn't take long when it just works, but when I've used the acme client before on systems with Apache and nginx, it was a complete PITA to get working. I haven't had to use it for a while though, so newer versions of the acme client might well be much better.
> If you are suggesting CF do it server side then it's nothing more than snakeoil
No, I didn't mean that.
What I meant was something simpler than Let's Encrypt, where you didn't need to expose an HTTP endpoint on your server for proof of domain ownership, since Cloudflare already know you control particular domain names and no further validation is needed.
Perhaps they could provide a one-time use GUID, which you'd pass to a simple client on your server, which could then send a CSR containing that GUID to a Cloudflare endpoint, which would in turn sign your CSR.
https://support.cloudflare.com/hc/en-us/articles/11500047950...
Cloudflare are technically competent which is great, but their clients are impossible to assess. I see a lot of formerly insecure local web servers switching over to Cloudflare (and HTTPS), and I know it's the same morons operating the web server. For me the safe default assumption must be that the site behind them is run by people who are not technically competent. I suppose Cloudflare could set a server header indicating the connection between them and the proxied site is HTTPS?
Hello Ryan,
This is something we are definitely considering. I will pass your feedback on to our team. Of course, we need to carefully consider the security implications for the millions of sites using Cloudflare before making this change, as it may have unforeseen consequences. Let me know if there's anything else that I can help with at all!
Best Regards,
1. Privacy matters. A medical website, or indeed Wikipedia, should prevent a snooping ISP from finding out you have been reading about an embarrassing condition. This is similar to the way librarians are extremely protective of their loan records [0]. Netflix use HTTPS for their streams, for the same reason (it does nothing to aid their DRM, it's purely about privacy) [1].
2. HTTPS prevents ads/trackers/malware being injected into the page by unscrupulous ISPs (this really has happened [2])
3. Modern browsers will (rightly) warn users not to trust the site. This makes the site look bad.
4. Some fancy browser features are disabled if you use unencrypted HTTP. Likely irrelevant for a static site though.
5. Let's turn the tables and ask why you wouldn't use HTTPS for a public-facing web server. There are just 3 reasons:
* Reduced admin overhead not having to bother with certs
* It enables caching web proxies, which is only relevant if you're running a serious distribution platform like Steam, or a Linux package-management repo [3]
* Better support for very old devices, such as old smartphones in the developing world
[0] https://www.theguardian.com/us-news/2016/jan/13/us-library-r....
[1] https://arstechnica.com/information-technology/2015/04/it-wa....
[2] https://doesmysiteneedhttps.com/
[3] https://whydoesaptnotusehttps.com/
(Taken from an old comment of mine at https://news.ycombinator.com/item?id=21912817 )
Edit: Added the third reason not to use HTTPS
https://stackoverflow.com/questions/499591/are-https-urls-en...
Of course, your DNS is likely still unencrypted. But maybe one day we'll get there.
* You don't like the Let’s Encrypt Subscriber Agreement, for example the part about indemnification and attorneys' fees.
* Your domain name is on Let's Encrypt blacklist (https://community.letsencrypt.org/t/name-is-blacklisted-on-r..., https://community.letsencrypt.org/t/domain-blacklist/106374), though they now seem to un-blacklist most cases on email request.
I think the problem is that there are little alternatives to LE.
If I see unencrypted HTTP on a website, I immediately think less of that website. It's a Good Thing that the web has got to this point. Quibbles about Let's Encrypt's terms don't strike me as convincing.
> I think the problem is that there are little alternatives to LE.
But there are. Again, there's a whole marketplace of CAs to choose from.
If anything, there are too many CAs trusted by today's browsers.
It is also relevant if you're in an African village, or any other place that has bad/slow internet and children in school can't visit typical websites because they want a fancy separate connection with each of their devices.
Jacob challenges him to "hack [his] static blog". I don't know what 'hacking a website' means to him, but to you and me it probably means compromising the web server, which is not directly related to HTTPS (although I can think of a lot of ways that the use of HTTP could lead to a web server being compromised).
Troy responds by taking him up on this challenge, accuses Jacob of thinking that his site is immune from transport layer risks, and then performs a man in the middle attack on himself using Jacob's site (when in reality literally any HTTP site could have been used).
It's like these two are having completely separate conversations.
And arguably, the fact that nearly any HTTP site could have been used for the demo is partly the point.
CF also allows for self-signed certs: https://blog.cloudflare.com/origin-server-connection-securit... - which are (to me) more complicated than standard certs.
The real game changer in all of this is LetsEncrypt which has become the defacto option for services with huge amounts of custom domains (Shopify, Hubspot, Wordpress) etc.
Not on all shared hosting plans. And migrating from a shared hosting plan can be quite a lot of work, depending on the website.
Also: Getting a LetsEncrypt wildcard cert for Apache on a CentOS 8 VPS is non trivial (for individuals not already familiar with docker) [1]
Use the nginx/apache plugin, or the webroot option. Yes, it won't do *, but on shared hosting, that might even be better.
It seems crazy to me that Microsoft shops are annoyed that the Windows tooling for Let's Encrypt isn't great yet didn't direct that straight at their vendor. What's the point of having that relationship if they don't do what you need? Are you paying them because you hate money?
Microsoft definitely could, if the feedback from customers was there, have shipped an ACME client for IIS in newer IIS releases/ updates. But the feedback from customers is seemingly "More beatings please, and have you thought of increasing prices?"
1. Use CNAME to make different DNS server hierarchy own the ACME proof of control. A CNAME DNS record can be permanently added to your real site, telling Let's Encrypt that it should ask DNS for a different name instead, and only that name needs to be writeable by the periodic renewal process. You can use this to pass DNS challenges for a domain where actual DNS changes take six weeks and a dozen people's signatures, because you only need one change once, not once per renewal. You should find documentation explaining this, or you can ask Let's Encrypt's community site to help if you explain your specific situation.
2. CSR re-use. Certificate Signing Requests don't have timestamps inside them. By default Let's Encrypt's popular Certbot client mints brand new key pairs for every renewal and so it needs fresh CSRs, but you needn't do that. Mint keys once when a server is created, produce a CSR for the certificate you'll want, and then re-use that CSR in a machine which just does the renewal periodically, the actual servers can fetch their renewed certificate from that machine or wherever, the certificate is public so it doesn't matter and the keys haven't changed they just need the renewed certificate for the same keys.
https is easy. point everything DNS everything to cloudyfiare and click Purchase and by clicking Purchase agree to all the terms (but don't actually read any of them.) hand over root access to a program with the word bot in it, and allow it to update itself automatically (what could possibly go wrong.) Everything HTTPS all the time. https://en.wikipedia.org/wiki/DigiNotar
call me skeptical, or the many ( https://slate.com/technology/2020/01/what-to-know-about-the-... https://www.zdnet.com/article/kazakhstan-government-is-now-i... https://en.wikipedia.org/wiki/DNS_over_HTTPS#Criticism ) many reasons Why My Static Website No Longer Exists.
However I’m far more concerned about chrome, and the attitude of so many in the biz that think Firefox should be mothballed.
But in practice over many years of involvement my observation would be that the only thing which matters is Mozilla. At the others such oversight is opaque and whilst opacity might mask a hive of frantic activity it's also what doing nothing would look like from outside such a corporation. But at Mozilla it's done in public, where you can participate if this idea of a "privileged few" bothers you. And so again, I can't prove Microsoft doesn't have loads of smart people dedicated to this problem, but I can tell you that their actions in the period I've been paying attention look exactly how I'd predict from two inputs: Government scale purchases of Microsoft's product platform (driving trust inclusion in Windows for a variety of governments I wouldn't trust to tell me if it's raining let alone in the CA role) and copy-pasting Mozilla decisions.
It is not easy at all. Getting a certificate and putting it into the conf is. Maintaining that certificate, applying the ever growing number of "security" headers, dealing with broken stapling, is anything, but easy.
Let's Encrypt ACME challenge resolved this from now on. However, I'm using a really old machine + OS, and the nginx version I'm running is old enough not to be compatible with it. So, instead of having a hard time updating the server, I decided to migrate the site to a newer machine (even because some AWS technical limitations don't let me migrate to a new instance type).
~10 years ago I slacked in getting an HTTPS certificate as this would have meant a lot of money.
~ Today, I want to use the ACME challenge with Let's Encrypt (no need of OV for a portfolio website), but I never find the time to finish the migration (that should take more 4 to 16 hours).
I personally prefer them even on current systems, as I don't really like the "automagic" nature of certbot.
https://cloud.google.com/load-balancing/docs/ssl-certificate...
In the case of Cloudflare (or any CDN) best practice is to reject requests not from the CDN. Cloudflare doesn’t support AWS S3 compatible storage directly - it won’t make signed requests - but you can write IAM policy that only responds to certain IP.
Troy talks about a tipping point, which was Jan 2017.
Maybe I just don't get Twitter. Every time I look at a thread it starts with some coherent conversation, but then devolves into a bunch of tangents that don't coherently follow each other.
HN and similar seem much better suited.
- It wastes resources.
- It adds complexity.
- You can solve everything HTTPS solves over HTTP!
- It encourages passive destructive behavior.
- Troy Hunt probably has money coming in from certificates somehow.
HTTP/2 and HTTP/3 are also bad.
WebSockets are bad.
As a side note:
Vulkan is bad.
HDMI is bad.
Wakeup people. Time to get off that over-engineering couch and downvote the guy telling the truth again!
Is much of the current tech overengineered? Yes, it definitely is.
HTTPS on it's own - having TLS and a certificate - is not. It never was. But with stapling, CORS, X-XSS, and the rest, it becomes a beast. Those are becoming requirements, and they are making things _very_ complicated.
I hear you, and I tend to agree on many things. Serial ports were gloriously simple whereas USB3 is a nightmare on every level. VGA was beautiful in it's simplicity, HDMI 1.4 with Ethernet included is certainly too much.
mta-sts is probably the worst idea that could have been added to email, by relying on HTTPS requests.
My personal take on this: use all of them responsibly. Use HTTPS, but don't make it exclusive, let the user make the choice: keep HTTP as well. Leave CORS, STS, Referrer Policy, etc out.
Here are a bunch of solutions I use instead of complexity:
I hash with one time server generated salt for login:
I use Comet-Stream for real-time communication over HTTP:
And my latest finding is DPI for video:
Many parts of the world can't deal with TLS1.3 HTTP/2 websites only.
https://caniuse.com/#feat=tls1-3
That may or may not be a fraction of traffic you care about depending on your visitor profiles and security posture but it's not really accurate to say “many parts of the world”.
http://webcache.googleusercontent.com/search?q=cache:hV6m26a...
Indefinitely babysitting letsencrypt is a small price to pay to keep those grannies safe!
There are plenty, I'd say most, websites which do not need HTTPS. And my static website does not need https. It's nice, sure, but it's a personal website and there's no money or personal information involved. Leaving an HTTP version going alongside the HTTPS and Tor hidden service is just fine.
The greater evil is having people run third party code by default on every website from every random domain that's called. Now that's insecure. It's like opening every email attachment you get. Every single "danger" of HTTP he lists is actually a danger of running third party code blindly and automatically.
Maybe something less friendly.
Also, an attack on my end users is an attack on my site. Anytime someone wants to see my content and gets something else, that is bad. If I can significantly raise the difficulty of doing that, why wouldn't I?
Besides, if the security negotiation is to be done in plaintext, then it's trivial for an attacker to MITM a connection, replace the User-Agent headers, and then trick a server into thinking it should serve content insecurely. This is a huge gaping attack vector. It's better to just always serve securely.
Optional security is not just an upgrade; it opens up a downgrade path from more secure to less.
Also encryption is neither security nor privacy.
[0] What do you think of that S?
Someone in a cousin comment made another, maybe better point: URLs get linked and crawled and cached and having them HTTP just normalizes something that was fine in 1995 but isn't fine in 2020.
It's always possible for someone to get proxied like you said, but it's still safer overall if ever seeing "http://" raises eyebrows. There's another front page thread [1] right now about the normalization of deviance.
[0] https://news.ycombinator.com/item?id=22136710 [1] https://news.ycombinator.com/item?id=22144330
Anyway, to directly answer your question there are browsers that can't do all of HTTPS because of false "security" enhancements being pushed for sites that don't need it like restricting the set of TLS versions that are accepted. ref: https://scotthelme.co.uk/legacy-tls-is-on-the-way-out/
For example I was reading Hacker News over HTTP and there is this guy named superkuh saying "Hitler was right".
See, with no execution of code one can completely change a message with no authentication.
OK, so what you're saying here is that HTTP is insecure as long as the browser distributors continue to do something that (you say) is insecure.
Well, I've got news for you. The browser distributors are going to continue to do this.
Also, do you really think it's within reason to expect users to examine all the Javascript that is loaded on a page looking for malicious code before clicking some sort of button to run it?
Other insecure protocols besides HTTP would include Telnet, basic DNS, port 110 POP3, FTP, basic IRC, etc. None of this is controversial or really even arguable.
It absolutely is. In what sense is HTTP anything but an insecure protocol?
HTTP does not prevent man-in-the-middle attacks or content-injection. It does not ensure you are connecting to the domain you think you're connecting to. It does not prevent snooping on transmitted data. If it did, there would have been no reason to invent HTTPS.
> Without that terrible design choice, prioritized because of commerce and the desire to change the web of documents into a surveillance operating system, HTTP would be, and is, just fine
Absolutely not. You do not get privacy without HTTPS. You do not block MITM without HTTPS.
It's obvious that HTTPS should be used for online banking and for software updates, but HTTPS should also be used for ordinary websites, to protect your privacy and to prevent content-tampering (by an unscrupulous ISP, or when using insecure Wi-Fi).
People sometimes give Wikipedia as an example of something that doesn't need HTTPS, but these people clearly haven't spent much time thinking about it. A snooping ISP should not be able to tell whether a customer has been looking up an embarrassing medical condition.
I'm reminded of a lengthy HackerNews discussion on this same topic, a month ago [0].
The only compelling arguments against HTTPS are that old smartphones used in developing countries don't support it, and that it prevents HTTP caches like Squid. Browser defaults regarding JavaScript, certainly have nothing to do with it.
Someone going on Wikipedia tells you relatively little. Knowing which specific pages they've been reading, tells you a great deal more.
HTTPS goes a long way to preventing a snooping ISP from telling which page you visited. A truly committed ISP might still be able to infer it from the traffic patterns, but they'll have a much harder time than with plaintext HTTP.
But far from "the only thing" being page content, almost everything is "kept private" with HTTPS, the request itself including any body provided, and the response to that request.
So while "visiting your request" might well get them their own copy of the content of a particular encyclopedia page you looked at, they're stuck with not knowing what that request was.
And eSNI plus DPRIVE is the final dash to a finish where the ISP doesn't even know which Wikimedia host you visited, assuming they all share the same IP ranges. Italian Wikipedia? Simple English? Wiktionary? Wikivoyage? That's suddenly an ocean of possibilities.
My sites do because I put all of them up as tor hidden services too.
>Browser defaults regarding JavaScript, certainly have nothing to do with it.
They do. Because everything 'insecure' you just described comes from users running code that might be injected. There's no danger from some entity tricking some person into viewing a simple html page.
No, I gave 3 different examples where JavaScript is irrelevant but HTTPS is still important.
* Online banking (HTTPS prevents snooping)
* Software updates (HTTPS ensures you get untouched data)
* Browsing a Wikipedia page about a medical condition (HTTPS prevents snooping)
> There's no danger from some entity tricking some person into viewing a simple html page.
That's not true. Not all browser security flaws involve JavaScript.
Browser flaws aside, it's still important to prevent an attacker from modifying the page to perform a phishing attack (tricking a non-technical person into visiting faceb00k.com, and then capturing their password). Less seriously, HTTPS blocks injection of spam into your page by an ISP.
HTTPS is also important to prevent profiling by unscrupulous ISPs.
alongside:
I remember getting a Vodaphone sim card (I think it was in Belgium or The Netherlands) and seeing their banner displayed on MY WEBSITE! It wasn't in a language I know, and it might have just been a bandwidth warning or something to indicate I need to reload, but it was still on my website, injected right in there.
HTTP is needed for static sites, if you want to ensure your readers see the exact same site that you made.
I set up redirect and HSTS asap.
If your ISP does this, or if you are on a sketchy network somewhere, then maybe you should not use it at all. Get a new ISP, or use a VPN if you are that worried. If the webmaster is not sharing sensitive information on his casually maintained static website, then that is good enough reason not to use HTTPS. I know it sounds... uncaring.
It is true ordinary people, who don't understand the risks could get MITM'd and never suspect a thing. For some reason I still don't care enough to put HTTPS on my shitty old flash game website. I just can't be bothered. I think that is good enough of a reason. Blame should go on the ISP who are MITM'ing their customers.
Don't trust random sim cards you buy off of the street either.