LightFAt: Mitigating Control-Flow Explosion via Lightweight PMU-Based Control-Flow Attestation

Jeferson González-Gómez, Hassan Nassar, Lars Bauer, Jörg Henkel

Abstract

Traditional Control-flow Attestation (CFA) schemes face a significant scalability challenge known as "control-flow explosion," where the computational cost of tracking every possible execution path in complex software becomes prohibitive. This paper introduces LightFAt, a lightweight remote attestation scheme that replaces expensive cryptographic hashing with hardware-level performance metrics and unsupervised machine learning. By leveraging the CPU's Performance Monitor Unit (PMU) to track metrics such as Instructions Per Cycle (IPC) and L1 cache accesses, LightFAt identifies control-flow hijacks with high accuracy (95.62%) while maintaining a negligible performance overhead of 1.26%.

1. Introduction

In remote computing environments, such as the Internet of Things (IoT) and cloud services, Remote Attestation (RA) is essential for verifying the integrity of a remote device (the prover). While static attestation ensures that the stored binary has not been altered, Control-flow Attestation (CFA) is required to detect runtime attacks like return-oriented programming (ROP) or code injection.

However, existing CFA solutions often rely on calculating cryptographic hashes for every node in a program's Control-Flow Graph (CFG). In complex applications, the number of potential execution paths grows exponentially—a phenomenon termed "control-flow explosion." This results in performance overheads ranging from 100x to 1000x, rendering traditional CFA impractical for high-performance or real-time systems.

2. The LightFAt Architecture

LightFAt proposes a paradigm shift: moving from deterministic cryptographic verification to behavioral anomaly detection. The system architecture consists of three primary components: hardware monitoring, an attestation protocol, and a machine learning-based verifier.

2.1 PMU-based Monitoring

Instead of software-based instrumentation, LightFAt utilizes the CPU’s built-in Performance Monitor Unit (PMU). The PMU tracks hardware-level events that are inherently tied to the execution flow of a program. Specifically, LightFAt monitors:

  • Instructions Per Cycle (IPC): Reflects the efficiency and nature of the instruction stream.
  • L1 Cache Accesses: Captures the memory access patterns of the executing code.

Because these metrics are collected at the hardware level, the impact on the application's execution speed is minimal.

2.2 Attestation Flow

The attestation process follows a challenge-response model:

  1. Challenge: The verifier sends a trigger point to the prover.
  2. Execution & Collection: The prover executes the application. Upon reaching the trigger, a monitoring service records PMU data for a predefined window (e.g., 300ms).
  3. Reporting: The prover signs the collected PMU traces and transmits them back to the verifier.
  4. Verification: The verifier uses a pre-trained model to classify the trace as "normal" or "abnormal."

3. Unsupervised Anomaly Detection

To handle the diversity of potential attacks without requiring a database of known exploits, LightFAt employs the Local Outlier Factor (LOF) algorithm. LOF is an unsupervised machine learning model that learns the "fingerprint" of normal software execution. By training only on benign execution traces, the model can identify any deviation—such as those caused by injected code or skipped nodes—as a potential hijack. This approach provides inherent resilience against zero-day vulnerabilities.

4. Evaluation

4.1 Experimental Setup

The authors evaluated LightFAt using a custom vulnerable application simulating an IoT heart rate monitor. The application contained a buffer overflow vulnerability in its configuration stage. Testing was conducted on an AMD Ryzen 7 2700X system running CentOS 7. The dataset comprised 1,500 normal execution traces and 1,500 attack traces, including code injection and node-skipping attacks.

4.2 Performance and Accuracy

LightFAt demonstrated strong security properties and exceptional efficiency:

  • Detection Accuracy: The system achieved a 95.62% accuracy rate in distinguishing attacks from normal operations.
  • Security Reliability: The False Negative Rate (FNR) was limited to 1.18%, ensuring that the vast majority of hijacks are successfully intercepted.
  • Overhead: The prover-side performance penalty was measured at just 1.26%. This stands in stark contrast to state-of-the-art tracing solutions, which can incur overheads as high as 3,600%.
  • Verifier Efficiency: The verifier can classify a trace in approximately 3.3 microseconds, enabling near-real-time monitoring of remote assets.

5. Discussion and Limitations

LightFAt represents a trade-off between absolute cryptographic certainty and practical usability. While it does not offer the 100% deterministic guarantees of hashing-based CFA, its minimal overhead makes it viable for real-world deployment where traditional methods fail.

Currently, the system assumes a remote attacker and does not account for physical tampering with the PMU hardware. Furthermore, it is intended to complement static attestation rather than replace it, as it assumes the underlying code memory remains unmodified. Future research may explore extending this lightweight approach to "Swarm Attestation," where groups of IoT devices collaboratively monitor one another's integrity.

6. Conclusion

LightFAt successfully addresses the control-flow explosion problem by decoupling attestation overhead from the complexity of the program's control-flow graph. By leveraging hardware performance counters and unsupervised learning, it provides a scalable, high-accuracy solution for protecting complex remote systems against modern control-flow hijacking attacks.

Summary updated

BibTeX
@inproceedings{gonzalezgomez2024lightfat,
  author = {Jeferson González-Gómez and Hassan Nassar and Lars Bauer and Jörg Henkel},
  title = {{LightFAt: Mitigating Control-Flow Explosion via Lightweight PMU-Based Control-Flow Attestation}},
  booktitle = {HOST},
  year = {2024},
  doi = {10.1109/host55342.2024.10545348},
}
Figure