arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.01944cs.CL
收藏

FuzzCoder:基于大语言模型的字节级模糊测试

FuzzCoder: Byte-level Fuzzing Test via Large Language Model

Beihang University(北京航空航天大学);University of British Columbia(不列颠哥伦比亚大学);University of Waterloo(滑铁卢大学);University of Science and Technology Beijing(北京科技大学);Beijing University of Posts and Telecommunications(北京邮电大学)
Liqun Yang, Jian Yang, Chaoren Wei, Guanglin Niu, Ge Zhang, Yunli Wang, Linzheng ChaI, Wanxu Xia, Hongcheng Guo, Shun Zhang, Jiaheng Liu, Yuwei Yin, Junran Peng… 展开作者

Liqun Yang, Jian Yang, Chaoren Wei, Guanglin Niu, Ge Zhang, Yunli Wang, Linzheng ChaI, Wanxu Xia, Hongcheng Guo, Shun Zhang, Jiaheng Liu, Yuwei Yin, Junran Peng, Jiaxin Ma, Liang Sun, Zhoujun Li

AI总结:

本文提出 FuzzCoder,通过微调代码大语言模型学习成功攻击模式,以序列到序列方式指导字节级模糊测试变异,并基于 AFL 在多种输入格式上显著提升有效变异比例和崩溃数量。

摘要:

模糊测试是一种重要的动态程序分析技术,旨在发现复杂软件中的漏洞。模糊测试通过向目标程序提供精心构造的恶意输入,以引发崩溃、缓冲区溢出、内存错误和异常。高效地构造恶意输入是一个困难的开放性问题,目前最好的方法通常是对已有的有效输入施加均匀随机变异。在本文中,我们提出采用经过微调的大语言模型(FuzzCoder)来学习成功攻击中输入文件的模式,以指导未来的模糊测试探索。具体来说,我们开发了一个框架,利用代码大语言模型来指导模糊测试中输入变异过程。变异过程被建模为序列到序列建模,其中大语言模型接收一个字节序列,然后输出变异后的字节序列。FuzzCoder 在创建的指令数据集(Fuzz-Instruct)上进行微调,该数据集中的成功模糊测试历史收集自启发式模糊测试工具。FuzzCoder 能够预测输入文件中的变异位置和变异策略,以触发程序的异常行为。实验结果表明,基于 AFL(American Fuzzy Lop)的 FuzzCoder 在有效变异比例(EPM)和崩溃数量(NC)方面,针对包括 ELF、JPG、MP3 和 XML 在内的多种输入格式均取得了显著提升。

英文摘要:

Fuzzing is an important dynamic program analysis technique designed for finding vulnerabilities in complex software. Fuzzing involves presenting a target program with crafted malicious input to cause crashes, buffer overflows, memory errors, and exceptions. Crafting malicious inputs in an efficient manner is a difficult open problem and the best approaches often apply uniform random mutations to pre-existing valid inputs. In this work, we propose to adopt fine-tuned large language models (FuzzCoder) to learn patterns in the input files from successful attacks to guide future fuzzing explorations. Specifically, we develop a framework to leverage the code LLMs to guide the mutation process of inputs in fuzzing. The mutation process is formulated as the sequence-to-sequence modeling, where LLM receives a sequence of bytes and then outputs the mutated byte sequence. FuzzCoder is fine-tuned on the created instruction dataset (Fuzz-Instruct), where the successful fuzzing history is collected from the heuristic fuzzing tool. FuzzCoder can predict mutation locations and strategies locations in input files to trigger abnormal behaviors of the program. Experimental results show that FuzzCoder based on AFL (American Fuzzy Lop) gain significant improvements in terms of effective proportion of mutation (EPM) and number of crashes (NC) for various input formats including ELF, JPG, MP3, and XML.

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

↑