TL;DR
HCIC is a hardware-based security framework designed to stop "code-reuse attacks" (like ROP and JOP) by using Physical Unclonable Functions (PUFs) to verify a program's execution path. It offers robust protection with a negligible performance hit (under 1%) and, crucially, requires no changes to the compiler or the processor's instruction set.
What Problem Does This Paper Address?
Modern security relies heavily on Data Execution Prevention (DEP), which stops attackers from running their own malicious code. To bypass this, attackers developed Code Reuse Attacks (CRAs), such as Return-Oriented Programming (ROP) and Jump-Oriented Programming (JOP). Instead of injecting new code, they stitch together existing, legitimate code fragments (called "gadgets") to perform unauthorized actions.
Existing defenses, known as Control-Flow Integrity (CFI), try to ensure the program follows a pre-defined "map." However, software-based CFI is often too slow for production use, while previous hardware-based versions usually require modifying the compiler or the Instruction Set Architecture (ISA)—making them difficult to adopt. Some also suffer from "key leakage," where an attacker can figure out the secret keys used for protection.
Methods
The authors propose HCIC (Hardware-assisted Control-flow Integrity Checking), which uses two distinct mechanisms powered by a Physical Unclonable Function (PUF)—a hardware "fingerprint" that generates unique, secret keys.
- EHD Matching (for ROP): When a function is called, the hardware calculates an Encrypted Hamming Distance (EHD) between the return address and a secret PUF response. This EHD is pushed onto the stack alongside the return address. When the function returns, the hardware recalculates the EHD. If an attacker has overwritten the return address (a classic buffer overflow), the EHDs won't match, and the system triggers an alert.
- Linear Encryption/Decryption (for JOP): To stop jump-based attacks, HCIC XOR-encrypts the first instruction at every legitimate jump target when the program is loaded into memory. At runtime, the hardware decrypts these instructions on the fly. If an attacker tries to jump to an unauthorized "gadget," the hardware will attempt to decrypt a non-encrypted instruction, resulting in a crash or system error.
- Dynamic Key Updating: To thwart advanced "full-function reuse" attacks, the system can update the PUF-based keys dynamically, invalidating any previously recorded addresses an attacker might have harvested.
Datasets
The authors evaluated HCIC using several industry-standard suites:
- SPEC CPU2006, BioBench, MiBench, and Stream: Used to measure performance and binary size overhead.
- RIPE Benchmark: A specialized security testbed containing 850 different buffer-overflow attack scenarios.
- ROPGadget-v5.4: A tool used to scan binaries and identify potential gadgets available to an attacker.
Key Insights and Ideas
- PUF as a Root of Trust: By using PUFs, the secret keys are never stored in digital memory where they could be leaked; they are generated from the physical characteristics of the chip itself.
- Zero ISA/Compiler Changes: This is a major "aha" moment. By handling the encryption at the loader level and the verification in a dedicated hardware module, HCIC works with existing binaries. This removes the biggest barrier to hardware-CFI adoption.
- Separation of Concerns: Using different keys for ROP and JOP defenses ensures that even if an attacker manages to leak one key through a memory vulnerability, they cannot use it to bypass the other defense mechanism.
Key Results
- Negligible Overhead: The average runtime overhead is only 0.95%, and the increase in binary size is just 0.78%. This is significantly better than software-based CFI, which can slow programs down by over 20%.
- Total Gadget Elimination: In tests across multiple benchmarks, HCIC reduced the number of "allowed" ROP gadgets to zero (a 100% elimination rate).
- High Security Coverage: The system achieved an Average Indirect Target Reduction (AIR) of over 99.8%, effectively closing almost all unauthorized paths in the control-flow graph.
- Real-world Defense: HCIC successfully detected and stopped all applicable attacks in the RIPE benchmark suite.
Limitations and Future Work
- Non-Control Data Attacks: Like most CFI methods, HCIC does not prevent attacks that manipulate data values without changing the program's execution path (e.g., changing a "is_admin" flag from 0 to 1).
- Advanced C++ Attacks: The paper notes that HCIC is vulnerable to Counterfeit Object-Oriented Programming (COOP) which targets virtual functions. The authors suggest pairing HCIC with auxiliary protections like VTrust to mitigate this.
- Side-Channel Analysis: While PUFs are more resilient than stored keys, the authors acknowledge that future work is needed to test the system's resistance to sophisticated power or electromagnetic side-channel attacks on FPGAs.
Summary updated