Exploiting IoT devices with Secure Boot and why IoT products do not have continuous integrity check?
Everyone makes an oversight when building their IoT products. Because "Secure Boot" provides a false sense of security. The best examples are IoT sensors like the Wireless Temperature Sensors we know for years.

We are using "Secure Boot" to verify the software integrity of our IoT devices during start. Afterwards, we take what "Secure Boot" gives us as enough integrity to make our products trustworthy for use, however
Integrity is the quality of having consistency and "Secure Boot" takes place only once.
After our IoT device is installed and running, there is no longer a mechanism to provide us evidence about the state of our product and software. The device is streaming user data without guarantee for its software configuration.
What guarantee do we have on day 41 or even at the end of day 1 that the software we "securely booted" is still the same?
Here are two real-life examples of why this question is so important:
Building Management Systems make decisions on how to control the heating based on the environment data from our IoT sensors. Without assurance about the current software configuration, we do not know if the temperature data received from our IoT sensors are valid. So, the whole decision-making process is compromised. This creates risk for the visitors of shopping malls, workers at office and industrial buildings.
The same risk exists for passengers of modern elevators because the motor and door control also rely on sensor data. Japan even introduced a regulation for an extra auxiliary door sensor. But this does not address the issue of cyber-security of the elevator control system.

THE RISK: Once started, IoT devices run for months, even years without a reboot.
What will happen, when our colleagues make a wrong configuration change?
Currently, we rely on our control rules or 'AI' to catch the change in system behavior. At the same time, we would want to know about system changes, regardless if we have a good set of rules and regardless if we have layers of machine learning. It would be best for us to have a sign of any changes in the system configuration as soon as they occur.
What can we do when a cybercriminal tampers with our sensors configuration to feed us invalid data?
This is the big question. Similar concern created "Secure Boot" and now we have guarantee that the system is (at least) starting from a good known configuration. Why do not we have such a mechanism during normal device operations?
Probably we can make our systems restart every minute, so they execute "Secure Boot" and guarantee their good known state, but this would be inefficient, to say the least.

There is an existing technology called Trusted Computing(TC) that gives us mechanisms to ensure system integrity. So far, only enterprise business and big tech had the experts and know-how to use TC technologies. This is now changing due to the increase of cyber-security challenges in IoT adoption.
More than ever, we see IoT devices include a Hardware Security Module(HSM).
Unfortunately, the most used type of HSM is Secure Element. They are used for secure communication(TLS), but this does not provide our products with system integrity.
Instead, Trusted Computing technologies use an HSM called Trusted Platform Module (TPM). It allows the generation of hardware-based evidence about the system state and they can not be tampered by software. Using evidence from the TPM we can do regular integrity checks and protect our IoT device software and system configuration.
With the rise of system complexity and the number of sensors connected, this risk becomes greater and the challenge more present.
The issue is obvious, we have awareness about the state of IoT products only at their start.
We can all agree that our customers and systems need continuous security measures, so why did we adopted "Secure Boot" and stopped there?
We are entering a new phase of Trusted Computing applications and development. Welcome to the new TPM Developer community where we will find solutions to the challenges IoT adoption creates. Together we can increase the level of system integrity in our new IoT products.
For overview of the technology stack you could visit our website TPM.dev and for the latest announcements you can also follow us on Linkedin.
All ideas and comments are welcomed!
Dimi
#Tutorials👍
4❤️
👍
💡
👏
😂
Explore More Posts
The latest tpm2-tools 5.8 release addresses three GitHub security advisories. One is a heap overflow in tpm2_getekcertificate, and the other is an out-of-bounds write that happens when too many sessions are in use. I don’t have information on the third advisory. Beyond the fixes, 5.8 extends EK certificate handling. It adds the option to read EK certificates from NV RAM, introduces new EK templates and supports a marshaled quote format. https://github.com/tpm2-software/tpm2-tools/releases/tag/5.8
Random Number Generator (TPM2)
1. IntroductionAmong other features, Trusted Platform Modules (TPM) comes with a True Random Number Generator (TRNG) that can be used for various applications including cryptographic purposes. This RNG module serves as the source for randomness for the TPM 2.0 Chip. A RNG module in TPM2 will typically contain the following -
An entropy source and collector
State Register
A mixing func.
There can be two types of calls to the TPM’s Random Number Generator, Internal call and External Call. RNG is capable to provide enough randomness for all the internal calls made. As well as, RNG is capable of providing 32 octets of randomness as per the specification to an external call. Another thing to note here is, each call made to the RNG produces a new value irrespective of the type of call. 1.1 The source of RandomnessThe source of entropy in the TPM is the entropy collector. As the name suggests, entropy collector collects entropy from entropy sources and also removes bias. A TPM2.0 has at least one internal source of entropy. These sources can include noise, clock variations, air movement amongst other events. As depicted in Fig 1.1 the entropy collector provides input to the State Register. 1.2 Stages involved Various algorithms and process supported by TPM calls RNG for unpredictable numbers, which is actually obtained from “RNG Protected Capability”. The “Deterministic Random Bit Generator (DRBG) Protected Capability“ obtains entropy from “Entropy Protected Capability”. Along with Entropy Protected Capability, TPM2_StirRandom() can also gather entropy from other entropy sources within the same TPM. 2. Random Numbers via TPM2 ToolsIf one needs to use TPM’s RNG for other external applications, then TPM2 Tools Command Line tools can be a great option. TPM2 Tools Command : tpm2_getrandom - - hex 16 - - hex : Converts output to hexadecimal 16 : Size in bytes Now, if one wants to have additional randomness, TPM2 Tools provides a convenient utility for this purpose called tpm2_stirrandom. To inject entropy via TPM2_StirRandom() to “Entropy Protected Capability” , we can use some file or use stdin. TPM2 Tools Command : echo -n “some_random_data” | tpm2_stirrandom Note : 128 bytes can only be injected using stdin at once through stirrandom() 3. ConclusionThe TPM2 provides in a sense True Random Numbers for use. These unpredictable numbers are coming from a dedicated hardware, hence can be trusted to be given as input to Crypto Algorithms amongst other applications. TPM2 also uses this for its internal use, and TCG claims it to be as secure as the strongest algorithm that TPM supports. Also, using the RNG is pretty straight forward via TPM2 Tools. #Tutorials



Comments
Start the Conversation
Nice article, but I disagree in one aspect:
You say that the solution in this field is the TPM, but most IoT devices can not use them. Due to the complexity of the TPM, it is needed the use …more