Abstract
Dynamic binary analysis is critical for malware deconstruction, yet traditional in-process tools often suffer from fidelity issues due to memory address-space conflicts and high performance overhead. This paper presents HALF (Hollowing AnaLysis Framework), a novel binary analysis tool that achieves high-fidelity transparency through kernel-assisted process hollowing. By decoupling analysis logic into a mirrored container and utilizing exception-driven synchronization, HALF eliminates memory conflicts while outperforming traditional trackers by up to 15x.
The Fidelity-Performance Tension
Fine-grained analysis, such as Dynamic Taint Analysis (DTA), is essential for understanding complex exploits. However, most existing tools are "in-process," meaning the analysis logic and its associated shadow memory reside within the target program's memory space. This leads to a fundamental tension:
- Address-Space Conflicts: Modern exploits often rely on specific memory layouts, such as heap spraying. If an analysis tool pre-allocates shadow memory in these regions, the exploit fails or behaves atypically, rendering the analysis moot.
- Performance Overhead: Continuous checks for buffer capacity during recording add significant latency to the execution "hot-path."
Methods: The HALF Architecture
HALF addresses these issues by shifting from an in-process model to a decoupled, kernel-assisted architecture. Its design ensures "Address Space Invariance," a prerequisite for analyzing modern threats.
Core Components
- Kernel-Assisted Process Hollowing: HALF creates a "hollowed" container process that mirrors the target's memory layout exactly. This ensures pointers recorded in the target remain valid in the container without expensive translation.
- Zero-Check Recording: To minimize overhead, HALF eliminates standard "if-buffer-full" checks. Instead, it places a non-writable guard page at the end of the recording buffer. When the buffer overflows, it triggers a hardware Page Fault (#PF). The kernel monitor catches this exception, rotates the buffer, and resumes execution—moving the synchronization "tax" to rare, exception-driven events.
- Identical Physical Mapping: A Windows kernel driver maps shared regions (like record buffers and analysis code) into both the target and the container at identical virtual addresses.
- On-Demand Shadow Memory: Shadow memory in the container is only committed to physical RAM when actually accessed, preventing the massive memory bloat seen in tools like
libdft.
Key Results
Evaluation across SPEC CPU2017 benchmarks and real-world utilities demonstrated significant gains in both speed and fidelity:
- Performance: HALF consistently outperformed baseline recorders. On memory-intensive tasks like
x264, HALF reduced recording overhead by up to 15x. - Fidelity: In tests against six layout-sensitive exploits (e.g., CVE-2023-21608), traditional in-process tools caused 4 out of 6 to fail. HALF successfully maintained execution integrity for all 6 exploits.
- Memory Efficiency: For the
505.mcf_rbenchmark,libdft64required 950MB of shadow memory, whereas HALF's on-demand approach used only 2.5MB. - Malware Detection: HALF successfully identified a tainted control transfer in a Cobalt Strike beacon within 150ms of the first network packet.
Conclusion
HALF demonstrates that structural isolation is mandatory for analyzing modern, layout-sensitive threats. By leveraging hardware exceptions and kernel-level process manipulation, it provides a high-performance, high-fidelity alternative to traditional in-process analysis frameworks. Future work aims to further reduce the DBI footprint using hardware-assisted features like Intel Processor Trace (PT).
Summary updated