4

My company develops a WiFi-connected IoT product. I want to make sure that the process of getting the user's WiFi credentials into the device is as safe as possible. At the moment, the product is in a prototype stage, so we can (and will) make further changes before it hits the market.

At the moment, the process is as follows:

  1. The device creates its own WiFi hotspot. The credentials for this hotspot are printed onto a label on the device itself.
  2. The user visits a certain URL (a web page served by an embedded web server on the product, using plain HTTP)
  3. The user enters his WiFi credentials into a form on that page
  4. The device saves those credentials and uses them to connect to the user's WiFi

Several guys in the company think that this is secure. An attacker would need to get into the hotspot to sniff on the user's WiFi credentials.

I disagree since I think that getting into the WiFi is a pretty low hurdle. The attacker could have glanced at the credentials on the label during a visit, brute-forced his way into the WiFi hotspot or exploited a weakness in the WiFi hotspot authentication (not unheard of). I suggest to change the process to look as follows:

  1. The company creates a self-signed SSL root certificate.
  2. We use this root cert to sign individual certificates unique to each product sold. The product's certificate and private key is embedded in flash memory during manufacturing.
  3. The user goes to our website and downloads our root certificate and installs it into his operating system.
  4. The device creates its own WiFi hotspot. The credentials for this hotspot are printed onto a label on the device itself.
  5. The user visits a certain URL (a web page served by an embedded web server on the product, using HTTPS and the device's unique certificate. The browser trusts the certificate because our root cert is installed.)
  6. The user enters his WiFi credentials into a form on that page. The information is sent to the device over the TLS-encrypted channel.
  7. The device saves those credentials and uses them to connect to the user's WiFi

I think that this process is very secure. But it imposes other problems:

  • How can we update a device's certificate? Possible, but very cumbersome and a lot of effort.
  • The user has to manually install a certificate. This is not very user-friendly and less tech-savvy users may fail to do it correctly even if we provide very detailed instructions.

My question(s):

  1. Is the suggested process secure enough for an IoT product (imagine it as some kind of smart energy meter measuring your electricity consumption)?
  2. Is there any way to improve the user experience of the process (e.g. getting around the need to install our certificate)?
  3. Is there any way to improve the process in terms of implementation complexity for us (without compromising the user's security)?
  4. Are there alternative ways to get the WiFi credentials onto our device? We cannot use Bluetooth and the device has neither screen nor keyboard.
  • You could work with a established CA to get a certificate you could use to sign the hardware certs, that way the user wouldn't have to install an additional (your) root cert. However, I'm not sure if this would work either way, or may vary by browser, as once the user is on the hotspot network, they won't be able to perform CRL lookups which might throw an error anyway. – K.B. Jan 17 '18 at 17:51
  • @K.B. I'm pretty sure that this wouldn't be possible. When submitting a CSR, you need to specify a hostname the certificate shall be valid for. And the CA needs to verify that I do control this hostname. That is not doable since the server on the device is up if and only if the device is not connected to the internet. – Oromis Jan 18 '18 at 9:36
  • Again, I suspect this may not be the best route to go, even if it is possible, but CAs can issues certs, that you can then use to sign whatever cert you want (called an intermediary certificate). I don't know what the requirements for getting one of those are (I'd guess pretty stringent, since you're effectively being granted ability to sign things as the CA), but it can technically be done. – K.B. Jan 18 '18 at 19:43
  • On a more practical note; you could create an app (google play/apple store/windows store) that would have your trusted root cert embedded in it. That way you could tell the user 'download this app' (something most users will be comfortable with) rather than 'follow this sequence to install a trusted CA cert' (something most users are going to be confused by). – K.B. Jan 18 '18 at 19:46
  • On an even more practical note: if you made sure the hotspot used modern WiFi encryption (WPA2, soon WPA3), made sure the password was random (not procedurally generated based on MAC or something), and that the hotspot password was not listed on the outside of the box (so you had to buy the thing & open the box to find the password), I'd guess the HTTP only hotspot would probably be secure enough since it is only enabled for a short period of time (The hotspot turns off once it successfully connects to another network right?). – K.B. Jan 18 '18 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.