News for hackers. Stuff that matters.
Re:Still Why No HTTPS? by dm33tri on Tuesday December 17, 2019 @08:14AM (#21813105)
Why do browsers punish non-verified certs much harder than no-cert?

If I want to quickly host my page and use encryption, then I have go through all that hustle to make it work. Perhaps allow use of self-signed certificates on same level as http instead of blocking my website.

Re:Still Why No HTTPS? by cesarb on Tuesday December 17, 2019 @08:55AM (#21813410)
Since there's no way to distinguish a non-verified (self-signed or not) certificate from an attack, browsers have to treat them identically to an attack (otherwise an attacker would simply pretend to be a non-verified certificate, to get the more lenient treatment).

On the other hand, a no-cert (unencrypted) connection can be distinguished from an attack on an encrypted connection: the browser knows a priori (through the protocol in the URL) that the connection is supposed to be unencrypted.

Re:Still Why No HTTPS? by lucideer on Tuesday December 17, 2019 @09:47AM (#21813919)
I think the point here is that there's also no way to distinguish a http request from an attack.

It's fair enough to an argue that a self-signed cert could be an attack, but so could any http request.

> a no-cert (unencrypted) connection can be distinguished from an attack on an encrypted connection: the browser knows a priori (through the protocol in the URL) that the connection is supposed to be unencrypted.

I don't understand how that allows one to distinguish it from an attack. Knowing that a connection is supposed to be unencrypted is just equivalent to knowing that a connection could be under attack.

Re:Still Why No HTTPS? by knome on Tuesday December 17, 2019 @10:00AM (#21814049)
Rightly punishing the connection for having the trappings of security when it actually lacks it doesn't mean we need to punish openly insecure traffic. End users have been told time and again that http is insecure, and so it's fine to leave it. End users should also be able to trust that https means secure without having to distinguish between secure and secure unless I'm being mitm'd and needing to understand what any of that means.
Re:Still Why No HTTPS? by lucideer on Tuesday December 17, 2019 @03:09PM (#21818178)
To echo @mrob's comment (not sure why they've been downvoted), relying on user-understanding of HTTP -vs- HTTPS is considered a failed experiment, and actively discouraged. Chrome in particular are moving to bring this into the browser UI by marking HTTP sites as insecure (rather than relying on users understanding that HTTPS is secure, which they don't).
Re:Still Why No HTTPS? by mrob on Tuesday December 17, 2019 @12:35PM (#21816080)
Most end users have no idea what HTTPS is. They've just been (incorrectly) taught that the padlock means it's secure. Disable the padlock for self-signed HTTPS, and disable the CA-signed HTTPS-only features, and it becomes strictly better than HTTP.
Re:Still Why No HTTPS? by namibj on Wednesday December 18, 2019 @06:00AM (#21823719)
Especially because there is no way to MITM a connection with perfect-forward-secrecy only if it ends up serving a self-signed certificate, because the connection first negotiates an ephemeral key with which everything, including the certificate, will be encrypted.

This means that with eSNI and at least one CA-signed cert on the IP, any attacker runs the risk of having to spoof the CA-signed certificate.

Re:Still Why No HTTPS? by zozbot234 on Wednesday December 18, 2019 @06:12AM (#21823776)
A sophisticated attacker might know that you were going to connect to a self-signed site, though. Interestingly though, private DNS (DoH, etc.) might help further shroud this fact from the attacker.

All in all, I'd say that the browser should still throw up a full-page warning because of the implications of TOFU, but it can be one where the "continue to site" option is clearly shown even to a naïve user, and not hidden behind a spoiler.

Re:Still Why No HTTPS? by namibj on Wednesday December 18, 2019 @11:24AM (#21826425)
Then maybe fall back to DANE and thus restrict this to zones signed with more than 1024bit RSA?
Re:Still Why No HTTPS? by yencabulator on Tuesday December 17, 2019 @11:21AM (#21815075)
The http version can't access secure cookies; https with the wrong cert can use the secure cookies of the real https site.
Re:Still Why No HTTPS? by mrob on Tuesday December 17, 2019 @12:06PM (#21815654)
So disable secure cookies by default for self-signed certs. The scary warnings can be shown when the user tries to enable them.
Re:Still Why No HTTPS? by ivanbakel on Tuesday December 17, 2019 @02:29PM (#21817665)
In other words, "open users up to social engineering attacks to make my web-dev life easier".
Re:Still Why No HTTPS? by lucideer on Tuesday December 17, 2019 @03:07PM (#21818158)
You misinterpreted the above commenter. The suggestion is to disallow self-signed contexts access cookies set in authoritative contexts.
Re:Still Why No HTTPS? by ivanbakel on Tuesday December 17, 2019 @04:07PM (#21818844)
I don't see that as the biggest problem. If we repeat what was said in the above comment:

> ...disable secure cookies ... for self-signed certs. ... the user ... enable[s] them.

So you make a self-signed cert for your website which needs secure login, and you tell your users to turn on secure cookies so that you can safely store their credentials in the browser. Then your website gets MITM'ed with another self-signed cert, which either

  1. can access the same cookies, because the domain is the same
  2. can't, because the cert is different
But in the second case, you've already conditioned users to log in to your website with the cert being self-signed, so they'll just log in again. If the browser complains that the attacker's cert isn't the same as the old cert, or makes the user re-enable secure cookies with a warning, then the user has been conditioned to do that too - and an extra message of "we changed the cert, ignore your security warnings" will convince lots of users with doubts.
Re:Still Why No HTTPS? by lucideer on Tuesday December 17, 2019 @06:24PM (#21820115)
The convoluted and unlikely scenario you describe is currently possible with HTTP and non-secure cookies (the website admin is setting the cookies and can choose to define them as secure or not).

Using a self-signed cert. isn't secure. What's being discussed is whether it's worse than HTTP. It isn't.

Re:Still Why No HTTPS? by ivanbakel on Tuesday December 17, 2019 @06:47PM (#21820320)
Browsers now try to detect and warn about credential forms which are submitted over HTTP. Any website admin who tries to convince users to ignore security warnings about HTTP is somewhere between seriously negligent and evil.

>What's being discussed is whether it's worse than HTTP. It isn't.

I disagree. The self-signed cert approach tries to carry with it the trappings of proper HTTPS, but it results in a bigger attack surface. Every additional bit of complexity that can be added to describing the "safe browsing experience" to the end user is an additional chink in the public armour. This is why I originally called it "open users up to social engineering attacks to make my web-dev life easier".

Since the self-signed cert is not secure, admins should have no reason not to simply use HTTP. In fact, this is where the discussion has gotten to now: self-signed certs can't even do safe login. What makes the self-signed cert worse is that for some reason people are insisting on using it anyways.

Re:Still Why No HTTPS? by ridiculous_fish on Tuesday December 17, 2019 @03:21PM (#21818333)
A known phishing message in gmail gets a red banner. An expired cert gets a full page block and buries the actual page link. It does seem disproportionate.
Re:Still Why No HTTPS? by earthboundkid on Tuesday December 17, 2019 @01:23PM (#21816749)
Yes, also the browser can know if a site should be HTTPS through a https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/St... header, which can be preloaded in some browsers.
Re:Still Why No HTTPS? by UI_at_80x24 on Tuesday December 17, 2019 @09:09AM (#21813533)
>go through all that hustle....

I manage 100+ servers, hosting a significantly larger number of domains, on a variety of linux and FreeBSD operating systems. Under both Apache & Nginx. "..all of that hustle.." to initially setup is under 2 minutes with LetsEncrypt. The renewal (via a cron job) is completely out-of-sight/out-of-mind.

The execution is shockingly simple. If you think it's "all that hassle" I guarantee you haven't even tried.

Re:Still Why No HTTPS? by zamadatix on Tuesday December 17, 2019 @10:27AM (#21814406)
You're a professional plumber working on hundreds of households saying it's shockingly simple and should take no time at all for a first time home owner to fix their own plumbing. You've already got the knowledge, experience, and tools/parts in the van - of course you don't think it's a hassle!
Re:Still Why No HTTPS? by zzzcpan on Tuesday December 17, 2019 @10:51AM (#21814702)
And he's not even right. There is no hassle only if you take plenty of risk and rely on a random crappy acme client to do it well, its dependencies to always work, disks, OSes, servers not failing, acme protocol not changing and not deprecating anything.

Otherwise you need some infrastructure: logging, monitoring, some way to manage upgrades, backups, testing recovery, oh and those private keys are better not be leaked anywhere, so you need encryption for backups, which brings key management and so on.

Re:Still Why No HTTPS? by allset_ on Tuesday December 17, 2019 @12:16PM (#21815784)
Everything in your comment has to do with general server maintenance, and is not specific to automating certificate renewal with certbot or a similar tool which is what is being discussed. Adding HTTPS to your site and setting up automatic renewal is literally three steps on an Ubuntu system and you can copy and paste it from the certbot documentation [1].

[1] https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx

Re:Still Why No HTTPS? by zzzcpan on Tuesday December 17, 2019 @12:34PM (#21816056)
Dealing with certificates is more critical than "general server maintenance", things people often neglect doing suddenly become required. It might take from a few months to even a couple of years to get from neglected infrastructure to infrastructure ready for reliable automated issuance of certificates.

I actually evaluated a bunch of acme clients, wasn't satisfied with the code of any of them and wrote my own. But even from those I looked at certbot was always the worst choice, it's ridiculous letsencrypt is promoting it, better choices were POSIX shell clients or statically linked clients, like those written in Go and other compiled languages.

Re:Still Why No HTTPS? by comboy on Tuesday December 17, 2019 @02:16PM (#21817497)
It sounds like you are super critical about any potential security issues (because what else could it be, other than that it just works or it doesn't). If given machine security is super important (oh it's running a web server..), then why not just run certbot elsewhere and sync the files in a manner that satisfies your security needs?
Re:Still Why No HTTPS? by giancarlostoro on Tuesday December 17, 2019 @10:34AM (#21814491)
To be reasonably fair Lets Encrypt makes it easy. I even have a $5 a year shared hosting account that gives me Lets Encrypt SSL certs through cpanel. I can't imagine this feature is unique only to this one random shared hosting provider.
Re:Still Why No HTTPS? by fishtacos on Tuesday December 17, 2019 @10:59AM (#21814789)
Your $5 instance with cPanel management isn't really quite the same as someone manually managing 100 servers hosting these services on disparate configurations and environments. In other words, what your tooling of choice automates in a specific situation doesn't necessarily apply to any one else's usage, and scalability-wise, would be even more detached.
Re:Still Why No HTTPS? by giancarlostoro on Tuesday December 17, 2019 @11:07AM (#21814885)
Certbot works with multiple configurations and servers / Operating Systems:

https://certbot.eff.org/

I wouldn't be surprised if that's how he's managing 100 servers, or something similar.

Re:Still Why No HTTPS? by UI_at_80x24 on Tuesday December 17, 2019 @11:14AM (#21814986)
Yes, Certbot.

I suppose I could have made that known in my post.

Re:Still Why No HTTPS? by rumanator on Tuesday December 17, 2019 @12:45PM (#21816212)
> Your $5 instance with cPanel management isn't really quite the same as someone manually managing 100 servers hosting these services on disparate configurations and environments.

Actually, it is. Some reverse proxies such as Traefik handle TLS certs automatically. You practically need to explicitly not want to do it.

Re:Still Why No HTTPS? by ben_jones on Tuesday December 17, 2019 @01:49PM (#21817110)
Extended with: "and all his customers are based in a country with strong plumbing standards and regulatory guidelines" - rendering his advice less valid for every country which doesn't.

A practical example I ran into lately, we had a small system run on GKE and Google Cloud Loadbalancer and struggled to automate the certificate renewal process. Because the cluster/project was for an internal tool this automation was given a low priority and we still have to "manually" swap a certificate every few months (and if we forget to we get an angry slack DM).

TLDR; there are still many combinations of networked services that still do not ~easily~ support certificate automation, even ones you expect really should by now.

Re:Still Why No HTTPS? by fortran77 on Tuesday December 17, 2019 @10:45AM (#21814629)
I find LetsEncrypt to be a hassle. About 1/3 of the time the auto-renew doesn't renew because some python dependency changed, etc.
Re:Still Why No HTTPS? by certera on Tuesday December 17, 2019 @11:56AM (#21815512)
I found this to be a problem too and created Certera (shameless plug). It helps simplify a lot of things and fixes some of the pain points of the typical ACME clients.

https://docs.certera.io

Re:Still Why No HTTPS? by giancarlostoro on Tuesday December 17, 2019 @11:39AM (#21815298)
There's more than just Certbot out there:

https://letsencrypt.org/docs/client-options/

Re:Still Why No HTTPS? by ansible on Tuesday December 17, 2019 @11:07AM (#21814882)
We've recently switched to a scheme where we run a Nginx reverse-proxy with LetsEncrypt. Everything is in docker containers.

Based on this:

https://medium.com/@pentacent/nginx-and-lets-encrypt-with-do...

Now, in our setup, everything is running on a different port, so it is easy to set up additional services all coming from the same hostname with the same IP address.

Re:Still Why No HTTPS? by rconti on Tuesday December 17, 2019 @01:56PM (#21817230)
If you think this is "shockingly simple", I'd like to hear from you again in 10 years as your environment has grown, as your number of operating systems explodes, as you have to deal with restrictive network policies, as LetsEncrypt has been replaced a few times with new up-and-coming latest-and-greatest solutions, as bugs have been found, as clocks have skewed, as domain ownership rules have changed, as domain ownership verification policies have changed a half dozen times...

If you think something is set-it-and-forget-it, you haven't been around long enough.

Re:Still Why No HTTPS? by gambler on Tuesday December 17, 2019 @12:55PM (#21816360)
>The execution is shockingly simple.

Only if you're blindly running shell commands the effects of which you don't understand.

Re:Still Why No HTTPS? by amaranth on Tuesday December 17, 2019 @05:37PM (#21819719)
Have you audited the source code of everything running on your computer? If not then you've had to trust that people aren't being evil or that someone is doing that checking for you. Why is this any different?
Re:Still Why No HTTPS? by couchand on Tuesday December 17, 2019 @08:21AM (#21813145)
One reason that comes to mind immediately: self-signed certificates offer no protection against MITM attacks. It's worse than without a cert, since it gives a false sense of security.
Re:Still Why No HTTPS? by dm33tri on Tuesday December 17, 2019 @08:30AM (#21813221)
You can't assume protection, whereas with http you assume no protection.

So, if you can't trust certificate (not when it is invalid), just show same level of protection as http.

Re:Still Why No HTTPS? by zozbot234 on Tuesday December 17, 2019 @08:36AM (#21813265)
The problem is that a http: protocol specifier implies no protection; the moment you follow the link, you know that the connection is not secured. Whereas a self-signed https: connection could be due to someone MITM'ing a site that generally uses CA's, in which case "no warning message" implies that the site is secured. The browser message has to make it clear to the user that something possibly unexpected is going on.
Re:Still Why No HTTPS? by JackRabbitSlim on Tuesday December 17, 2019 @02:05PM (#21817347)
Which CAs have never been subject to a National Security letter? Can't say cuz you can't know? Lets talk about that false sense of security indeed.
Re:Still Why No HTTPS? by daxelrod on Tuesday December 17, 2019 @03:02PM (#21818103)
This is one of the threats addressed by https://www.certificate-transparency.org/ .

If a CA issues a rogue cert and _does_ add it to the CT log, it's discoverable, at least in retrospect.

If a CA issues a rogue cert and _doesn't_ add it to the log, some browsers will refuse the connection when presented with that cert. https://www.agwa.name/blog/post/how_will_certificate_transpa... has more details about Chrome's implementation.

Re:Still Why No HTTPS? by arminiusreturns on Tuesday December 17, 2019 @02:37PM (#21817758)
Yep, for years when everyone was talking about NSL's and other corporate strong-arming by the gov, I started saying I suspect most major CA's are compromised. At least you know your threat model though, because only the nation states are going to have that.

CA's and DNS are two parts of the internet that have become way too centralized in my opinion.

Re:Still Why No HTTPS? by zozbot234 on Tuesday December 17, 2019 @08:23AM (#21813165)
Do they? IME, they just ask you if you want to trust the self-signed certificate and allow you to optionally store that "trust" indefinitely, ending up with something like Trust On First Use. The warnings have to be scary initially because the security model is so radically different from the usual case of CA's; specifically, getting that "first use" validation correct is critically important.
Re:Still Why No HTTPS? by dm33tri on Tuesday December 17, 2019 @08:33AM (#21813242)
They show big red error and prompt to continue is hidden under spoiler. Also XHR requests just cut off, it's painful when developing and testing.
Re:Still Why No HTTPS? by zozbot234 on Tuesday December 17, 2019 @08:40AM (#21813295)
Well, a XHR cannot programmatically decide whether a self-signed cert should be trusted. Perhaps browsers should pop up a warning bar in such cases, explaining that some site functionality is being blocked for security reasons. Clicking it would take the user to the big scary warning page, where they would be allowed to indicate that they trust the self-signed cert (permanently or not) and reload the original page.
Re:Still Why No HTTPS? by namibj on Tuesday December 17, 2019 @09:21AM (#21813647)
The XHR api could allow specifying a trust root and/or cert-pinning though.
Re:Still Why No HTTPS? by necovek on Tuesday December 17, 2019 @03:30PM (#21818436)
How do you imagine this to work? XHR caller and XHR endpoint are both coming from untrusted sources at that point — if you allow either side to define a trust root, you are fully opening up to MITM attacks.

For development purposes, I imagine the approach akin to cross-origin support in browsers for loopback networks might work (i.e. don't enforce checks on them).

Re:Still Why No HTTPS? by namibj on Wednesday December 18, 2019 @06:09AM (#21823759)
Well, the caller is already allowed to run code. Allowing it to use TLS with cert-pinning doesn't make that any less secure.
Re:Still Why No HTTPS? by necovek on Wednesday December 18, 2019 @09:30AM (#21825156)
I apologise, I still don't understand your claims.

Without previous proof that the calling code was not eg. modified in-flight (eg. over HTTP or over HTTPS without a valid certificate), allowing it to use TLS and to either modify the trust root or pin a new certificate would severely reduce the security of the communication, and would be completely against what HTTPS is designed to solve in the first place (mainly MITM snooping and attacks).

And if there is a "previous proof" of genuinity (eg. by serving through properly encrypted HTTPS), what the benefit is to allowing those clients to pin certs? I.e. they'll still need the existing "proper" HTTPS for all the other first time visitors (and return visitors using new browsers/OSes/devices)?

Re:Still Why No HTTPS? by namibj on Wednesday December 18, 2019 @11:52AM (#21826763)
Don't worry.

I don't mean we should allow the fetch API to mess with the browsers trust configuration. It should only allow a temporary override of trust rules, similar to DANE TLSA-RRs, but provided by JavaScript instead of DNSSEC-verified DNS lookups.

Imagine e.g. combining this with an SPA bootloader contained in a data-url (like a bookmarklet), which the user scans via a QR-code or receives via text-based messaging.

CORS would still be in-play, and maybe the insecure nature of the caller is communicated to the API.

The benefit of this pinning would be e.g. allowing direct communication with IoT hardware, or even just prevention passive content analysis.

You could talk to IPs directly and still use TLS without weird wildcards like *.deviceid.servicedevices.com where the dns just has these zone entries:

  deviceid.servicedevices.com  DNAME  has-a.name
, but that's ugly and leaks the device's IP through a DNS lookup.
Re:Still Why No HTTPS? by necovek on Thursday December 19, 2019 @12:59AM (#21832345)
Ah, enabling TLS for access using only an IP address is a great point, thanks.
Re:Still Why No HTTPS? by edoceo on Tuesday December 17, 2019 @10:18AM (#21814273)
It already does, put your self-CA in the browser trust store.
Re:Still Why No HTTPS? by gmiller123456 on Tuesday December 17, 2019 @02:37PM (#21817761)
The "trust this site" can be disabled, and usually is by many corporate policies. Additionally they use words like "unsafe" and "not trusted", but never use those words, nor big red screens, to warm against plain HTTP requests.
Re:Still Why No HTTPS? by JoshTriplett on Tuesday December 17, 2019 @12:06PM (#21815650)
> Why do browsers punish non-verified certs much harder than no-cert?

Because it's taking time to build enough acceptance to flag http as insecure, whereas bad https connections that can't guarantee the expected security properties have been flagged as insecure from the beginning.

At this point, though, modern browsers show http sites as various flavors of "not secure" in the address bar, and limit what those sites can do. Browsers will increase the restrictions on insecure http over time, and hopefully get to the point where insecure http outside the local network gets treated much like bad https.

Re:Still Why No HTTPS? by heydabop on Tuesday December 17, 2019 @08:49AM (#21813368)
> then I have go through all that hustle to make it work

So like 3-5 minutes of work with Let's Encrypt?

Re:Still Why No HTTPS? by notatoad on Tuesday December 17, 2019 @12:52PM (#21816319)
because warning fatigue is real and http usage is too high to put scary warnings on all those sites.

Chrome's eventual goal is to mark all not-secure pages as not-secure: https://www.chromium.org/Home/chromium-security/marking-http...

Re:Still Why No HTTPS? by umvi on Tuesday December 17, 2019 @01:33PM (#21816903)
> because warning fatigue is real

"HTTP is known to cause cancer in the state of California"

Re:Still Why No HTTPS? by Thorrez on Wednesday December 18, 2019 @01:31AM (#21822378)
A non-verified cert can steal Secure cookies, no-cert cannot.