412 points · by dankohn1 · 9y ago · 137 comments
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.
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.
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.
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?
And reastically, the server could even eliminate that requirement by supporting old protocols just for the updating old firmware.
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.)
Thank you, came here to mention this. So many people seem to think that OpenSSL is the ONLY tool to be used.
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.
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.
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.
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.
In this case the article points out that the metadata itself is downloaded over HTTP.
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?
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).
This is excellent. I can't even say the same thing about my AT&T fiber gateway. It listens on two random ports with no way to turn it off (and also you can't use your gigabit internet without the AT&T gateway in front). I don't know what it is, but I'm sure it's probably insecure.
I implemented it differently, but probably less sensibly. I have a FreeBSD as my NAT box anyway, so I added some network cards, and run a ethernet bridge in front of the gateway (I commented out the lines that dropped traffic to reserved multicast addresses because that include 802.1X), and divert only a small fraction of the incoming packets (ipv6 tunnel from he.net, most udp 123 packets, icmp pings, port 25), that the gateway won't give to the DMZ host (I have the Pace 5268AC gateway which likes to ruin things; the NVG599 one is probably better). You can PM me on DSL Reports with the same username, if you want more details on my crazy setup. :)
Why? What security benefit do you gain by using HTTPS when you already check the signature/hash of the firmware file?
If you assume there IS further version validation, then the question is how do you know what version you should be expecting without HTTPS?
Downside: Reverting is not possible if you make a serious mistake in an upgrade. If you can't initiate another upgrade process, bricking is possible...
I don't know much about the world of really small devices aka IoT, but from my laymen perspective: Is a full TLS stack still a huge obstacle there? Sane signature checks are at least a step in the right direction.
Synchronize time using one of the time signals available in the area or use signed channel for time sync. Using radio time signal it can be easy to spoof it if your location is known by the intruder, but makes it practically impossible for remote exploits. But radio signals may have bad reception inside a house.
B/c without HTTPS you can't verify you're actually talking to IKEA's update servers. Even if there's firmware signature implemented an attacker could still MITM you over HTTP and simply not serve you a file with updates. Which means that they can prevent your devices from upgrading, i.e to receive an update that closes a known flaw they might be exploiting.
They probably should have signed the json listing of firmware images though, in addition to just the firmware images.
It's nice to see that some serious vendors actually do things mostly right.
It is a shame that the firmware updates go over http, but that's about the only obvious flaw with their implementation.
https://www.youtube.com/watch?v=uRe9w5PKmsE
It's also a pretty darn good piece of kit.
For what it's worth, hacking is a big part of Swedish culture.
Really? how so?
I've never heard about this before so I'm curious about it.
You mean it's a big part as in there are a lot of Swedish hackers or because it's encouraged as part of the culture/education system?
A lot of the early Internet's game cracking scene originated in Sweden, too.
Yes, Fairlight and some other groups were Swedish. Yes, a strong middle class meant that a lot of kids had access to ABC80s, C64s, Amiga 500s, IBM PCs, Macintoshes growing up. BBSes were popular in certain groups of the population. People grew up with this and started companies. A lot of existing companies were open to new things. That does not mean that "hacking is a part of Swedish culture".
> an unfriendly climate most of the year encourages indoor activities
Anecdotally, I seem to recall a lot of sledge riding, snowball throwing and various other winter activities from my youth.
Thanks for the replies.
I've never heard anyone say "trådfri" before. The normal word would be "sladdlös" at least where I'm from.
Given how tenuous some of the connections can be, I'm assuming they're often picked with more emphasis on how they sound/read/works in other countries rather than precision.
I live in London, and the most entertaining part about visiting my local Ikea is hearing English people trying to pronounce the product names...
Men min dansk er ikke så godt, så...
I think it might be a clever IKEA marketing trick: a lot of countries know exactly what it means (I would assume that most of Scandinavia, and the Germanic languages would be able to figure it out). For the others, it's just another random Scandinavian word and orthography to remember.
"einwandfrei": a thing free of problems or restrictions
trådfri sounds like half Danish half Norwegian to me; English cordless or wireless is Norwegian trådløs.
If so, I guess they are saying that the API between the app and the gateway is currently closed (according o the IKEA website) but they are working to change that. So what is speaking COAP? The gateway?
https://github.com/bwssytems/ha-bridge/issues/570
P.S. Thanks for the nice article and bringing this interesting development to light!
Ikea has a trusted brand, with a strong reputation for safety, quality (for the price) and family-friendliness.
They make things cheap with clever design, logistics and home assembly. A €5 table isn't comparable to a €500 one (and they sell both), but they don't sell the €2-including-delivery electronics you can find on eBay. They sell wireless chargers for €30, and normal ones for €8.
says no API access in the first version but IKEA is working towards an open system.
Prices seem to be only slightly lower than comparable Philips products.
https://github.com/bwssytems/ha-bridge/issues/570
Developers there are trying to reverse engineer it for open source home automation software.
And it looks like they've separated the concerns somewhat properly, so the lightbulbs can be somewhat separate from firmware updates and the suchlike. Big improvement over some folks....[0]
[0]: https://twitter.com/internetofshit/status/849667478385037317
Is that actually true? Or is this just confusing "non-local" with "cloud"?
If it's speaking IP, how would it even distinguish "local" packet from "non-local" packets? What prevents you from talking to your device at home using IP connectivity elsewhere on the planet?
But even then, it's not really sensible to take that for granted: Sure, most consumers will only have NAT at home, but why should only consumers buy this device?
Also, NAT does not prevent unsolicited packets from outside the LAN, just from across the global internet.