arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1911.07707cs.SEcs.CRcs.PL
收藏

构建快速模糊器

Building Fast Fuzzers

Rahul Gopinath, Andreas Zeller

摘要:

模糊技术是评估程序抗攻击鲁棒性的关键技术之一。Fuzzing必须能够有效地生成涵盖功能和发现漏洞的输入。但它也必须能够有效地迅速生产这些投入。随机模糊器非常有效,因为它们可以快速生成随机输入;但它们不是很有效,因为生成的大部分输入在语法上是无效的。基于语法的模糊器利用语法(或输入语言的另一种模型)来产生语法正确的输入,因此可以快速覆盖输入空间和相关功能。然而,现有的基于语法的模糊器的效率惊人地低:即使是最快的语法模糊器Dharma产生的输入仍然比最快的随机模糊器慢1000倍。到目前为止,可以有一个有效的或一个有效的模糊,但不能两者兼而有之。在本文中,我们描述了如何建立快速的语法模糊器从地面上,从程序设计语言实现的角度来处理模糊的问题。从Python教科书方法开始,我们采用并适应函数式编程和虚拟机实现技术中的优化技术,以及其他新颖的特定于域的优化。在我们的F1原型模糊,这些提高生产速度的一个因素100- 300最快的语法模糊达摩。由于F1甚至比词法随机模糊器快5- 8倍,我们可以更快地找到bug,并使用比以前可能的更大的有效输入进行测试。

英文摘要:

Fuzzing is one of the key techniques for evaluating the robustness of programs against attacks. Fuzzing has to be effective in producing inputs that cover functionality and find vulnerabilities. But it also has to be efficient in producing such inputs quickly. Random fuzzers are very efficient, as they can quickly generate random inputs; but they are not very effective, as the large majority of inputs generated is syntactically invalid. Grammar-based fuzzers make use of a grammar (or another model for the input language) to produce syntactically correct inputs, and thus can quickly cover input space and associated functionality. Existing grammar-based fuzzers are surprisingly inefficient, though: Even the fastest grammar fuzzer Dharma still produces inputs about a thousand times slower than the fastest random fuzzer. So far, one can have an effective or an efficient fuzzer, but not both. In this paper, we describe how to build fast grammar fuzzers from the ground up, treating the problem of fuzzing from a programming language implementation perspective. Starting with a Python textbook approach, we adopt and adapt optimization techniques from functional programming and virtual machine implementation techniques together with other novel domain-specific optimizations in a step-by-step fashion. In our F1 prototype fuzzer, these improve production speed by a factor of 100--300 over the fastest grammar fuzzer Dharma. As F1 is even 5--8 times faster than a lexical random fuzzer, we can find bugs faster and test with much larger valid inputs than previously possible.

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

↑