From Hardware Fingerprint to Access Token: Enhancing the Authentication on IoT Devices
Yue Xiao
Network and Distributed System Security (NDSS) Symposium 2024 · Day 3 · IoT & Firmware · IoT & Firmware
Overview
The rapid proliferation of consumer IoT devices has underscored an urgent need for robust device authentication and access control mechanisms. Unfortunately, many resource-constrained IoT devices still rely on inherently vulnerable token-based authentication, which is susceptible to token compromise attacks, allowing adversaries to impersonate devices and execute malicious operations. While hardware fingerprints offer a promising direction to enhance security, they introduce new challenges: sophisticated attackers can still bypass hardware authentication by training machine learning models to mimic valid fingerprints or by reusing leaked fingerprint data through Man-in-the-Middle (MitM) attacks.

Key moments
- 0:00 Introduction to MCU-Token and its motivation
- 1:10 MCU-Token's novel approach and three-fold contributions
- 2:00 Limitations of existing hardware-based authentication mechanisms
- 2:50 Understanding fingerprint mimic and reuse attacks
- 4:00 Summary of existing hardware authentication vulnerabilities
- 4:20 Defining the MCU-Token threat model and assumptions
From Hardware Fingerprint to Access Token: Enhancing the Authentication on IoT Devices
Speakers: Yue Xiao
Conference: NDSS Symposium
YouTube: https://www.youtube.com/watch?v=7yhUcNJPQ6M
Overview
The rapid proliferation of consumer IoT devices has underscored an urgent need for robust device authentication and access control mechanisms. Unfortunately, many resource-constrained IoT devices still rely on inherently vulnerable token-based authentication, which is susceptible to token compromise attacks, allowing adversaries to impersonate devices and execute malicious operations. While hardware fingerprints offer a promising direction to enhance security, they introduce new challenges: sophisticated attackers can still bypass hardware authentication by training machine learning models to mimic valid fingerprints or by reusing leaked fingerprint data through Man-in-the-Middle (MitM) attacks.
This talk introduces MCU-Token, a novel and secure hardware fingerprinting framework specifically engineered for Microcontroller Unit (MCU)-based IoT devices. MCU-Token is designed to ensure authentication security even in scenarios where traditional cryptographic mechanisms, such as private keys, have been compromised. Its core innovation lies in binding hardware fingerprints to specific request payloads and strategically injecting poisoned data to defeat advanced machine learning-based mimicry attacks.
The significance of MCU-Token is substantial. It addresses critical security gaps in current IoT authentication paradigms, offering a lightweight yet powerful solution that can be easily integrated into existing devices by simply appending a short hardware fingerprint-based token to the request payload. Through its unique combination of message mapping and data poisoning, MCU-Token effectively defends against replay, crafting, offloading, and both hardware and software-based mimicry attacks, demonstrating high accuracy (over 97%) and low overhead across a wide range of IoT devices and application scenarios.
Background
▶ Watch: Introduction to MCU-Token and its motivation (0:00)
The landscape of hardware-based authentication for IoT devices has seen various proposals, broadly categorized into two main types. The first leverages Hardware Fingerprints as New Device Identifiers, where unique, hardware-derived data serves as a static identifier to distinguish devices. Examples include physical signal characteristics, magnetic properties, and sensor data influenced by human interaction. The second type involves Hardware-Involved Challenge-Response Authentication Protocols, which use diverse challenges as input to hardware features to generate variable responses. A classic example is the arbiter Physically Unclonable Function (PUF), where challenge-response pairs (CRPs) are collected during enrollment and stored on a server or learned by machine learning (ML) models.
Despite these advancements, existing approaches face significant vulnerabilities, particularly in IoT environments where Man-in-the-Middle (MitM) attacks are a prevalent concern. Resource constraints often prevent the secure implementation of TLS/SSL, or devices may even communicate unencrypted. Under such insecure communication channels, two primary attack vectors emerge:
- Fingerprint Mimic Attacks: Attackers attempt to replicate hardware characteristics. While no two integrated circuits (ICs) are truly identical, and micro-hardware features can differentiate them, software-based ML approaches pose a significant threat. Adversaries can eavesdrop on challenge-response pairs, train an ML model to learn the underlying mapping, and then generate forged responses to bypass authentication. For instance, features used by protocols like IoT-ID 56 have been shown to be mimickable with high accuracy after attackers collect fewer than 10 unique fingerprints. Hardware mimic attacks, using identical or similar hardware, also pose a threat, though inherent IC-level variations make exact replication difficult.
- Fingerprint Reuse Attacks: In insecure channels, MitM attackers can eavesdrop and replay existing requests, a common vulnerability in RFID and BLE car key fobs. They can reuse valid fingerprints, offload server challenges to legitimate devices to obtain valid responses, or even modify command data (e.g., changing "turn on light" to "open door") while reusing compromised authentication data.
Many existing hardware-based solutions are vulnerable to both mimic and reuse attacks. Signal-based approaches may resist mimic attacks but are limited to wireless devices. Furthermore, many solutions demand dedicated hardware features like magnetic sensors, NAND-Flash, or Trusted Execution Environments (TEEs), which are not commonly supported by Commercial-Off-The-Shelf (COTS) MCUs. PUF-based approaches often require specialized IC fabrication processes, making them less practical for widespread IoT adoption. IoT-ID 56, while supporting general MCU-based devices, relies on static identifiers, rendering it vulnerable to token compromise. MCU-Token directly addresses these critical limitations by providing a robust, software-based solution compatible with COTS MCUs that can withstand both mimicry and reuse attacks.
The threat model assumed for MCU-Token involves an adversary who has compromised the communication channel, allowing them to eavesdrop, intercept, and manipulate requests and responses. Crucially, the attacker is also assumed to have stolen existing access control tokens and compromised any encryption or signing mechanisms. The attacker's goal is to impersonate legitimate devices to perform malicious operations, such as unlocking a car or spoofing smart home events. MCU-Token operates under the assumption of a secure training environment (e.g., during manufacturing) and an uncompromised IoT device.
Key Findings
▶ Watch: Limitations of existing hardware-based authentication mechanisms (2:00)
MCU-Token presents three pivotal contributions that collectively enhance IoT device authentication:
- Systematic Study of Hardware Features for COTS MCUs: The research conducted a thorough investigation into six common hardware features available on COTS MCUs: DAC/ADC (Digital-to-Analog Converter / Analog-to-Digital Converter), FPU (Float Point Unit), PWM (Pulse Width Modulation), RTCFre (Real Time Clock Frequency), RTCPha (Real Time Clock Phase), and SRAM (Static Random-Access Memory). This systematic study explored the theoretical underpinnings of their hardware uniqueness and experimentally validated their discriminative power. An ensemble approach, combining the most effective features, achieved a remarkable 98.47% True Positive Rate (TPR) and 1.06% False Positive Rate (FPR) on ESP32S2 devices, demonstrating highly accurate device identification.
- Novel ML-Resistant Hardware Fingerprint-Based Authentication Mechanism: MCU-Token introduces an innovative authentication mechanism that fundamentally departs from reliance on traditional cryptographic security. Its design incorporates two core security mechanisms:
- Message Mapping: This technique binds hardware fingerprints directly to specific request payloads by autonomously generating unique hardware tasks based on the message digest of the request. This prevents fingerprint reuse and impersonation.
- Data Poisoning: To defeat sophisticated machine learning-based mimicry attacks, MCU-Token strategically mixes valid fingerprints with poisoned data. This makes it infeasible for attackers to train usable models with leaked tokens, as the injected noise significantly degrades the model's ability to predict raw, unpoisoned fingerprints. The evaluation showed that when noise levels exceeded 0.08, the TPR for poisoned fingerprints dropped to less than 2%, effectively preventing their authentication.
- Extensive Evaluation and Demonstrated Practicality: MCU-Token was prototyped and rigorously evaluated on 60 IoT devices across three distinct types (ESP32S2, STM32F103, STM32F429) and three real-world scenarios: PKE/BLE key fobs, smart home sensors, and FIDO-U2F hardware tokens.
- Robustness: The system demonstrated strong immunity against various adaptive attacks, including hardware mimicry (success rates less than 11% even with identical models), software mimicry (attack success rates around 1% when normal and poisoned pairs were equally mixed), tampering (success rates less than 1% with a 10,000 output space), replay, and relay attacks.
- Low Overhead: MCU-Token proved to be practical and lightweight, incurring an average energy consumption overhead of less than 4% and an additional authentication time of less than 115ms for 8 fingerprints, making it suitable for resource-constrained IoT devices.
Technical Deep Dive
▶ Watch: Understanding fingerprint mimic and reuse attacks (2:50)
MCU-Token's robust security architecture is anchored by its client-side component, deployed on MCU-based IoT devices, and a backend verification module, which can reside on another device or in the cloud. The system's core innovation lies in its Message Mapping and Data Poisoning mechanisms, complemented by a systematic approach to leveraging inherent hardware features.
System Design and Architecture
When a sensitive request is initiated, the client runtime on the IoT device generates a hardware fingerprint-based access token. This token is unique because it mixes multiple valid fingerprint values with strategically injected poisoned results. The backend then verifies this token by comparing the received fingerprints against its independently predicted values.
Message Mapping
The primary goal of Message Mapping is to bind hardware fingerprints to specific requests, thereby preventing reuse attacks. Instead of static device identifiers, MCU-Token generates non-repetitive fingerprints for each request. This is achieved through a one-round protocol where the client autonomously generates challenges (task arguments) from the request's message digest. This design prevents attackers from impersonating the backend or reusing previously captured fingerprints.
Algorithm 1 details this process:
A request comprises an operation, a nonce (e.g., a random number or increasing sequence number), and several payloads. For each request, the payloads are divided into totalNum groups. For each group i, three hash digests are computed:
h1: Based on the operation, nonce, and the digest from the previous round.h2: Based on the nonce and thei-th payload from the beginning of the group.h3: Based on the nonce and thei-th payload from the end of the group.
These hashes (h1, h2, h3) are concatenated, and an additional hash calculation generates the digest for the current round. Specific segments of this digest then form the arguments for the corresponding hardware tasks. This design establishes a strong correlation between the payload content and the hardware task arguments, exponentially increasing the output space and significantly reducing the probability of collisions, making tampering practically infeasible.
Data Poisoning
To effectively counter sophisticated machine learning (ML) attacks, MCU-Token employs a novel Data Poisoning strategy. The objective is to prevent attackers from collecting sufficient valid fingerprints to train accurate predictive models. This is achieved by randomly mixing poisoned results into the responses sent by the client. These poisoned fingerprints must satisfy three critical requirements:
- Verifiability: The backend must be able to successfully authenticate the poisoned fingerprints by comparing them against the raw, unpoisoned ones.
- Dissimilarity: Poisoned fingerprints must significantly deviate from the raw ones to prevent attackers from learning genuine hardware fingerprint features.
- Unidentifiability: The injected noise in poisoned fingerprints should be difficult for advanced ML techniques to identify or remove.
To meet these requirements, a portion of the raw fingerprints are retained as "normal" fingerprints for backend authentication. For the remaining fingerprints, random noise is added. Specifically, for a given pair of (arguments, raw fingerprint fp_raw), the poisoned fingerprint fp_poisoned is calculated using Equation 2:
fp_poisoned = fp_raw * (noise + 1) + C
where C is a constant and noise is randomly sampled from distributions like Laplace. This ensures the noise is slightly larger than inherent hardware errors, enhancing dissimilarity while maintaining stealth.
Selecting Hardware Features
MCU-Token's efficacy relies on leveraging common, uniquely variable hardware features present in COTS MCUs. The researchers investigated six modules on STM32F4 series MCUs, examining datasheets for theoretical evidence of IC-level variation and conducting experiments to validate output ranges and discrimination ability:
- DAC/ADC (Digital-to-Analog Converter / Analog-to-Digital Converter): Each ADC exhibits distinct biases. By generating multiple analog signals via DAC, variations in ADC outputs are induced. The mapping
V_ADC = V_DAC * (2^res_ADC - 1) / (2^res_DAC - 1)is not perfectly linear, and its density distribution varies across devices, providing unique fingerprints. - FPU (Float Point Unit): FPU performance varies among devices. Diverse computing tasks are used to assess and differentiate devices based on their floating-point arithmetic capabilities.
- PWM (Pulse Width Modulation): PWM regulates power levels. By measuring accumulated power over specific time intervals at different frequencies, MCUs can be differentiated based on discrepancies in observed accumulation.
- RTC (Real Time Clock): RTCs rely on crystal oscillators, which have fixed drifts.
RTCFresets timers with diverse frequencies to record accumulated time drift.RTCPhameasures instantaneous phase between dual clocks (main and peripheral). - SRAM (Static Random-Access Memory): The initial states of SRAM cells are stable and can serve as a PUF. Statistical features are derived from initial bit states within specified SRAM address ranges during device boot-up.
- Flash: Unlike NAND-Flash, NOR-Flash (common in MCUs) sectors exhibit similar read times. Therefore, instead of static fingerprints, MCU-Token manipulates settings or inputs to generate varying fingerprints from these features. Each feature acts as a fingerprinting task, producing multiple results with different input arguments.
Verifying Fingerprints at Backend
The backend authentication process involves several key steps:
- Task Generation: Upon receiving a client request, the backend independently uses the same message mapping algorithm (Algorithm 1) to generate
totalNumtasks, each comprising an (arguments, fingerprint) pair. - Fingerprint Prediction: The backend's predictor, which consists of regression models (e.g., ExtraTrees) trained for each task and client, predicts the corresponding raw fingerprints based on the generated task arguments.
- Verification: A verifier, composed of binary classifiers (e.g., RandomForest) trained for each sub-predictor, checks if the predicted raw fingerprints match the client's received (potentially poisoned) fingerprints. Authentication succeeds if the number of matched fingerprints exceeds a predefined
acceptNumthreshold. The unpoisoned raw fingerprints from the client will match the predicted ones, ensuring successful authentication. - Replay/Relay Attack Prevention: The backend maintains a timestamp or sequence number for requests to prevent replay attacks. For wireless signals, it can measure message round-trip time and compare it with predicted times to detect relay attacks.
- Result Return: The backend returns the authentication result to the client.
Demo / Proof of Concept
▶ Watch: Summary of existing hardware authentication vulnerabilities (4:00)
The feasibility and performance of MCU-Token were demonstrated through a comprehensive prototype implementation and extensive evaluation.
Implementation Details
Client-side Implementation:
- The client runtime was developed in approximately 3900 lines of C code.
- It was implemented and evaluated on 60 MCU-based devices, encompassing three types: 30 ESP32S2 (Xtensa LX7, 240MHz), 20 STM32F103 (Cortex M4, 72MHz), and 10 STM32F429 (Cortex M4, 180MHz).
- All six identified hardware features (DAC/ADC, FPU, PWM, RTCFre, RTCPha, SRAM) were deployed and utilized on these devices for fingerprint generation.
Backend-side Implementation:
- The backend authentication service was implemented in Python, consisting of approximately 1200 lines of code.
- It was deployed on a Windows 10 PC with 16 GB RAM and a 2.8 GHz CPU, communicating with client devices via serial ports.
- For fingerprint prediction, ExtraTrees regression models were employed.
- For verification, RandomForest classification models were used. Both models were implemented using the Scikit-learn 47 library.
- The APHash 2 function was used for hash calculations in Algorithm 1.
- For data poisoning, the noise component was sampled from a uniform distribution between 0.08 and 0.2, and the constant
C(from Equation 2) was empirically set to 1. - During model training, 5,000 pairs of (arguments, fingerprint) data were collected for each device and hardware feature. Half of this data was used for training regression models, and the other half for testing. For training classification models, 10 other devices were randomly sampled as negative examples.
Case Studies
MCU-Token's practicality and minimal overhead were further validated through case studies in three typical IoT scenarios:
- Smart Home: An STM32F429 device, configured as an IoT temperature sensor, reported data to trigger automation rules (e.g., "if temperature > 32C, open window"). MCU-Token integrated 4 fingerprints into the token, balancing security and energy consumption, to verify the legitimacy of the temperature data source.
- PKE/BLE Key Fob: An ESP32S2 device implemented a Passive Keyless Entry (PKE) rolling code mechanism, which is typically vulnerable to cryptographic attacks or code reuse. MCU-Token generated the access token based on the command, using the rolling code as the nonce. By adding only 2 fingerprints (32 bits) to the existing payload, it prevented cryptographic and relay attacks. For BLE key fobs using RSA, more fingerprints (e.g., 8) could be used.
- Hardware Security Token (HST) for FIDO-U2F: An STM32F103 device served as an HST for a FIDO-U2F (Fast IDentity Online - Universal 2nd Factor) service, where paramount security is required. The FIDO-U2F counter was used as the nonce for message mapping. MCU-Token generated 8 fingerprints, with half of them poisoned, and added this token as extra information in the attestation certificate, effectively preventing cloning attacks even if private keys were stolen.
The overhead analysis demonstrated that MCU-Token incurred an extra energy consumption of less than 4% on average compared to a baseline of default token-based authentication using AES encryption. The additional authentication time was reasonable, measuring less than 31ms for 2 fingerprints and less than 115ms for 8 fingerprints on average. These results underscore MCU-Token's suitability for resource-constrained IoT environments.
Defensive Implications
▶ Watch: Defining the MCU-Token threat model and assumptions (4:20)
MCU-Token provides a robust defense against a wide array of adaptive and sophisticated attacks targeting IoT device authentication, particularly those leveraging compromised communication channels and machine learning.
Countering Fingerprint Mimic Attacks
- Hardware Mimic Attack: Even if an adversary acquires devices of the same or similar brand and model as the victim, MCU-Token effectively resists impersonation. The framework leverages intrinsic hardware features that exhibit unique variations across individual devices, even within identical models. These distinctive fingerprint patterns enable the backend to identify and reject unauthorized devices. Evaluation showed that success rates for hardware mimic attacks were extremely low, less than 11% even when using the same brand and model (e.g., ESP32S2 impersonating ESP32S2), and less than 0.01% for different device models.
- Software Mimic Attack (Machine Learning Attacks): This is a critical threat where attackers eavesdrop on communications, collect (requests, fingerprints) pairs, and train ML models to forge new fingerprints. MCU-Token's data poisoning strategy is specifically designed to counteract this. By injecting random, carefully crafted noise into raw hardware fingerprints, the system prevents attackers from learning the correct, underlying relationships between requests and legitimate fingerprints. The noise is designed to be random and stealthy, making it difficult for adversaries to identify, isolate, or remove using advanced ML techniques. Quantitative analysis demonstrates that the attacker's predicted fingerprints will deviate significantly from the original if the noise is sufficiently large, leading to rejection by the backend. When the number of normal (unpoisoned) pairs obtained by an attacker was low, and the attacker attempted output correction, the success rate could be up to 32.3%. However, when the number of normal and poisoned pairs was balanced (e.g.,
usedNumclose tototalNum), the attack success rate dropped to around 1%, regardless of the attacker's strategy. Furthermore, software-based ML methods struggled to identify poisoned fingerprints, achieving maximum identification accuracy of only around 54%, barely better than random guessing.
Countering Fingerprint Reuse Attacks
- Replay Attack: MCU-Token's message mapping algorithm ensures that any alteration to the request payload results in different fingerprints. By incorporating a nonce (e.g., a random number or increasing sequence number) into the message mapping, the backend can record the last valid nonce and effectively reject repeated requests, thus preventing replay attacks.
- Relay Attack: For wireless devices, MCU-Token can measure the request's round-trip time to detect signal relay, similar to existing techniques. For network-based requests, the one-round protocol ensures that requests are client-initiated, preventing attackers from merely offloading server challenges to legitimate devices.
- Tampering Attack: If an attacker attempts to tamper with request contents (e.g., changing commands) while trying to retain valid fingerprints, MCU-Token detects this with high probability. The message mapping algorithm tightly binds the request content to its fingerprints. Any modification to the request content will lead to significantly different hardware tasks being generated on the server and client sides, resulting in a mismatch during verification. The algorithm exponentially increases the difficulty for attackers to manipulate requests while maintaining valid fingerprints. For example, with an output space of 10,000 for ESP32S2, the attack success rate was less than 1%, requiring an exceptionally high number of attempts. The use of multiple linked hash digests (h1, h2, h3) dramatically reduces the probability of a successful collision.
Key Takeaways
- Vulnerability of Token-Based Auth: Traditional token-based authentication on resource-constrained IoT devices is highly susceptible to compromise and impersonation, even with cryptographic mechanisms.
- Novel ML-Resistant Framework: MCU-Token introduces a unique hardware fingerprinting framework that employs message mapping to bind fingerprints to requests and data poisoning to defeat sophisticated machine learning mimicry attacks.
- Leveraging COTS MCU Features: The system systematically identifies and utilizes inherent variations in common hardware features (DAC/ADC, FPU, PWM, RTC, SRAM) on COTS MCUs to generate unique device fingerprints, achieving high accuracy (98.47% TPR).
- Robust Against Adaptive Attacks: MCU-Token effectively defends against a broad spectrum of attacks, including hardware and software (ML-based) mimicry, as well as replay, relay, and tampering attacks, even when cryptographic keys are compromised.
- Practicality with Low Overhead: The framework is lightweight and practical, demonstrating minimal overhead (less than 4% energy, less than 115ms time for 8 fingerprints) across various real-world IoT scenarios like smart home sensors, key fobs, and FIDO-U2F tokens.
- Future-Proofing IoT Security: MCU-Token offers a significant step towards securing the expanding IoT ecosystem by providing a flexible and robust authentication mechanism that is resilient to evolving threats and compatible with existing hardware.
About the Speaker(s)
The speaker for this presentation is Yue Xiao. The provided transcript and metadata do not include specific details regarding their title or company affiliation.
All talks from Network and Distributed System Security (NDSS) Symposium 2024