35 billion, that’s billion with a B – IoT devices are using flawed hardware and copied reference code that leaves their security vulnerable according to a presentation at this month’s Def Con security conference.
Cryptography relies on using random numbers, yet computers are very poor at generating random numbers and so they rely on an external source of entropy or randomness. To solve this problem, IoT devices typically use a hardware based random number generator (RNG) but, according to the paper from Bishop Fox Labs, flaws in the design and implementation mean many IoT devices are regularly using encryption keys of all zeros – or worse.
Writers of IoT device firmware have made liberal use of GitHub and reference code supplied by hardware vendors – which has resulted in logic and design flaws in the devices crypto systems being cut-and-paste repeated across the industry.
For example, the researchers discovered (by reviewing source code on GitHub) that many devices frequently ignore the return status code when asking the RNG for a random number. If the call to the RNG fails, what it returns is either all zeros or uninitialised memory – resulting in either weak crypto or a leaking the contents of the device memory. And the calls to the RNG fail surprising often on IoT devices because of the limited pool of entropy available.
On ‘larger’ systems, such as a Linux server, there is a dedicated cryptographically secure random number generator (/dev/urandom on Linux) which is continually filling a large pool of entropy so true randomness is always available when required by a cryptographic function. However, the limited hardware present in many IoT devices simply cannot support this.
So, when the IoT device makes a TLS connection to protect the traffic it is sending – that TLS connection may well be based on a key of all zeros and be vulnerable.
There are some important security principles revealed in this paper:
- Do not assume the code your developers are copying from GitHub is secure and safe – even if hundreds of other projects are copying the same code.
- Do not trust the crypto of IoT devices – keep them off your main network in isolated segments.
- Speak to your IoT device vendors about their plans for firmware upgrades to enhance their crypto strength – or if this is even possible on the devices you use.