[Paper Review] Automatic Techniques to Systematically Discover New Heap Exploitation Primitives
ArcHeap is an automatic fuzzer-like tool that systematically discovers novel heap exploitation primitives by modeling common design patterns in modern heap allocators—binning, in-place metadata, and cardinal data—then exploring sequences of heap operations to identify exploitable behaviors. It discovered five previously unknown primitives in ptmalloc and several in other allocators, generating working proof-of-concept exploits as evidence.
Heap exploitation techniques to abuse the metadata of allocators have been widely studied since they are application independent and can be used in restricted environments that corrupt only metadata. Although prior work has found several interesting exploitation techniques, they are ad-hoc and manual, which cannot effectively handle changes or a variety of allocators. In this paper, we present a new naming scheme for heap exploitation techniques that systematically organizes them to discover the unexplored space in finding the techniques and ArcHeap, the tool that finds heap exploitation techniques automatically and systematically regardless of their underlying implementations. For that, ArcHeap generates a set of heap actions (e.g. allocation or deallocation) by leveraging fuzzing, which exploits common designs of modern heap allocators. Then, ArcHeap checks whether the actions result in impact of exploitations such as arbitrary write or overlapped chunks that efficiently determine if the actions can be converted into the exploitation technique. Finally, from these actions, ArcHeap generates Proof-of-Concept code automatically for an exploitation technique. We evaluated ArcHeap with real-world allocators --- ptmalloc, jemalloc, and tcmalloc --- and custom allocators from the DARPA Cyber Grand Challenge. ArcHeap successfully found 14 out of 16 known exploitation techniques and found five new exploitation techniques in ptmalloc. Moreover, ArcHeap found several exploitation techniques for jemalloc, tcmalloc, and even for the custom allocators. Further, ArcHeap can automatically show changes in exploitation techniques along with version change in ptmalloc using differential testing.
Motivation & Objective
- To address the ad-hoc, manual, and allocator-specific nature of heap exploitation primitive discovery, which hinders knowledge sharing across time and systems.
- To enable systematic, automated discovery of new heap exploitation primitives independent of underlying allocator implementations.
- To reduce the search space for exploitation primitive discovery by abstracting common design idioms in modern heap allocators.
- To generate minimal, working proof-of-concept (PoC) exploits as formal proof for each discovered primitive.
- To support both vulnerability research and mitigation development by providing test cases for security checks and regression testing.
Proposed method
- ArcHeap models modern heap allocators using three core abstractions: binning, in-place metadata, and cardinal data, to reduce search space.
- It performs fuzzer-like exploration by generating and mutating sequences of heap operations (e.g., malloc, free, chunk manipulation) and attack capabilities.
- A novel 'impact' evaluation mechanism assesses whether a test case can lead to exploitable outcomes like arbitrary write or overlapping chunks.
- It uses delta-debugging to minimize and reduce discovered test cases to minimal, equivalent PoCs for proof and reproducibility.
- The framework is evaluated on real-world allocators (ptmalloc, tcmalloc, jemalloc) and custom allocators from the DARPA Cyber Grand Challenge.
- The approach is designed to be extensible, allowing adaptation to non-conventional allocators by defining new models.
Experimental results
Research questions
- RQ1Can an automated system systematically discover new heap exploitation primitives across diverse heap allocator implementations without manual reverse engineering?
- RQ2How can the search space for heap exploitation primitive discovery be effectively reduced while maintaining coverage of novel, exploitable behaviors?
- RQ3To what extent can abstract models of common allocator design patterns (binning, in-place metadata, cardinal data) enable the discovery of previously unknown primitives?
- RQ4Can the framework generate minimal, working proof-of-concept exploits that validate the discovered primitives?
- RQ5How effective is the approach in identifying exploitable primitives in allocators with advanced security features like tcache?
Key findings
- ArcHeap discovered five previously unknown heap exploitation primitives in ptmalloc, demonstrating the feasibility of automated discovery in a widely used allocator.
- It identified multiple exploitable techniques in jemalloc and tcmalloc, including previously unknown attack vectors.
- The tool successfully generated working proof-of-concept (PoC) exploits for each discovered primitive, confirming their practicality.
- ArcHeap revealed that certain exploitation techniques remain effective across different versions of ptmalloc, highlighting their persistence despite security hardening.
- The framework uncovered that tcache in ptmalloc bypasses traditional security checks, rendering many legacy exploitation techniques obsolete and exposing new attack surfaces.
- The approach enables systematic analysis of security features' evolution and their impact on exploitability, supporting mitigation development and regression testing.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.