ReForker: Patching x86_64 Binaries with the Fork Server to Improve Hardware-Assisted Fuzzing through Trampoline-Based Binary Rewriting
Open Access
- 16 June 2023
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 235-240
Abstract
Coverage-based Greybox Fuzzing (CGF) is an efficient technique for detecting software vulnerabilities. However, efficient compile-time instrumentation utilized by some fuzzers is not available in testing closed-source binary. Therefore, researchers have proposed hardware-assisted fuzzing to address this. Though enhancing the efficiency in rebuilding coverage, hardware-assisted fuzzing performs poorly on some binaries due to the absence of the fork server, which is an efficient mechanism in modern fuzzers. The program patched with the fork server goes through initialization stages only once during repeated testing, which can significantly improve fuzzing performance. However, existing hardware-assisted fuzzers cannot place the fork server in some (statically linked) binaries. In this paper, we propose ReForker, a trampoline x86_64 binary rewriter to instrument the binary with the fork server for improving the efficiency of hardware-assisted fuzzing. Different from some rewriters in CGF, ReForker focuses on additive instrumentation and is not limited by symbolic information or Position-Independent Executable (PIE) code. It searches the sections in ELF for an executable one as the trampoline section, to insert the fork server. Then ReForker rewrites the instruction storing the address of the main function to redirect the control flow to the fork server, avoiding disturbing the layout of the original code and data sections. The evaluation shows that ReForker effectively works on real-world programs, including statically linked, PIE, and stripped binaries, with only increasing the file size by 4KB and introducing negligible runtime overhead on SPEC INT2006.Keywords
Funding Information
- Natural Science Foundation of Hunan Province of China (No.2021JJ40692)
- National Key Research and Development Program of China (2021YFB0300101)
- National University of Defense Technology Foundation (Nos. ZK20-09)
- National Natural Science Foundation China (62272472)
This publication has 12 references indexed in Scilit:
- StochFuzz: Sound and Cost-effective Fuzzing of Stripped Binaries by Incremental and Stochastic Rewriting2021
- WINNIE : Fuzzing Windows Applications with Harness Synthesis and Fast Cloning2021
- Binary rewriting without control flow recovery2020
- RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization2020
- LearnAFL: Greybox Fuzzing With Knowledge EnhancementIEEE Access, 2019
- PTrix2019
- PTfuzz: Guided Fuzzing With Processor Trace FeedbackIEEE Access, 2018
- Fuzzing: State of the ArtIEEE Transactions on Reliability, 2018
- Angora: Efficient Fuzzing by Principled Search2018
- Fuzz testing in practice: Obstacles and solutions2018