AVL Function Table for LeafHooks Insertion With Obfuscated Control Flow Integrity
- 31 December 2024
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Computers
- Vol. 74 (4) , 1334-1347
Abstract
Control flow is the execution order of individual statements, instructions, or function calls within an imperative program. Malicious operation of control flow (e.g., tampering with normal function addresses) leads to severe consequences such as data leakage and system crash. Control Flow Integrity (CFI) is a defense restricting the execution order of program within Control Flow Graph (CFG). IndexHooks is an existing CFI solution designed against forward function calls tampering (including direct and indirect jump). This solution constructs a read-only linear function table that stores function addresses during compilation. Then, IndexHooks checks the table to make program jump to the correct target address during runtime. However, IndexHooks faces limitations in backtracking CFG construction, which can lead to excessive memory usage; the linear structure of the function table is vulnerable to brute force tampering. Addressing the limitations of IndexHooks, this study develops an obfuscated CFI solution called LeafHooks. LeafHooks is implemented during compilation by the LLVM compiler, which performs static analysis and instrumentation on the LLVM Intermediate Representation (IR) code of a program. We make the following three innovations: 1) we propose a speculation-free identification method for indirect function calls by linear traversing and analyzing codes to obtain legal function information (function address); 2) we save this information into a function table in the form of a Balanced Binary Tree (also known as AVL), enhancing the fuzzification of function addresses to defend against brute force; 3) we design a method to simulate control tamper attacks on ARM64 architecture to verify the ability of LeafHooks to protection. LeafHooks shows less overhead than state-of-the-art solutions and reduces 2.9% and 0.55% overhead on average using UnixBench and Phoronix, respectively.Keywords
Funding Information
- Guangxi Major Science and Technology Program (2023AA03006)
- Chongqing Major Science and Technology Program (CSTB2022TIAD-STX0001)
- Changsha Major Science and Technology Program (kh2401002)
- Natural Science Foundation of Chongqing Municipality (CSTB2022NSCQMSX1393, CSTB2022NSCQ-MSX108)
- National Natural Science Foundation of China (U24B20145, 62133014, 62321003, 62272155)
- Natural Science Foundation of Hunan Province (2022JJ10021)
This publication has 26 references indexed in Scilit:
- BCI-CFI: A context-sensitive control-flow integrity method based on branch correlation integrityInformation and Software Technology, 2021
- Blind Format String Attacks2015
- HeapTherapy: An Efficient End-to-End Solution against Heap Buffer Overflows2015
- Practical Timing Side Channel Attacks against Kernel Space ASLR2013
- Modeling and Evaluation of Control Flow Vulnerability in the Embedded System2010
- Comparison of LLVM and GCC on the ARM Platform2010
- A Dynamic Technique for Eliminating Buffer Overflow Vulnerabilities (and Other Memory Errors)2005
- LLVM: A compilation framework for lifelong program analysis & transformation2004
- Buffer overflow and format string overflow vulnerabilitiesSoftware: Practice and Experience, 2003
- Buffer overflows: attacks and defenses for the vulnerability of the decade2002