4 ms·
> you probably shouldn't leave a sensitive device unattended anyway Almost every ESP32 device is left unattended while storing the owner's wifi credentials. Y
by michaelt 6y ago
> you probably shouldn't leave a sensitive device unattended anyway
Almost every ESP32 device is left unattended while storing the owner's wifi credentials.
You can't exactly make a wifi doorbell, or wifi thermostat, or wifi lightbulb, or wifi security camera, without storing a wifi password.
Of course, a cynic would say product manufacturers deploy these features hoping to protect their source code, rather than to keep the customer's wifi passwords safe.
- phh 6y agoIMO that's more an issue with (customer) WiFi, than the device itself. WiFi is the very last place where people living together have to share one common secret for their security, and that's pretty ridiculous. At least with WPA3 we get perfect forward secrecy even with shared password...
- mavhc 6y agoDo you also get PFS with Opportunistic Wireless Encryption?
- zrm 6y ago> You can't exactly make a wifi doorbell, or wifi thermostat, or wifi lightbulb, or wifi security camera, without storing a wifi password. Sure you could. It would just require the access point to provide a passwordless guest network for such devices to use, and then encrypt the traffic end to end for the actual security.
- shawnz 6y agoYou would have to store some kind of key material though.
- zrm 6y agoNope, the client device only needs the server's public key, which isn't a secret. The session keys are a secret but they're also different for every device, transient and never written to permanent storage.
- creeble 6y agoThen any device can connect to that server, not just authorized devices. Maybe you assume that's okay, but it's an attack vector on the server, and it means someone can emulate a device that isn't really one.
- zrm 6y agoThe device can identify itself with a UUID, which isn't key material and doesn't allow anyone to break the channel between the actual device and the server, which is still authenticated by the client using the server's public key. The attacker could generate a random UUID and connect to the server, but then it just shows up as an unconfigured device and gets ignored. The attacker would have to extract the UUID from the device it wanted to impersonate, which still wouldn't allow it to impersonate any other device the same way a WiFi password does, and would then be detectable because there would be two devices claiming to have the same UUID, at which point you generate a new one for the real device after addressing whatever allowed the attacker to extract it to begin with.
- ClumsyPilot 6y agoSo now: A) routers must support network isolated guest network B) anyome can connect to my internet to download stuff C) if my compuer and IoT hub is on my main network, and the lightbulb is on the guest one, how do they talk? Through the third party server? What if there is no internet, I can't control my lights? The actual solution is to have individualised passwords for each device that can be revoked, isolated, etc. Those features are not found in 'normal' wifi routers
- MayeulC 6y agoWhy would that network need to provide internet connectivity? Have the Wi-Fi gateway perform the authentication and provide an interface, or use a vlan connected to a server that handles that. > Those features are not found in 'normal' wifi routers Then deplore the state of current consumer wi-fi routers and protocols. We can do better than this. More to the point, Wi-Fi wasn't really designed for this, so maybe a new kind of extension is warranted (like NAN, P2P, mesh, etc). Or use another protocol: Zigbee, Lora, z-wave, etc. These generally have the guarantees you want, sometimes do mesh networking, etc. In the past, I've used a raspberrypi3 as a "IoT hub", using its wi-fi network to connect "smart" devices. The third-party server was my hub. Everything works without internet. The dedicated wi-fi network doesn't have internet. You can even lower the bandwidth to 20 MHz, and 1Mbps to achieve greater ranges on that channel.
- octorian 6y ago> if my compuer and IoT hub is on my main network, and the lightbulb is on the guest one, how do they talk? If your IoT devices aren't on the same subnet as your smartphone or computer, the vast majority of their "frontend apps" are already DOA. If you're lucky, those apps might let you explicitly specify the device's IP address (in a half-baked fashion that still doesn't work very well).
- lgunsch 6y agoA smart doorbell, light bulb, nanny cam, etc require methods to connect and identify with cloud resources. Obviously you wouldn't want to have to type in a password or use a secure card to turn your lights on.
- MayeulC 6y agoI agree with sibling phh. Not sure if supported by the ESP32, and it's kind of complex to setup, but I think you could set up a per-device password, with WPA enterprise (PEAP/MSCHAPv2), and a RADIUS authentication server. What you want to do with that is another question. You can't really do anything against someone who decides to fake your thermostat reading, but having access to the hardware already defeats that. At least you limit the impact to the one device that was stolen. Having someone check that the device is still there could be helpful. And since that attack still takes some time to perform, some monitoring could detect that the thermostat/etc hasn't been connected in a while. I am not sure how useful extracting a Wi-Fi password that's only used by the doorbell would be?
- creeble 6y agoThey also deploy these features to prevent unsigned code from running and creating botnets. There is a tradeoff for letting users run their own code on these devices: people other than the device owner may be able to run code on them too.
- tzs 6y ago> You can't exactly make a wifi doorbell, or wifi thermostat, or wifi lightbulb, or wifi security camera, without storing a wifi password What I am thinking of doing for the outdoor weather station I will someday get around to finishing is to have it be on a separate WiFi network. To get data from it you will have to connect to that WiFi network. Inside the house, I'll have an RPi or something like that which has WiFi and Ethernet that will use its WiFi to connect to the weather station's network and Ethernet to connect to my home LAN. If someone steals the weather station, the only password they get is the password to the weather station network, assuming that it has one (not sure yet...may make it open so that anyone in WiFi range can connect and read the data). Same thing for the automatic wildlife camera I'm contemplating. Probably that will go on the same WiFi network as the weather station.
- therealx 6y agoVLANs and a decent firewall/router are your friend.
- Mister_Snuggles 6y agoDepending on the capabilities of your WiFi gear, you can just run these devices off of a second wireless network which backends onto a separate VLAN. You can then use firewall rules to determine what traffic is allowed to pass between VLANs. I do this for my cameras (no traffic out from the VLAN, but allow connections in from the NVR machine) and IoT devices (traffic to the internet is allowed, only some traffic to my other networks is allowed). It works very well. I use Unifi for my networking gear, but I've done the same thing with DD-WRT on an Asus router/AP device.