News for hackers. Stuff that matters.
Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by CountSessine on Sunday June 28, 2020 @03:20PM (#23671311)
What would it say?

“You’re connecting to an IoT device that has a worthless certificate. Would you like me to open up a completely pointless AES256 session with it and pretend that you have a secure connection?”

Just use HTTP.

Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by elcritch on Sunday June 28, 2020 @05:56PM (#23672402)
The identity isn’t trustworthy, but as mentioned below their are ways to handle that with device id’s. Also it’s not pointless to encrypt communication with a device you’ve verified the identity of in the past. It prevents hijackers from later hijacking the device, without The user knowing it. Just the same as the nastygram you get when your ssh server changes its private key.

You’re effectively claiming SSH is pointless and/or useless encryption as it doesn’t use certificate chains to verify url/domain. Your argument is the same as saying that any devops ssh’ing into a new local server is pointless and they should just use telenet.

Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by drdaeman on Sunday June 28, 2020 @04:27PM (#23671778)
(Disclaimer: I'm not a security expert).

Ideally, I think, something like this: "You're trying to connect to a new device on your local network. To ensure the security please check that the device has a display or a printed label that says 'HTTPS certificate ID: correct horse battery staple couple more random words'?" (mobile devices may suggest to scan a QR code instead).

I'm pretty sure if at least one major browser vendor would implement something like this (denoted by a special OID on the certificate), IoT vendors would be happy to follow. Verifying a phrase or scanning a code is not a big burden, and it resolves trust issues.

The fingerprint could be either from a private key generated on device (for devices that have a display and can display dynamic content) or from vendor's self-signed "CA" with special critical restrictions (no trust for any signatures unless individually verified + signed certs are only valid on what clients consider to be a local network) which private keys are not on the device itself (for devices with printed labels, to avoid having the same private key on all devices).

Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by CountSessine on Sunday June 28, 2020 @07:07PM (#23672757)
It certainly sounds a lot better than simply asking browser vendors to give .local a pass on cert validity.

I’m still wary of any flow that would have browser users “accepting” a device as secure - could I impersonate that device on the local network? Could I convince someone to accept a site on the wider internet as their IoT device? Someone smarter than me needs to think hard about these questions.

Maybe another approach would be to build infrastructure (like protocols and client software) to make building a home cert chain easy? A windows client that would let you create a root cert, install it in your cert store, and then give you server certs to hand out to devices? Give it a consumer friendly brand name or something and get IoT vendors to add a front-and-centre option to adopt a new server cert.

Authentication isn’t a tricky problem; it’s the trickiest.

Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by elcritch on Sunday June 28, 2020 @10:40PM (#23673873)
> I’m still wary of any flow that would have browser users “accepting” a device as secure -

It’s about accepting that communication with the device is secure, not guaranteeing that the device itself is secure. In reality you don’t know if your bank’s servers are secure or if they encrypt passwords properly, etc, but you do know it’s them and your communication isn’t tampered with.

> could I impersonate that device on the local network?

Not readily with a device specific id check and TOFU (trust on first use) similar to SSH. If the device certificate was stored permanently for .local urls like `my-device-23ed.local`, then anyone who tried intercepting or MITM’img that device would have the user receive a message "warning device identity has changed, please check your device is secure ... etc " warning.

Not having any browser support .local certificate or identity "pinning" means that anyone who compromised your network (WiFi psk hacking anyone?) can impersonate a device you’d not know it. Browsers forget self-signed certs regularly, if they let you "pin" the certificate at all. A hacker can intercept the .local url (trivial) and use another self-signed cert. the user’s only real option is to blindly accept it whenever it happens. Then an intruder can MITM the connection to the device all they want. Is your router’s config page really your router? Who knows.

> Could I convince someone to accept a site on the wider internet as their IoT device? Someone smarter than me needs to think hard about these questions.

Any `.local` domain isn’t allowed to have a normal cert or global dns name. They could trick them on first use, but again with a device specific ID on first use it’d make that harder to do. After trust-on-first-use any access afterword wouldn’t be able to be tricked without a explicit warning to the user about changing device identity and that something funny might be happening.

If browsers implemented entering a device specific code as part of the "do you accept this device" on first use, that’d make it a much more usable and secure pattern. It’d standardize the pattern and encourage IoT shops do setup the device id checking properly.

To impersonate a device using .local certificate/identity pinning, a hacker would need physical access to the device to get it’s device id code, then hi-Jack the mdns request with the correct device specific .local address (on first use!), then setup a permanent MITM in order to impersonate a device. Otherwise the user would get a warning. Possible but serious resources required. With physical access you can modify hardware, possibly install a false cert on the user machine, etc, so security in that scenario would be largely compromised already.

Perhaps some IoT devices use custom apps and certificates but many just use http, or self-signed https. In my experience, IoT device makers have little experience with something like creating a CA. Getting users to install it would be a headache. Time is money on those projects and having an entire factory down because they can’t figure out how to install a certificate chain on Windows 7, well, most users will complain loudly. Currently IoT is full on IT-installing-certificate-chains, or no security at all. Many go with none at all therefore.

Therefore the current status quo with browser certificates on .local domains encourages far more security gaps and effectively makes it difficult for non-internet connected device to Operate securely without a fairly expensive and complicated IT setup.

Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by elcritch on Sunday June 28, 2020 @05:41PM (#23672296)
I like this idea, as we already add a device serial ID to the ap hosted mode, partly for this reason. Chromecast’s show a random code and users seem to be able to handle this fine.
Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by ithkuil on Sunday June 28, 2020 @05:45PM (#23672327)
That works fine with a brand new device you just unboxed. But what should happen 3 years later? Should the IoT device have a certificate that is valid forever?
Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by paledot on Sunday June 28, 2020 @06:05PM (#23672454)
I would say yes, as long as certificates are unique per-device. The harm of my light bulb's cert being compromised is less than the harm of my light bulb no longer working if the manufacturer's CA goes offline and it can't renew its cert.
Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by filmor on Sunday June 28, 2020 @03:51PM (#23671540)
HTTP traffic would be unencrypted, so everyone (esp. on Wifi) could record passwords etc. flying around. With HTTPS, you at least need to MITM the connection to do that. If you establish trust in some other way (cert ID printed on the device?), the connection is secure.
Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by riskable on Sunday June 28, 2020 @04:28PM (#23671783)
Not just intercept: Using HTTPS prevents messing with the connection in-flight. So an attacker won't be able to inject their own payload into that web page you just requested.
Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by CountSessine on Sunday June 28, 2020 @06:26PM (#23672571)
Except you’re using garbage certificates so anyone could MITM you and inject whatever they like.
Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by bavell on Sunday June 28, 2020 @07:34PM (#23672892)
In what way are self-signed certs garbage? They're essentially the same as ssh certs.
Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by samus on Sunday June 28, 2020 @10:50PM (#23673916)
That's a separate kind of attack, not intrinsic to the protocol. If the keypair got leaked or a CA misbehaves and issues multiple certificates that can be used for a host, then yes, it can happen.
Re:Chromium and Mozilla to enforce 1 year validity for TLS c... by Ayesh on Sunday June 28, 2020 @11:06PM (#23673988)
It's like calling someone you don't know, but over a secure line.