Abstract
Exploitability assessment of vulnerabilities is important for both defenders and attackers. The ultimate way to assess the exploitability is crafting a working exploit. However, it usually takes tremendous hours and significant manual efforts. To address this issue, automated techniques can be adopted. Existing solutions usually explore in depth the crashing paths, i.e., paths taken by proof-of-concept (PoC) inputs triggering vulnerabilities, and assess exploitability by finding exploitable states along the paths. However, exploitable states do not always exist in crashing paths. Moreover, existing solutions heavily rely on symbolic execution and are not scalable in path exploration and exploit generation. In this paper, we propose a novel solution to generate exploit for userspace programs or facilitate the process of crafting a kernel UAF exploit. Technically, we utilize oriented fuzzing to explore diverging paths from vulnerability point. For userspace programs, we adopt a control-flow stitching solution to stitch crashing paths and diverging paths together to generate exploit. For kernel UAF, we leverage a lightweight symbolic execution to identify, analyze and evaluate the system calls valuable and useful for exploiting vulnerabilities. We have developed a prototype system and evaluated it on a set of 19 CTF (capture the flag) programs and 15 realworld Linux kernel UAF vulnerabilities. Experiment results showed it could generate exploit for most of the userspace test set, and it could also facilitate security mitigation bypassing and exploitability evaluation for kernel test set.
Introduction: The Gap Between Crash and Control
In the world of cybersecurity, finding a bug is only half the battle. The real question for both defenders (prioritizing fixes) and attackers (launching exploits) is: Is this bug actually exploitable?
Traditionally, Automatic Exploit Generation (AEG) tools have relied heavily on symbolic execution. While powerful, symbolic execution suffers from "path explosion"—it gets bogged down by the sheer number of possible code branches. Furthermore, most existing tools only look at the "crashing path" (the specific sequence of instructions triggered by a PoC). However, a crash is often a "dead end" for an exploit. To gain control, an attacker often needs to steer the program toward a "diverging path" where the corrupted memory can be used to hijack control flow.
Methodology: Revery and FUZE
The authors propose two distinct solutions for userspace and kernel-level vulnerabilities:
Revery (Userspace)
Revery addresses userspace vulnerabilities through two primary techniques:
- Layout-oriented Fuzzing: Instead of using symbolic execution to find new paths, Revery uses a modified version of the AFL fuzzer. It prioritizes inputs that produce memory layouts similar to the original crash but explore different code branches.
- Control-flow Stitching: Once an exploitable state is found on a diverging path, Revery "stitches" it to the original crashing path. It uses lightweight symbolic execution to find a sub-path that connects the two, creating a unified exploitation path.
FUZE (Kernel UAF)
Specifically targeting Use-After-Free (UAF) bugs in the Linux kernel, FUZE varies the "context" (the system calls executed) between the time a memory object is freed and the time it is reused. This "under-context fuzzing" allows FUZE to identify how these different contexts can be used to bypass modern security mitigations like SMEP (Supervisor Mode Execution Protection) and SMAP (Supervisor Mode Access Prevention).
Key Insights and Ideas
- The "Weird Machine" Initialization: The paper leans into the theory that exploitation is the process of programming a "weird machine" created by a bug. The PoC often leaves this machine in a non-exploitable initial state; the goal of AEG should be to find a path to a "better" initial state.
- Fuzzing > Symbolic Execution for Exploration: The authors argue that fuzzing is far more scalable for finding diverging paths than symbolic execution, which often "gets blind" after concretizing symbolic values to handle memory allocations.
- Memory Layout as a Compass: A key insight is that code coverage isn't the best metric for exploit generation. Following the "layout-contributor" instructions—the specific code that allocates and structures the heap—is a much more effective way to guide a fuzzer toward exploitable states.
Key Results
- Revery Performance: Out of 19 CTF programs, Revery successfully generated working exploits for 9 (47%) and identified exploitable states for another 5. In contrast, the state-of-the-art tool Rex failed to solve any of them.
- Speed: Revery was, on average, 122% faster than standard AFL at finding the first diverging path and 247% faster at finding an exploitable state.
- FUZE Effectiveness: FUZE demonstrated that it could significantly diversify kernel exploits. For the 15 kernel CVEs, it generated 19 exploits capable of bypassing SMEP, whereas only 5 such exploits were publicly available previously.
Conclusion and Future Work
The current frameworks do not handle vulnerabilities that require an information leak to bypass ASLR (Address Space Layout Randomization) and still struggle with highly complex "Heap Feng Shui." Future directions include improving the symbolic execution engine and integrating more sophisticated program analysis to better understand complex heap behaviors. Despite these hurdles, Revery and FUZE represent a significant advancement in bridging the gap between a simple crash and a functional exploit.
Summary updated