arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.03425cs.CR
收藏

基于大语言模型的定向灰盒模糊测试

Directed Greybox Fuzzing via Large Language Model

Hanxiang Xu, Yanjie Zhao, Haoyu Wang

AI总结:

本文提出HGFuzzer,利用大语言模型将路径约束转化为代码生成任务并设计专用mutator,显著提升定向灰盒模糊测试效率,在20个真实漏洞中触发17个并发现9个新CVE漏洞。

摘要:

定向灰盒模糊测试(DGF)专注于高效到达特定程序位置或触发特定行为,使其成为漏洞检测和崩溃复现等任务的关键技术。然而,现有方法常常面临路径爆炸和输入变异中的随机性问题,导致在探索和利用目标路径时效率低下。本文提出HGFuzzer,一个利用大语言模型(LLM)应对这些挑战的自动化框架。HGFuzzer将路径约束问题转化为定向代码生成任务,系统性地生成测试harness和可达输入,从而显著减少不必要的探索路径。此外,我们实现了专门针对目标函数设计的自定义mutator,以最小化随机性并提高定向模糊测试的精度。我们在20个真实世界漏洞上评估了HGFuzzer,成功触发17个,其中11个在第一分钟内触发,与最先进的定向模糊测试工具相比,实现了至少24.8倍的加速。此外,HGFuzzer发现了9个此前未知的漏洞,全部被分配了CVE编号,证明了该方法在识别真实世界漏洞方面的有效性。

英文摘要:

Directed greybox fuzzing (DGF) focuses on efficiently reaching specific program locations or triggering particular behaviors, making it essential for tasks like vulnerability detection and crash reproduction. However, existing methods often suffer from path explosion and randomness in input mutation, leading to inefficiencies in exploring and exploiting target paths. In this paper, we propose HGFuzzer, an automatic framework that leverages the large language model (LLM) to address these challenges. HGFuzzer transforms path constraint problems into targeted code generation tasks, systematically generating test harnesses and reachable inputs to reduce unnecessary exploration paths significantly. Additionally, we implement custom mutators designed specifically for target functions, minimizing randomness and improving the precision of directed fuzzing. We evaluated HGFuzzer on 20 real-world vulnerabilities, successfully triggering 17, including 11 within the first minute, achieving a speedup of at least 24.8x compared to state-of-the-art directed fuzzers. Furthermore, HGFuzzer discovered 9 previously unknown vulnerabilities, all of which were assigned CVE IDs, demonstrating the effectiveness of our approach in identifying real-world vulnerabilities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑