News for hackers. Stuff that matters.
Re:A quick look at the Ikea Trådfri lighting platform by bsamuels on Saturday April 08, 2017 @10:22PM (#14070137)
I dont get everyones gripe about the lack of HTTPS as long as there's firmware signing.

HTTPS as a protocol ages extremely fast, trust anchors always change, and there's no guarantee that today's state of the art won't be completely incompatible with TLS implementations in 5 years.

For HTTPS to work properly on an embedded device, it needs to have an up to date OpenSSL library and updated certificate anchors. These are always packed as part of the firmware image itself, so any update to certificate anchors or OpenSSL would require an entire new image to be deployed.

This isn't a problem for websites because updating is usually as simple as apt-get upgrade, but this is a massive problem for embedded devices because publishing a new firmware image usually means pumping a few hundred hours of QA time into the image, then back and forthing with your manufacturer to get them to use the new image on newly minted units.

This isn't even considering the changes in OpenSSL over time. Many older routers simply cannot use HTTPS for updates because newer versions of OpenSSL simply won't fit on the flash.

Then there's the question of how end-of-life will be handled. People often use products long after they've gone EOL. You have to ask yourself what happens when someone plugs in a lighting unit that has an old firmware version on it, and the unit can't communicate with the update server because the product was EOL'd 5 years ago. There won't be a transition firmware for such an old product, and the people who know how to roll the firmware images probably don't even work there any more. That user is now SOL unless you have a method for manually updating firmware.

Re:A quick look at the Ikea Trådfri lighting platform by iancarroll on Saturday April 08, 2017 @11:03PM (#14070219)
> HTTPS as a protocol ages extremely fast

You do not need to frequently upgrade TLS versions to be secure. TLSv1.2 will likely be fine for many years and TLSv1.1 has been fine for 11 years. If you do need to upgrade, it won't be often, but the QA is the only hard part.

> trust anchors always change

Indeed an issue, especially with the public PKI, but you can roll your own root certificate with a lifespan of 50 years or something. This is somewhat dangerous as there's now a non-expiring trust anchor instead of the usual 1-3 year key rotation, but it's still practical, especially if HTTPS is only a layer of protection around your already signed firmware.

> there's no guarantee that today's state of the art won't be completely incompatible with TLS implementations in 5 years

Well, TLS is designed to negotiate the version to avoid this exact issue, but even if TLSv1.x is not backwards compatible there is nothing blocking the update server from supporting the older version?

> Many older routers simply cannot use HTTPS for updates because newer versions of OpenSSL simply won't fit on the flash.

OpenSSL is far from the only implementation here. BearSSL is only 25KB and there are even microcontrollers with their own TLS stack built into hardware, like the CC3220 from TI, which I've been using at my job. There are concerns there too with updating TLS, but again, should be a relatively rare concern.

> the people who know how to roll the firmware images probably don't even work there any more

Indeed another issue. But realistically, yes, IoT devices are going to have a finite lifetime if they depend on cloud services.

Re:A quick look at the Ikea Trådfri lighting platform by josteink on Sunday April 09, 2017 @04:53AM (#14071213)
> You do not need to frequently upgrade TLS versions to be secure. TLSv1.2 will likely be fine for many years and TLSv1.1 has been fine for 11 years

Famous last words.

I'm also in favor of keeping IOT devices as simple as possible. In that regard, dropping HTTPS is a no-brainer (as long as some verification is done through other means).

I'm making a bet that anyone here who religiously advocates HTTPS on embedded devices never have tried it in practice and over time.

Re:A quick look at the Ikea Trådfri lighting platform by johnp_ on Sunday April 09, 2017 @06:01AM (#14071445)
There's a TLS 1.2 Long Term Support draft in the works, specifically for those devices with "multi-year or even decade-long update cycles":

https://tools.ietf.org/html/draft-gutmann-tls-lts-07

Re:A quick look at the Ikea Trådfri lighting platform by josteink on Sunday April 09, 2017 @07:22AM (#14071728)
It only takes a single incident like Heartbleed, Shellshock, Backblaze or whatever to render a formerly assumed secured component or protocol insecure.

And if you're building something on a platform where you can't rely on the ability to upgrade past the latest SSL security vulnerability in the future, you effectively can't count on HTTPS to provide the security you need for the lifetime of the device. That means you'll have to implement additional means of securing your data anyway, so what value does HTTPS provide in those cases?

In some cases the library affected may now instead provide a security risk in itself, which you wouldn't have had you only gone with plain HTTP. So it can be argued that deploying HTTPS in environments where the ability to perform updates are limited is a security risk in itself and should be avoided at all cost.

So if you're going to have to implement your own security anyway, why bother with all the additional work, complexity and security-risks using HTTPS involves? Especially considering you probably won't gain anything out of it, except more work.

Counter to popular HN religion, HTTPS everywhere is actually not always going to represent a security benefit.

In lots of cases, plain HTTP just makes sense.

Edit: Not to mention the increase in complexity brought you by HTTPS effectively means you now need to provide more updates for your devices, or leave them vulnerable and hope nobody notices.

Basically, blindly applying HTTPS where it doesn't provide value, now just increased the cost for companies w.r.t. maintaining their devices in the future. If a company sees increased per-device-lifetime-costs associated with updates, guess how many companies will then decide on limiting the number of models they are willing to provide updates for, labelling older models "obsolete"?

All in all, HTTPS in cases like this represent a negative value proposition both for the companies and the customers.

Re:A quick look at the Ikea Trådfri lighting platform by caf on Sunday April 09, 2017 @07:43AM (#14071794)
In some cases the library affected may now instead provide a security risk in itself, which you wouldn't have had you only gone with plain HTTP.

This cuts both ways though - maybe your package parsing and signature verification code has a security flaw in it, in which case you'll find yourself wishing you had the protection of only trying to parse packages from the HTTPS-verified legitimate source.

So the answer to the question posed earlier, "...so what value does HTTPS provide in those cases?" is that it avoids have a single point of failure in your security architecture.

It's also worth pointing out that most of those protocol-level TLS vulnerabilities mentioned wouldn't have been exploitable in the far more restricted setting of "device that phones home to check for updates".

Re:A quick look at the Ikea Trådfri lighting platform by johnp_ on Sunday April 09, 2017 @01:01PM (#14073207)
> It only takes a single incident like Heartbleed, Shellshock, Backblaze or whatever to render a formerly assumed secured component or protocol insecure.

Yes, just as your firmware verification and update mechanism and every other interface your device provides to the outside world. That's just a general argument against feature creep.

> [...] so what value does HTTPS provide in those cases?

Defense in Depth.

> [...] provide a security risk in itself [...]

Just like any other component. I'd argue that a slimmed down , globally deployed implementation of a several decades battle-tested protocol has a lower security risk than some vendor specific, device specific, single-developer self-designed integrity and authenticity scheme.

Overall, if your IoT device handles any potentially confidential user data at all you already need a TLS stack, so enabling it for the firmware update mechanism doesn't add any more of an attack surface.

If you only ever need authenticity and integrity HTTP is already more complex than necessary and you'd be better served with a simpler protocol. (e.g. CoAP)

Re:A quick look at the Ikea Trådfri lighting platform by toast0 on Sunday April 09, 2017 @02:24PM (#14073618)
> I'd argue that a slimmed down , globally deployed implementation of a several decades battle-tested protocol has a lower security risk than some vendor specific, device specific, single-developer self-designed integrity and authenticity scheme.

Is there a TLS client library released in April 2007 or earlier you are comfortable running today?

Is there a data signature checking library released in April 2007 or earlier you are comfortable running today? Note that OpenSSL didn't support TLS 1.1 or 1.2 until OpenSSL 1.0.1 release march 2012

My guess is that if you took the signature checks from an OpenSSL build from 2007, they're either still fine today if you used them separate from the TLS stack, or they're broken enough that you can easily bypass certificate authentication. From a brief look at the openssl vulnerability list, it's also likely that there's a certificate handling bug that you could exploit to bypass the checks anyway.

HTTP may be more complex than necessary, but it travels through firewalls with pretty good ease, and it's not that complex if you speak HTTP 1.0 without transfer-encoding, and only need to understand response headers enough to discard them. HTTP 0.9 is even easier, but some transparent proxies have trouble finding the destination server, so the Host header available in HTTP 1.0 is helpful to ensure requests can be routed. The MVP HTTP 1.0 client is:

   int where = 0;
   char rnrn[4] = "\r\n\r\n";
   int c;
   fprintf(fd, "GET %s HTTP/1.0\r\nHost: %s\r\n\r\n", url, host);
   shutdown (SHUT_WR, fd);
   while (c = read(fd, buf, 1)) {
     if (!c) { return -1; } // bad server
     if (buf[0] == where[0]) {
        ++where;
        if (where == 4) {
           break;
        }
     } else {
        where = 0;
     }
   }
   // here comes the data
   // be sure to have a reasonable sized buffer
   // and stop reading when its full
   // check the signature before you process the data
That's not really that complex (I didn't test the code, it's an illustration). You could also abort without checking the signature if the server sends data beyond your buffer, but the signature check should fail anyway. You could look for a content-length header as well, but header parsing is some amount of work.
Re:A quick look at the Ikea Trådfri lighting platform by cybergibbons on Monday April 10, 2017 @05:02AM (#14076989)
Specifically, in the case of the firmware running on the Trådfri gateway, it already supports TLS.
Re:A quick look at the Ikea Trådfri lighting platform by tinus_hn on Sunday April 09, 2017 @09:00AM (#14072061)
Yeah, https may be insecure in 5 years so we better use http and be insecure from the start. Never mind that https likely is insecure only in rather esoteric scenarios that cannot occur when you're only downloading firmware upgrades.
Re:A quick look at the Ikea Trådfri lighting platform by kuschku on Sunday April 09, 2017 @06:05AM (#14071462)
11 years.

What do I do in 20 years? 30?

Will all my tech just break?

People are still using furniture and lamps from their great-grandparents.

Do we have to become a society producing so much garbage?

Re:A quick look at the Ikea Trådfri lighting platform by p49k on Sunday April 09, 2017 @09:01AM (#14072071)
Well, the device can auto-update - this just means that it would need to be plugged in within 11 years of manufacture in order to be able to receive firmware updates, not that it would break after 11 years.

And reastically, the server could even eliminate that requirement by supporting old protocols just for the updating old firmware.

Re:A quick look at the Ikea Trådfri lighting platform by collinmanderson on Tuesday April 11, 2017 @12:26PM (#14089636)
Basically, anything hooked up to the internet needs to be updated over time to stay secure (whether it's patching security holes, new protocols, or using new methods of security.)

Don't buy products that hook up to the internet if you want them to last 20 years, unless you're sure the manufacturer will continue to update it. (Don't buy anything with a non-standard battery either.)

Re:A quick look at the Ikea Trådfri lighting platform by yunolisten on Sunday April 09, 2017 @04:02AM (#14071038)
> BearSSL is only 25KB and there are even microcontrollers

Thank you, came here to mention this. So many people seem to think that OpenSSL is the ONLY tool to be used.

Re:A quick look at the Ikea Trådfri lighting platform by dchest on Sunday April 09, 2017 @04:46AM (#14071195)
BearSSL is my favourite crypto software of 2016, however it's still in alpha stages of development and is not production ready, Ikea couldn't use it for this product: https://www.bearssl.org/todo.html
Re:A quick look at the Ikea Trådfri lighting platform by simcop2387 on Sunday April 09, 2017 @02:11AM (#14070757)
> Indeed an issue, especially with the public PKI, but you can roll your own root certificate with a lifespan of 50 years or something. This is somewhat dangerous as there's now a non-expiring trust anchor instead of the usual 1-3 year key rotation, but it's still practical, especially if HTTPS is only a layer of protection around your already signed firmware.

As you say this is dangerous but it's not as obvious how dangerous. To work with this trust anchor and keep it secur e you've now got a lot of physical and software security you now have to deal with for the next 50 years even if you stop supporting a given device. Since if anyone gets a hold of that root certificate they can all the sudden pretend to be you to everyone continuing to use your devices and you've now got a massive PR issue, if not legal liability. It's not an easy problem to deal with.

Re:A quick look at the Ikea Trådfri lighting platform by mjg59 on Sunday April 09, 2017 @02:18AM (#14070781)
Isn't the same true of whatever signing certificate you're using to provide signed images? You'd still need to either control DNS or be able to interfere with traffic to do anything.
Re:A quick look at the Ikea Trådfri lighting platform by omgtehlion on Sunday April 09, 2017 @03:02AM (#14070880)
The difference is: to sign images your private key do not need to leave your build farm (or single build machine) and when you discontinue the product, you just wipe the server, keeping already built (and signed) images.

But to serve updates via https you have to constantly keep the certifcate on internet-facing servers.

Re:A quick look at the Ikea Trådfri lighting platform by slau on Sunday April 09, 2017 @03:49AM (#14071000)
You can generate your own CA certificate, and then use that to generate SSL certificates.

Typical organisations who need their own CA will create a root CA with a 20 to 30 year lifetime. This CA is then used to sign a sub-CA (sometimes called Principal CA, or Issuance CA), with a lifetime of 5-10 years.

The sub-CA is then used to sign a TLS cert, with a lifetime of 1-2 years.

This means that you only trust the root CA. Whether the TLS certificate gets compromised or not is irrelevant and completely besides the point, because the CA doesn't get compromised, and can revoke the compromised certificates.

I can go into detail about a few banks and governments whose CA I setup. Especially the smart card/PIN code distribution to unlock the root CA and sub-CAs was fun.

Re:A quick look at the Ikea Trådfri lighting platform by samat on Sunday April 09, 2017 @05:26AM (#14071305)
This comment screams KISS
Re:A quick look at the Ikea Trådfri lighting platform by lorenzhs on Sunday April 09, 2017 @06:03AM (#14071455)
This is not at all complicated to implement.
Re:A quick look at the Ikea Trådfri lighting platform by mjg59 on Sunday April 09, 2017 @03:28AM (#14070946)
They're using Cloudflare as their frontend, and if they're broken we're basically so fucked anyway I don't think lights are going to be our biggest concern
Re:A quick look at the Ikea Trådfri lighting platform by Nexxxeh on Sunday April 09, 2017 @09:04AM (#14072084)
Might be, if the lights are in YOUR house. If one's bathroom and hallway lights gets hijacked or disabled remotely, it becomes an immediate safety issue if you're in that bathroom in the middle of the night.

Also are there any protections against cycling them quickly (or really slowly, depending on how you look at it) to trigger seizures? Didn't someone recently get done for sending a seizure-inducing gif to an epileptic?

Re:A quick look at the Ikea Trådfri lighting platform by uxp on Sunday April 09, 2017 @09:19AM (#14072136)
We're getting into the territory of "Guns don't kill people, people kill people with guns".

If someone has Epilepsy this might be a concern, but as the story around the gif sent to Kurt Eichenwald, which you reference, points out gifs don't hurt people, assholes do. It's not IKEA's responsibility to ensure that every product they sell cannot be used in any destructive manner. People have to take responsibility for purchasing and introducing new components into their home, much like I as a software developer have to take responsibility for every line of code that I write which has the potential to have a bug that compromises the system I deploy it on, or enables someone to leak the database the application is connected to. IKEA sells knives, for christ sakes.

Re:A quick look at the Ikea Trådfri lighting platform by Nexxxeh on Sunday April 09, 2017 @04:59PM (#14074334)
No we aren't.

Can these items be hijacked, what is the risk of that happening, and what is the damage they can cause?

> It's not IKEA's responsibility to ensure that every product they sell cannot be used in any destructive manner.

No, but they have a reasonable due of care.

I'm not saying that they shouldn't go on sale without the protections I mentioned. But it's surely a reasonable question to ask if those protections are in there, so as to better understand the risks.

>People have to take responsibility for purchasing and introducing new components into their home,

Yeah, but what ARE the risks? You can't answer my question, so how am I supposed to make an informed decision if I'm epileptic?

I know the balance of risks of knives. Everyone does. How many people know the potential risks of Zigbee-connected bulbs with a wifi hub?

Re:A quick look at the Ikea Trådfri lighting platform by lathiat on Sunday April 09, 2017 @12:00PM (#14072891)
I don't want to alarm anyone, but in many countries someone can walk up and switch off your power from the external meter box. They could even turn it off and on constantly to flash.

Just saying #perspective

Re:A quick look at the Ikea Trådfri lighting platform by Nexxxeh on Sunday April 09, 2017 @01:17PM (#14073280)
No-one is flicking my lightswitch from across the globe. The chances of some 4Chan troll doing it are slim.
Re:A quick look at the Ikea Trådfri lighting platform by simcop2387 on Sunday April 09, 2017 @02:38AM (#14070826)
Pretty much I think. I don't know a way around it either and I think it's only going to get worse for now as more states look at passing laws like California or more Companies end up with FTC suits and settlements like trendnet (20 years of mandated 3rd party auditing)
Re:A quick look at the Ikea Trådfri lighting platform by mobiletelephone on Sunday April 09, 2017 @06:40AM (#14071574)
Any thoughts on PolarSSL?
Re:A quick look at the Ikea Trådfri lighting platform by cybergibbons on Monday April 10, 2017 @05:06AM (#14077005)
Less well tested than OpenSSL, but historically has been relatively secure.
Re:A quick look at the Ikea Trådfri lighting platform by feld on Sunday April 09, 2017 @02:08PM (#14073538)
PolarSSL is now mBedTLS
Re:A quick look at the Ikea Trådfri lighting platform by slau on Saturday April 08, 2017 @10:53PM (#14070200)
I understand where you're coming from, but you're making a logical leap: you assume that HTTP over TLS somehow means that it needs to be interoperable with the full and real internet.

This device presumably already ships with a public key that verifies the integrity of the images it downloads. Why not ship with a single CA (owned by IKEA), or even single certificate?

It doesn't even need to be signed by a public CA, this can all be self-signed by the org. This completely solves the issue with regards to anchors, as you call them.

The next thing you mention is firmware update post-EOL. Again, TLS doesn't change much about this. If we apply Occam's razor, what is more likely: that Ikea's servers are upgraded beyond compatibility with today's TLS stack, or that the servers are shut down? Once EOL hits, you're SOL anyway.

PS: A current nginx or Apache can still easily communicate with IE6.

PPS: I'm not saying that I think TLS is required in this case. Just that the right argumentation has to be used.

Re:A quick look at the Ikea Trådfri lighting platform by stable-point on Sunday April 09, 2017 @01:12AM (#14070607)
The firmware signature ensures the updates are authentic, but not that they are fresh. An attacker could force devices to stay on an older authentic but vulnerable piece of software.

The Google Omaha design docs discuss this a little bit: https://github.com/google/omaha/blob/master/doc/cup.html

I think plain HTTP is not appropriate for most update schemes Interestingly, Google Omaha actually chose not to use TLS to ensure freshness, but has something custom.

Re:A quick look at the Ikea Trådfri lighting platform by problems on Sunday April 09, 2017 @03:04AM (#14070884)
An attacker could just as easily block the SSL connections - unless you're suggesting it fail if it can't check for a firmware update, but that proposal would mean that if your servers are gone the devices are bricked. Many of such devices function fine in a Lan only setting behind a nat where they're virtually untouchable.

Disallowing downgrades via a signed datestamp is about the best you can do. Anything else will either be trivially blocked or result in other user problems.

Re:A quick look at the Ikea Trådfri lighting platform by viraptor on Sunday April 09, 2017 @03:34AM (#14070960)
The are less drastic options. You can start warning loudly if the servers haven't responded for weeks.
Re:A quick look at the Ikea Trådfri lighting platform by lexicality on Sunday April 09, 2017 @04:45AM (#14071190)
Via what? Flashing the apartment lights?
Re:A quick look at the Ikea Trådfri lighting platform by viraptor on Sunday April 09, 2017 @05:23AM (#14071302)
Reporting to the app controlling them.
Re:A quick look at the Ikea Trådfri lighting platform by toast0 on Sunday April 09, 2017 @02:39AM (#14070830)
An attacker who can change the http content, could also block access to https upgrade servers, ensuring stale firmware.
Re:A quick look at the Ikea Trådfri lighting platform by peeters on Saturday April 08, 2017 @10:52PM (#14070194)
I mentioned this elsewhere, but signing can tell you whether it's an authentic object, but usually not whether it's THE authentic object you had requested. So you then need something extra to validate that what you got is what you wanted, for example check the version number in the signed image. But how do you know what version number you should be looking for without HTTPS?

In this case the article points out that the metadata itself is downloaded over HTTP.

Re:A quick look at the Ikea Trådfri lighting platform by hawski on Sunday April 09, 2017 @10:11AM (#14072364)
A silly solution:

Recreate a package every day, week or month and update package date to current time. A device will refuse to install an update that is older than factory specified interval. Of course the problem then is that your device now needs to have secure channel to NTP servers. Possibly they could use radio synchronization instead - same as used in radio controlled watches. It could be exploited, but it would be much harder to do remotely by network.

It needs a bit of gymnastics, but it may still be easier on the long run than HTTPS. Your mileage can vary.

Edit: Dear downvoter: Was I overly dumb or inaccurate with my proposition?

Re:A quick look at the Ikea Trådfri lighting platform by gcr on Sunday April 09, 2017 @12:10PM (#14072926)
Simpler solution: just refuse to install a firmware update that doesn't verify, or whose version number is less than the currently installed version.
Re:A quick look at the Ikea Trådfri lighting platform by dubya on Saturday April 08, 2017 @10:52PM (#14070197)
I agree. I had to dust off my WRT54G for a few days when my modern router died. I accidentally switched it to https only, and none of Safari, Chrome and Firefox would connect to it because of the SSL version.
Re:A quick look at the Ikea Trådfri lighting platform by lorenzhs on Sunday April 09, 2017 @04:41AM (#14071181)
That's unrelated. The lights need to be able to connect, not your browser. It's not about having a website where you can download a new image, it's about having the lights download a new firmware image. What browsers do or do not support doesn't matter.

The WRT54G is also 15 years old. That's probably longer than the lifespan of a smart lighting system.

Re:A quick look at the Ikea Trådfri lighting platform by toast0 on Sunday April 09, 2017 @02:46PM (#14073724)
> The WRT54G is also 15 years old. That's probably longer than the lifespan of a smart lighting system.

This is probably true, but also depressing. Dumb lighting systems have a very long lifespan, essentially as long as the wiring survives, which is mostly until a remodel or a catastrophic failure; but a smart lighting system is only expected to last 10 years at which time we have to rebuild the system at great expense with whatever is new and hip and trendy (not to mention, the ten year old system was already greatly expensive).

Re:A quick look at the Ikea Trådfri lighting platform by lorenzhs on Monday April 10, 2017 @05:44AM (#14077139)
If you haven't replaced your lighting system in the last ten years, now might be a good time to buy LEDs. They have improved in reliability, colour spectrum (warm white), and price. Incandescent bulbs are no longer sold in the EU.

All the smart stuff and home automation is still very new and in a state of flux. I hope it will settle down in the next few years.