arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.07714cs.CRcs.AIcs.SE
收藏

LLAMAFUZZ:大语言模型增强的灰盒模糊测试

LLAMAFUZZ: Large Language Model Enhanced Greybox Fuzzing

University of California, Davis(加州大学戴维斯分校);University of Hong Kong(香港大学)

Hongxiang Zhang, Yuyang Rong, Yifeng He, Hao Chen

AI总结:

本文提出LLAMAFUZZ,利用大语言模型生成有效输入,提升灰盒模糊测试对结构化数据的处理能力,实验表明其在发现漏洞方面表现优异。

摘要:

灰盒模糊测试在发现程序中的漏洞和漏洞方面取得了成功。然而,随机变异策略限制了模糊测试器在结构化数据上的性能。专门的模糊测试器可以处理复杂的结构化数据,但需要额外的努力来构建语法,并且吞吐量低。在本文中,我们探索了利用大语言模型来增强结构化数据的灰盒模糊测试的潜力。我们利用预训练的LLM对数据转换和格式的知识来生成新的有效输入。我们进一步用配对变异种子对它进行微调,以有效学习结构化格式和变异策略。我们的基于LLM的模糊测试器LLAMAFUZZ整合了LLM的力量来理解和变异结构化数据以模糊测试。我们对标准漏洞基准Magma和各种现实世界的程序进行了实验。LLAMAFUZZ在平均上比我们的顶级竞争对手多发现了41个漏洞。我们还发现了47个独特的漏洞。此外,LLAMAFUZZ在触发漏洞和达到漏洞方面表现出一致的性能。与AFL++相比,LLAMAFUZZ在现实世界的程序集上平均实现了27.19%更多的分支。我们还展示了一个案例研究,以解释LLM如何在代码覆盖方面增强模糊测试过程。

英文摘要:

Greybox fuzzing has achieved success in revealing bugs and vulnerabilities in programs. However, randomized mutation strategies have limited the fuzzer's performance on structured data. Specialized fuzzers can handle complex structured data, but require additional efforts in grammar and suffer from low throughput. In this paper, we explore the potential of utilizing the Large Language Model to enhance greybox fuzzing for structured data. We utilize the pre-trained knowledge of LLM about data conversion and format to generate new valid inputs. We further fine-tuned it with paired mutation seeds to learn structured format and mutation strategies effectively. Our LLM-based fuzzer, LLAMAFUZZ, integrates the power of LLM to understand and mutate structured data to fuzzing. We conduct experiments on the standard bug-based benchmark Magma and a wide variety of real-world programs. LLAMAFUZZ outperforms our top competitor by 41 bugs on average. We also identified 47 unique bugs across all trials. Moreover, LLAMAFUZZ demonstrated consistent performance on both bug trigger and bug reached. Compared to AFL++, LLAMAFUZZ achieved 27.19% more branches in real-world program sets on average. We also demonstrate a case study to explain how LLMs enhance the fuzzing process in terms of code coverage.

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

↑