384 points · by edward · 10y ago · 240 comments
> The line in the sand for me is: network vs cloud-based systems. I want things to be network connected, but I want it for my own network only. I want to be able to control my coffee pot, but only from home. If I choose to expose this over the internet, great! It's up to me to make sure it's secure. I don't want anyone making that decision for me.
I also want it to be upgradeable, and hackable. I'm willing to pay a lot of money for standalone quality devices, but nobody is supplying!
What I've got is a platform that 1.) makes it substantially easier for IoT developers to get their devices to market and 2.} enforces end-to-end encryption and affirmative consensual sharing. It works by running as a background service on both the IoT device and on any connecting computers. In a similar vein to IPFS, the service magically switches between local and nonlocal networks dynamically, so it doesn't matter if your interent connection goes out; as long as you have power (and a local server set up, but I'd like to add P2P capability over LAN in the near future) you're good to go.
I realize this isn't the whole device you want, but is that a starting point you'd be interested in?
You wouldn't have any guarantee that the garage door opener isn't also running a separate web connection in the background, but arguably unless you're actively monitoring your LAN (or just plain radio) traffic you don't have that anyways.
Put a different way, you can't prevent your manufacturer from, for example, adding a SIM card and wireless connection to your garage door opener. At some point you have to trust them.
+ Golix is the name of the protocol: https://github.com/Muterra/doc-golix
+ Hypergolix is the background service I've written to implement it, which is backed by a PaaS on AWS: https://www.hypergolix.com
+ This is a demo of Hypergolix: https://github.com/Muterra/py_hypergolix_demos/tree/master/e...
Cheers, and thanks for the feedback!
I'm not here to be monetized by being glued to the hip to your infrastructure that may go away for any number of reasons (technical or non) and make my property suddenly stop working.
"Endpoint hostile" networks are designed with a single use case in mind: accessing remote servers, usually via HTTP/HTTPS. Other use cases are prohibited or broken.
Here are some of the characteristics that would label a network as endpoint hostile:
- "Device isolation," which prohibits local LAN device communication. This is common on some WiFi networks. It's forgivable on a public WiFi but not elsewhere.
- Symmetric NAT
- Multiple levels of nested NAT e.g. consumer routers plugged into consumer routers. It's important to note that this makes everything flaky due to weird interactions and timeout behaviors. In our experience it's disturbingly common. We talked to one person whose company had at least five levels of this, requiring things like "ServerAliveInterval 10" in ssh_config.
- Lack of support for NAT hairpinning. (NAT can't NAT-traverse with itself.)
- Short NAT/firewall stateful connection timeout (120s is the RFC recommendation, but 30-60s is common and we've seen 15.)
- IPv6 absent (assuming it's available upstream) or deployed in a silly way (e.g. IPv6 NAT).
- Lack of support for local multicast or broadcast
- Aggressive edge firewall rules that prohibit UDP, non-standard TCP ports, etc. or that DPI traffic and attempt to block anything other than HTTP, SSH, and SSL.
- Badly implemented NAT ALGs for things like FTP and SIP that break other traffic.
- Lack of uPnP or NAT-PMP support.
- Mandatory proxy configuration.
- Middle boxes that modify traffic in general. This includes things that bork TCP in a misguided attempt to "optimize" it, things that inject HTTP headers (or worse JavaScript), things that modify DNS to strip A/AAAA records for "private" IPs or strip TXT records, etc.
Some of this stuff is just stupidity or brokenness, but much of it is implemented for "security" reasons.
I personally consider reliance on network edge controls for security to be a borderline-obsolete cargo cult practice, since the vast majority of today's vulnerabilities and attack vectors are unaffected by it and involve things like cloud services, e-mail, web, app updates, etc. I've worked in netsec/infosec and have seen a number of intrusions, and so far I have yet to see one in the past 10 years that was mitigated in any way by the presence of a firewall. Yet a generation of IT people thinks "firewall equals security" and I'm increasingly thinking this generation will have to just pass along.
1. It plugs into the wall
2. You can plug an appliance of some sort into it
3. The device has a USB interface
4. The device has a WiFi interface
5. When I plug in the device with the USB interface, it looks like a serial device
6. The device has a very simple protocol that you can use to set it up, over the serial interface
7. You can optionally have the device join a WiFi network, and you can choose to enable a simple REST web service
8. Whether you choose USB or Wifi, the device only does 3 things:
a. Tell you whether it is supplying power to the appliance
b. Supply power to the appliance, if not already doing so
c. Stop supplying power to the appliance, if not already doing so
edit:formatting
The ESP8266 is a micro controller with built in WiFi and network stack and a serial interface, and several digital I/O pins you can use to interface to other things.
Various vendors sell small modules that couple an ESP8266 with some flash memory to hold your code. These often come with built in firmware that provides a serial interface similar to the old modem "AT" interface, but with commands for WiFi. There is a free SDK available for programming the thing in C/C++. There are several firmware replacements available. There is one that brings the Arduino environment to the ESP8266. There is one that offers MicroPython. There is one that offers Lua.
A solid state relay is a four terminal device. Two terminals are the control terminals, and two are the load terminals. Put a specified voltage across the control terminals, and the devices acts like a closed switch between the load terminals. If the control voltage is below the specified level, the device acts like an open switch between the load terminals. A typical SSR can handle AC voltage on the load terminals of well over what any standard household or office uses. The control voltage is typically around 3-30 V to close the virtual switch, which a logic one in a 3.3 V system (like the ESP8266) falls within, so you may be able to control the SSR directly from an ESP8266 I/O pin. (But you'd need to check the specs for the relay and make sure it doesn't require more current than the pin provides. If it does you might have to toss in a transistor to drive the relay).
This would be a good first project to get started in micro controllers or IoT or home automation or home sensing.
Two caveats are that it doesn't directly have a USB plug. The serial header is exposed and you can reprogram the device with your own firmware to make it report whatever you like, but you do need a USB-Serial cable and maybe to solder on some header pins. Also, it is meant to be spliced into a power cable - it has input and output wire terminals and not an outlet-type connector.
I have a couple of these, they're quite useful. One controlling a fan and another I spliced into a light switch to control some overhead lights.
And I can't even control which of my apps should not connect to the network. There are lots of fun apps e.g. games, photo editing etc. where internet connectivity is solely needed for ads. I'm OK with that. However I don't want them uploading any personal information to their servers. I wish I could stop that.
They're dirt cheap, they work, and you get root so it's completely upgradable and hackable.
Can't beat that really if you have decent security practices outside of the device.
It's definitely an investment in terms of time to beat it into shape, but it sounds like a fun weekend project to me.
Personally, I consider most of IoT products to be a waste of resources used to create them. It's a blatant promotion of shitty engineering in an attempt to get some money out of people.
A look at the practicalities here: http://fortune.com/2015/06/09/ceo-apple-homekit-mess/
> Is that compatible with non-apple devices?
Yeah, here is a list of a few products: https://support.apple.com/en-us/HT204903Not to long ago I settled for a couple of the venstar T7900's. They aren't perfect by any means, but they are light years ahead of anything else I could find. In fact they have a whole bunch of options that harken back to some of the early programmable thermostats. For example, out of the box you can control the max cycles/hour, or the number of degrees of variance from the setpoints. Buried in the menus are a wealth of options, including a few for limiting features available to "unprivileged" users. Funny enough, they can be subscribed to the power companies remote kill features, but the user is still in control and can disable the feature, which is probably why they are excluded from my power companies list of "smart" thermostats that qualify for rebates.
So, the cloud service can do a lot of things that aren't available from the published API, but running a local deamon and polling runtimes, setpoints, etc is all very straightforward, as is forcing a thermostat on/off from a server on the local network.
Anyway, that is my .02 for a thermostat that isn't owned by $megacorp/etc and can be disabled at the wim of a company that decides paying for a bunch of cloud servers is no longer in their interest.
You could pay an amateur electronics hacker to make you such devices.
Having never used zwave though, it sounds like your point is valid.
ZeroTier already runs fine on embedded Linux, which is a large subset of IoT, and we've researched a lightweight port to FreeRTOS.
https://www.facebook.com/kokonautweathersensors/
It's not using my network, but it's hackable enough that you can use it on your own network if you know how to flash it yourself.
I haven't released the code for it yet, but there are plenty of tutorials online. It's using NodeMCU and a DHT11. If there's more interest in hacking the device, I can provide some blogposts or tutorial videos.
There are 5 available and 15-25 more are on the way. Please contact me if you're interested. I'm planning on selling it for around $35 and for the first few batches at $30 (as an early adopter discount). Email: antoniuschan99@gmail.com
For personal uses, I have a waterproof temperature sensor coming in, and plan to use that for my aquarium, so maybe I will produce that version. Also I am tinkering with electrical outlets that can be remotely triggered. So you can set the weather alarm to trigger appliances.
I imagine something like the following would be good:
- Each component runs in it's own chroot/container/virt so the manufacturer can provide whatever they want, and the user can throttle it if it's poorly engineered.
- Discovery service that allows installed network server components to register with it for discovery. (Sun's RPC service, anyone?)
- Possibly also to proxy all traffic through discovery service, so network components have to specifically register for direct network access with very specific access limits if they want to use an internet service or talk to a company server.
- Separate file systems exposed for the application and stored data for each app, so a memory card card can be used for the data portion, and replacing hardware is fairly simple (after base software is installed, each application will discover it's configuration and stored data from the provided memory card). Possibly even a separation between data and config as well. IP cameras can spool all their recorded video to the data partition, which might be a large attached disk, but their config can be on a separate, easily swapped memory card, for maximum choice when upgrading.
- Let the manufacturers work out standardizing protocols for their industry, or not, and integrating with other apps, but let apps see the list of available apps, and request access to other ones, so devices from the same manufacturer or ones with a partnership can leverage each other.
- Lots of other stuff people will come up with along the way.
I imagine you could get any relatively cheap box, install the base software (linux distro of choice plus framework, or distro dedicated to this), and have it mostly work. Something like FreeNAS and similar projects.
Does anyone know of any groups out there working on something like this? Maybe some docker oriented distro that aims to be super simple comes closest?
Edit: Added another point or two.
>I want things to be network connected, but I want it for my own network only. I want to be able to control my coffee pot, but only from home.
and
>I also want it to be upgradeable,
So let's be super-super clear.
You do want it to be upgradeable. That means you want it to be able to be better in the future than the day you bought it. (Otherwise it's not an upgrade.)
So.
You want to be able to enjoy upgrades.
Meanwhile, are you sure that you 100% definitely want non-technical users who plug in the device and never want to take any further action, to ever enjoy the benefits of any automatic upgrade they don't need to know or touch or think about? You want to monopolize upgrades for hackers, and deny them to 99.999% of world's population, right?
You don't want devices to stay on the latest version pushed by their companies, by default? (By default).
I want to be super-clear about your thinking on this.
It's a binary line in the sand. Either devices do, or they don't, upgrade by default whenever the company decides to push a version. I don't update my version of Chrome - Google does, whenever they want. I didn't set it that way. I agree it's best practice.
Do you want to deny this benefit to all purchasers of all IOT devices? (Genuine question.)
The conclusion I've come to is the opposite one that you've come to. I've come to the conclusion:
-> The default settings should have an option "Stay on latest version. Upgrades will be applied automatically." You as a hacker can turn it off to instead get the behavior you suggest.
If the user does not disable that option:
-> By default devices should ping to see if their company wants to push an update.
-> If there's nothing to ping because their companies have gone out of business or the product is no longer supported, then they should stay on their current version and NOT stop working or be bricked. A Nest-like debacle shouldn't happen. Devices shouldn't be bricked by an end to support.
-> If the device has its ping answered it should download the update and check that it is signed with a key in its list of accepted keys, however, only if it successfully reaches a revocation server and the revocation server does not say the key is revoked. It should have a set of possible keys, and if they have all been revoked then it should never apply another automatic update. If it can't reach the revocation server it should never apply an update.
-> Since you're a hacker you can just add a file to the filesystem into the list of keys. This is fine because anyone who can read your device's filesystem in person can already do anything, such as replace the contents of the file after it has been checked, verified, and decrypted, but before being run. So this is not a vector that concerns us. This means that code-signing doesn't destroy anything of your own control over your own device, nor place an inordinate burden on you.
-> Once a signed update has been received it will just be run as root regardless of its contents.
In practice what the scripts should do is copy the current filesystem to an Updated filesystem, then use the scripts to modify the Updated filesystem. It should then issue a reboot command and the device firmware should attempt to reboot into the Updated filesystem. If successful and tests pass then the Updated filesystem becomes Current. If it fails then after a while the firmware will reboot to the old version. The device in this case (via scripts) reports to the server, by encrypting with the non-revoked key, that its update failed. It will then go back to pinging for updates as normal. The server can choose whether and when to push another update, or what other update to push. So if devices in the field are failing to update then the server operator can turn off the push of the updates and fix the problem.
That's it. This is the architecture that I envision.
What do you think? It's the exact OPPOSITE conclusion from the one you've reached. It is far, far beyond the line in the sand that you've drawn.
But your line in the sand means you want the benefits of upgrades, but you want your non-technical dad (or mom), grandparent, non-technical boyfriend or girlfriend, cousin, all the people buying the device and driving the price down for you, not to enjoy upgrade benefits.
Are you sure this is what you want? Positive?
> Meanwhile, are you sure that you 100% definitely want non-technical users who plug in the device and never want to take any further action, to ever enjoy the benefits of any automatic upgrade they don't need to know or touch or think about? You want to monopolize upgrades for hackers, and deny them to 99.999% of world's population, right?
I never said nobody else can upgrade, or that having cloud services (for things like upgrades) available are a bad thing. What I want is a device that doesn't assume it will be connected to the cloud, and doesn't lose any usability if it's not connected to the cloud. I think the best option would be a product that has both: Cloud services, and standalone services, and "home-cloud" services that I can install on my own home server.
> The default settings should have an option "Stay on latest version. Upgrades will be applied automatically." You as a hacker can turn it off to instead get the behavior you suggest.
I absolutely agree. By default I think auto-upgrades are a good thing. But I want to have the final control to turn those off if I want.
I actually really like your idea for how upgrades should be applied. I don't think it's the opposite of my desires though.
But MEN can update things themselves, right.?
My general rule of thumb is I NEVER buy anything IoT that is WiFi based. Zigbee or Z-Wave based devices will save you a lot of security nightmares (though definitely not all).
(It's also much more power-efficient; you can't really use wifi on battery powered devices unless you charge them frequently)
Low power: it should not require much in the way of network traffic or heartbeats so that you could leave the radio mostly off.
Mesh networking: ideally the devices should be able to repeat commands so that they could be low-power and not have to broadcast across entire houses.
Secure: it should have specific ways to join a network that don't require a keyboard on the device.
IoT application focused: the protocol should make it easy to do things like turn a device on/off, set a value or read a value.
Z-Wave and Zigbee do these things (for the most part), while WiFi is sort of hacked to try to maybe accomplish it. For instance, my Z-wave thermostat has been running off the same lithium AA batteries for about a year now, and the battery level is at 77%. I can't imagine a WiFi device being able to achieve that.
Maybe i'm just being cynical...
F.ex. when's the last time you saw a commercial for a door knob?
Similarly, the home automation solution targeted at those people usually aren't shit cloud-based products.
Perhaps an open-source effort to document & track what work has been done, even if it's just pulling firmware images and taking a look around. Maybe some kind of gamification to motivate researchers to pull things apart and report what they see.
I've bought everything from wireless hard drives to $250 Wifi routers to $20 ethernet/3G bridges and the quality of the firmware is pretty garbage on all of them.
I see brand new devices on kernel 2.4 and 2.6 with no upgrade plans in sight, and hacked up kernel trees that have no chance of building except on the developers' Red Hat 9 (!) workstations.
http://www.devttys0.com/blog/ is another good place to follow. I guess it's more fun to write a negative article, not to mention it gets a lot more views.
You'd never see a post on the front page of HN about how IoT device X was well designed and is generally secure, but you see (and will continue to see) them top out about how awful they are.
Just look at this thread. Half the answers to "what are some good IoT devices" is "lol there aren't any"... The HN crowd doesn't want good IoT devices, they want to make fun of bad ones.
Here ya go!
...
Has the GPL really lost it's power that much? I mean not responding to inquiries is one thing, but outright saying no?
I dare say if this were a major manufacturer, more effort would be made to make them behave, but we're talking about a short-run switch here.
If there ever becomes a mechanism to DMCA-takedown physical products on an international level, we might see some movement here. But China (et al) would never, ever agree to that. It's hard enough to get them to block things that clearly break international safety standards.
Same applies for this device. If a mfg is infringing on copyright then shouldn't we have a mechanism to stop it from being imported?
It strikes me that we have two laws in this country. The laws for those with money/power (e.g. MPAA to protect US corporate media interests), and then those same laws that are not applied to protect consumers. Is the only difference that MPAA has lawyers to ensure copyright infringement stops while consumers don't?
This might actually do more to confirm than dispute your comment about "laws for those with money/power", though.
- Containers are MASSIVE. Seriously. You can fit hundreds and hundreds and hundreds of thousands of plug-sized widgets in a container.
- Millions of containers leave China every day.
- People lie about certification, provenance, component specs. Even if you do test one, the next 999,999 are probably all using shitty capacitors.
- There are many ports that don't all share data.
The only stuff that gets refused are where you have repeat offenders coming into the same port with the same dangerous stuff.
And yes, MPAA and other trademark bandits with all the cash can pay to police this stuff. It isn't fair... But I'm not sure the world would have the appetite for absorbing the costs in import tax. A testing container of plugs would push the price up way beyond $30 a unit and that's testing 1/1000.
Demanding certified manufacturing might be an option but that's expensive for China so they'll resist (or do a job equally shitty as the plugs they'd be supposed to police).
I'm sure you're a fine person who would keep paying but do you think everybody would because it's the right thing?
That's all that's happening here.
It's up to the copyright holder to enforce it.
And that's a shitty thing to do which I 100% disagree with, but at least it gives lip service that they are doing something wrong. If what this reviewer says is true, the company just told him no.
That's not ignoring copyright/GPL, that's laughing in it's face.
Edit: BMW apparently did not do that, I probably read that somewhere that had an axe to grind...
It required a second request, and BMW's internal bureaucracy took some days (or weeks?), but they did fully comply.
http://www.theregister.co.uk/2016/03/30/bmw_complies_with_gp...
Madness. And people wonder why there's so much skepticism about IoT being adopted by non-techies.
Things are getting better. There will always be more crap out there than good stuff. That's why walmart is so popular, but things will generally improve.
Go to your local home depot and look at all the home automation stuff. Its all no-name garbage and the stuff I recognize still aren't getting things right (all the QA problems with the nest, the documented security issues with garage door openers, everything relaying on the OEM's servers to keep things running with no fallback or no non-cloud options, etc).
[edit:spelling]
Solutions in search of money before the market wises up to how crap these products are.
The real question in my mind is whether the devices will be using proprietary protocols to communicate with centralized corporate cloud servers, or some kind of open, interoperable mesh network. Right now I don't like the way the trend is going.
Seriously why have NO companies come forward with products like this. I'd buy a house worth if someone did.
*The components are simple & generic, the interface & controls are mostly based on a universal framework w/ their proprietary gui/front-end locked on.
> I could for example setup one to automatically
> power cycle my cable modem and router
It's turtles all the way down.1) Full firmware source code and required toolchains/sign keys/... be submitted to the national libraries, to be kept for secure archival until the device is officially unsupported by the manufacturer.
2) For networked products, the full source code must be either published, or licensed institutes must perform a security check.
3) There must be provisions in place to ensure timely reactions in case of security issues. If the manufacturer does not respond to security issues, national libraries have the right to release the source code.
4) Required tools, service manuals, datasheets etc. must be submitted to the national libraries.
This should basically kill off GPL-abusing companies, as well as ensure serviceability, even for discarded products.
http://www.ul.com/cybersecurity/
How good or useful this will be I don't know. But clearly they see this as an area where people will be looking for some expert help; not everyone has the skill of a Linux kernel hacker to check these things for themselves.
Turn on lights with a phone? No need for Internet.
Open doors with a fingerprint? No need for Internet.
An auto-adjusting energy-saving thermostat? No need for Internet.
A fridge that knows the milk is low? No need for Internet.
Charge people money to use their toaster? You need the Internet for that.
All that IoT stuff doesn't need Internet access. Hell, most of it doesn't need much of a network at all, but just having them default to intranet would deliver all the value without the problems (and the rent-seeking).
This is lightyears better than that, and yeah they fucked up a bunch of stuff, but it at least shows they tried. Even shitty AES is going to increase security over plaintext...
> Right now, the cloud - especially for IoT - isn't a healthy ecosystem. Your shiny new smart thermostat might as well be dialing into AOL on a dedicated landline. And unlike public services, these proprietary service providers lack long-term guarantees of service availability.
> What we need is a push for openness and interoperability in the cloud, and that will only happen if consumers demand it. The service providers are incentivized to do just the opposite.
Personally I think that is the opposite of what we need. Most IoT devices should be local-network-only. So if by cloud you mean a personal cloud (local network or VPN), then yes, I agree. Otherwise keep the interwebs away from my thermostat.
Maybe what we really need are more consumer-friendly, self-hosted (and secure) home VPN options. That way you can just run your services on the local network, and still have remote access without opening your devices to the world (or to other companies' servers). Until the average grandma can do that, the "personal cloud" idea will probably be overshadowed by manufacturers' desire to provide proprietary remote access options, because those go hand-in-hand with things like subscription pricing models, data mining, etc.
Overall: the hardware seems fine, the software is shoddy and the security is terrible
This article begins and ends with two great tl;dr for IoT. There is value in this. Just look at the prevailing cluelessness, and be much better than that to stand out from the pack. In fact, how about applying that formula to the next nascent big thing that comes along?
Point two comes in play only if the user experience is horrible, otherwise it's acceptable.
Regular consumers rarely think about point three.
The point being, the business model of IoT is literally lending you a device that due to purposefully shitty engineering is not useful if you're not paying the rent. I wish there'd be a founder that cares about making stuff that's primarily delivering value to the customer, but in IoT space, I'm yet to hear about one.
https://home-assistant.io/blog/2016/04/05/your-hub-should-be...
I'm not expert in the area, but I would imagine a standard API could be implemented to handle the vast majority of use cases. Connecting to an app securely, turning things on and off, basic scheduling.
Openwrt is powerful enough to take care of logging, connecting to the internet etc, and the sensor units can form a pseudo mesh using their wifi capabilities.
Last I checked, OpenWRT did not do security updates, and it's up to the user to recompile everything if they want newer versions.
https://en.wikipedia.org/wiki/Inferno_(operating_system)
That gets you:
1. Communications between devices are encrypted by the OS.
2. Access to the devices are handled with simple file-permissions.
3. Feature-providing utilities can be run either locally (i.e. on the device's CPU) or remotely (on some hub-CPU.)
Maybe in another decade or so IoT will make sense other than as something fun to experiment with.
The Hue lights are great but expensive. The Hue switch made things a lot more useful as well. I'm waiting for them to come out with a compatible light switch so I can control my recessed lights the same way as my light bulbs.
What they need to work on is a better outdoor camera with motion detection that doesn't get triggered by shadows or wind moving a tree branch. I've tried almost every solution and none is acceptable.
The nice thing about Hue is that their bridge can run completely disconnected from the internet and still respond to RESTful API requests, which means that when Phillips end-of-lifes Hue my bridge will keep working with Home Assistant.
If this thing is capable of running OpenWRT, it can run some sort of SSL for what it needs. Might be tight and might have to not be OpenSSL, but it can be done.
Lesser-capable devices may have issues. But note that one way or another, the devices must speak some decent encryption to get on to WPA2 networks. Of course that's probably done in the Wifi hardware, but it still shows that it's not like we're living in the 1980s where we literally wouldn't have been able to afford the silicon in a consumer device. Hardware acceleration of SSL shouldn't be that hard to get a hold of, for instance: https://en.wikipedia.org/wiki/SSL_acceleration#Central_proce...
That's not to say that you can't do encryption though, just that you need to rethink how to do it, where the solution is not just unencrypted JSON APIs.
(fast enough for streams in 'real-time' - I don't know)
Also, all of this can be done with plain openssl, there is no need for additional tools.
[1] https://blog.cloudflare.com/introducing-cfssl/ [2] https://www.vaultproject.io/intro/
oh baby!
Is he the author of one of the libraries it uses?