APICraft: Fuzz Driver Generation for Closed-source SDK Libraries
Cen Zhang, Xingwei Lin, Yuekang Li, Yinxing Xue, Jundong Xie, Hongxu Chen, Xinlei Ying, Jiashui Wang, Yang Liu
摘要
Fuzz drivers are needed for fuzzing libraries. A fuzz driver is a program which can execute library functions by feeding them with inputs provided by the fuzzer. In practice, fuzz drivers are written by security experts and the drivers' quality depends on the skill of their authors. To relieve manual efforts and ensure test quality, different techniques have been proposed to automatically generate fuzz drivers. However, existing techniques mostly rely on static analysis of source code, leaving the fuzz driver generation for closed-source SDK libraries an open problem. Fuzz driver generation for closed-source libraries is faced with two major challenges: 1) only limited information can be extracted from the library; 2) the semantic relations among API functions are complex yet their correctness needs to be ensured. To address these challenges, we propose APICRAFT, an automated fuzz driver generation technique. The core strategy of APICRAFT is collectcombine. First, APICRAFT leverages both static and dynamic information (headers, binaries, and traces) to collect control and data dependencies for API functions in a practical manner. Then, it uses a multi-objective genetic algorithm to combine the collected dependencies and build high-quality fuzz drivers. We implemented APICRAFT as a fuzz driver generation framework and evaluated it with five attack surfaces from the macOS SDK. In the evaluation, the fuzz drivers generated by APICRAFT demonstrate superior code coverage than the manually written ones, with an improvement of 64% on average. We further carried out a long-term fuzzing campaign with the fuzz drivers generated by APICRAFT. After around eight month's fuzzing, we've so far discovered 142 vulnerabilities with 54 assigned CVEs in macOS SDK, which can affect popular Apple products such as Safari, Messages, Preview and so on.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 28 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Prompt Fuzzing for Fuzz Driver Generation 引用了 Angora: Efficient Fuzzing by Principled Search
- Prompt Fuzzing for Fuzz Driver Generation 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Windranger: A Directed Greybox Fuzzer driven by Deviation Basic Blocks 引用了 Hawkeye: Towards a Desired Directed Grey-box Fuzzer
- Windranger: A Directed Greybox Fuzzer driven by Deviation Basic Blocks 引用了 Angora: Efficient Fuzzing by Principled Search
- Windranger: A Directed Greybox Fuzzer driven by Deviation Basic Blocks 引用了 Evaluating Fuzz Testing
- Windranger: A Directed Greybox Fuzzer driven by Deviation Basic Blocks 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Skyfire: Data-Driven Seed Generation for Fuzzing 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Efficient greybox fuzzing of applications in Linux-based IoT devices via enhanced user-mode emulation 引用了 Skyfire: Data-Driven Seed Generation for Fuzzing
- Efficient greybox fuzzing of applications in Linux-based IoT devices via enhanced user-mode emulation 引用了 Hawkeye: Towards a Desired Directed Grey-box Fuzzer
- Efficient greybox fuzzing of applications in Linux-based IoT devices via enhanced user-mode emulation 引用了 Angora: Efficient Fuzzing by Principled Search
- Efficient greybox fuzzing of applications in Linux-based IoT devices via enhanced user-mode emulation 引用了 Evaluating Fuzz Testing
- Efficient greybox fuzzing of applications in Linux-based IoT devices via enhanced user-mode emulation 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- How Effective Are They? Exploring Large Language Model Based Fuzz Driver Generation 引用了 Prompt Fuzzing for Fuzz Driver Generation
- How Effective Are They? Exploring Large Language Model Based Fuzz Driver Generation 引用了 Hopper: Interpretative Fuzzing for Libraries
- How Effective Are They? Exploring Large Language Model Based Fuzz Driver Generation 引用了 Evaluating Fuzz Testing
- Hopper: Interpretative Fuzzing for Libraries 引用了 Skyfire: Data-Driven Seed Generation for Fuzzing
- Hopper: Interpretative Fuzzing for Libraries 引用了 Angora: Efficient Fuzzing by Principled Search
- Hawkeye: Towards a Desired Directed Grey-box Fuzzer 引用了 Angora: Efficient Fuzzing by Principled Search
- Angora: Efficient Fuzzing by Principled Search 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Evaluating Fuzz Testing 引用了 Skyfire: Data-Driven Seed Generation for Fuzzing
- Evaluating Fuzz Testing 引用了 Angora: Efficient Fuzzing by Principled Search
- Evaluating Fuzz Testing 引用了 Coverage-based Greybox Fuzzing as Markov Chain
引用它的顶会 Paper28
- Windranger: A Directed Greybox Fuzzer driven by Deviation Basic BlocksZhengjie Du, Yuekang Li, Yang Liu, Bing MaoICSE 2022 · 64 次引用
- Efficient greybox fuzzing of applications in Linux-based IoT devices via enhanced user-mode emulationYaowen Zheng, Yuekang Li, Cen Zhang, Hongsong Zhu 等ISSTA 2022 · 34 次引用
- How Effective Are They? Exploring Large Language Model Based Fuzz Driver GenerationCen Zhang, Yaowen Zheng, Mingqiang Bai, Yeting Li 等ISSTA 2024 · 27 次引用
- Hopper: Interpretative Fuzzing for LibrariesPeng Chen, Yuxuan Xie, Yunlong Lyu, Yuxiao Wang 等CCS 2023 · 23 次引用
- Prompt Fuzzing for Fuzz Driver GenerationYunlong Lyu, Yuxuan Xie, Peng Chen, Hao ChenCCS 2024 · 21 次引用
它引用的 Paper17
- Coverage-based Greybox Fuzzing as Markov ChainMarcel Böhme, Van-Thuan Pham, Abhik RoychoudhuryCCS 2016 · 1,026 次引用
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei 等CCS 2018 · 753 次引用
- Angora: Efficient Fuzzing by Principled SearchPeng Chen, Hao ChenS&P 2018 · 616 次引用
- Skyfire: Data-Driven Seed Generation for FuzzingJunjie Wang, Bihuan Chen, Lei Wei, Yang LiuS&P 2017 · 382 次引用
- Hawkeye: Towards a Desired Directed Grey-box FuzzerHongxu Chen, Yinxing Xue, Yuekang Li, Bihuan Chen 等CCS 2018 · 335 次引用
相关 Paper
- FuzzGen: Automatic Fuzzer GenerationKyriakos K. Ispoglou, Daniel Austin, Vishwath Mohan, Mathias PayerUSENIX Security 2020
- SyzGen: Automated Generation of Syscall Specification of Closed-Source macOS DriversWeiteng Chen, Yu Wang, Zheng Zhang, Zhiyun QianCCS 2021 · 25 次引用
- KextFuzz: Fuzzing macOS Kernel EXTensions on Apple Silicon via Exploiting MitigationsTingting Yin, Zicong Gao, Zhenghang Xiao, Zheyu Ma 等USENIX Security 2023
- RULF: Rust Library Fuzzing via API Dependency Graph TraversalJianfeng Jiang, Hui Xu, Yangfan ZhouASE 2021 · 44 次引用
- AFGen: Whole-Function Fuzzing for Applications and LibrariesYuwei Liu, Yanhao Wang, Xiangkun Jia, Zheng Zhang 等S&P 2024 · 15 次引用
