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

StateAFL:用于有状态网络服务器的灰盒模糊

StateAFL: Greybox Fuzzing for Stateful Network Servers

Roberto Natella

摘要:

模糊网络服务器是一项技术挑战,因为目标服务器的行为取决于其在多个消息序列中的状态。现有的解决方案成本高昂且难以使用,因为它们依赖于手动定制的工件,如协议模型、协议解析器和学习框架。这项工作的目的是开发一个灰盒模糊器(StateaAFL)的网络服务器,只依赖于轻量级的分析的目标程序,没有手动定制,以类似的方式实现无状态程序的AFL模糊。建议模糊仪器的目标服务器在编译时,插入探针的内存分配和网络I/O操作。在运行时,它通过获取长期内存区域的快照,并通过应用模糊哈希算法(局部敏感哈希)将内存内容映射到唯一的状态标识符,来推断目标服务器的当前协议状态。模糊器逐步建立一个协议状态机,用于指导模糊。我们实现并发布了StateaAFL作为开源软件。作为可重复实验的基础,我们将StateaAFL与一系列流行协议的网络服务器集成在一起,无需手动定制以适应协议。实验结果表明,模糊器可以适用于一个大的网络服务器上流行的协议,没有手动定制,它可以实现可比的,甚至更好的代码覆盖率和错误检测比定制的模糊。此外,我们的定性分析表明,从内存推断的状态更好地反映服务器的行为,而不是只使用响应代码的消息。

英文摘要:

Fuzzing network servers is a technical challenge, since the behavior of the target server depends on its state over a sequence of multiple messages. Existing solutions are costly and difficult to use, as they rely on manually-customized artifacts such as protocol models, protocol parsers, and learning frameworks. The aim of this work is to develop a greybox fuzzer (StateaAFL) for network servers that only relies on lightweight analysis of the target program, with no manual customization, in a similar way to what the AFL fuzzer achieved for stateless programs. The proposed fuzzer instruments the target server at compile-time, to insert probes on memory allocations and network I/O operations. At run-time, it infers the current protocol state of the target server by taking snapshots of long-lived memory areas, and by applying a fuzzy hashing algorithm (Locality-Sensitive Hashing) to map memory contents to a unique state identifier. The fuzzer incrementally builds a protocol state machine for guiding fuzzing. We implemented and released StateaAFL as open-source software. As a basis for reproducible experimentation, we integrated StateaAFL with a large set of network servers for popular protocols, with no manual customization to accomodate for the protocol. The experimental results show that the fuzzer can be applied with no manual customization on a large set of network servers for popular protocols, and that it can achieve comparable, or even better code coverage and bug detection than customized fuzzing. Moreover, our qualitative analysis shows that states inferred from memory better reflect the server behavior than only using response codes from messages.

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

↑