[论文解读] APFuzz: Towards Automatic Greybox Protocol Fuzzing
APFuzz 引入自动状态表示学习和基于大语言模型的输入结构学习,以实现更智能的灰盒协议模糊测试,相较于 AFLNET 及同行,在标准模糊测试基准上获得更高覆盖率与崩溃发现。
Greybox protocol fuzzing is a random testing approach for stateful protocol implementations, where the input is protocol messages generated from mutations of seeds, and the search in the input space is driven by the feedback on coverage of both code and state. State model and message model are the core components of communication protocols, which also have significant impacts on protocol fuzzing. In this work, we propose APFuzz (Automatic greybox Protocol Fuzzer) with novel designs to increase the smartness of greybox protocol fuzzers from the perspectives of both the state model and the message model. On the one hand, APFuzz employs a two-stage process of static and dynamic analysis to automatically identify state variables, which are then used to infer an accurate state model during fuzzing. On the other hand, APFuzz introduces field-level mutation operations for binary protocols, leveraging message structure awareness enabled by Large Language Models. We conduct extensive experiments on a public protocol fuzzing benchmark, comparing APFuzz with the baseline fuzzer AFLNET as well as several state-of-the-art greybox protocol fuzzers.
研究动机与目标
- 推动自动、准确的状态表示学习,取代灰盒协议模糊测试中的手工状态建模。
- 开发一个两阶段的静态+动态分析流水线,从源代码中识别状态变量。
- 利用大语言模型学习二进制协议的字段级消息结构。
- 实现基于字段的变异,以生成有效、提升覆盖率的输入。
提出的方法
- 通过静态分析收集候选状态变量并进行轻量级动态分析以过滤噪声的两阶段状态变量识别。
- 基于 LLVM 的动态插桩,在执行过程中跟踪状态变量使用情况并构建状态序列。
- 带有插桩的模糊测试循环从反馈中更新状态模型,并保留能揭示新状态或提升覆盖的输入。
- 基于LLM的种子解析以提取二进制协议消息的字段级结构(字段名、比特起始、比特长度)。
- 由学习到的比特范围引导的字段级变异算子,结合现有的字节级与消息级变异(确定性、经典、字段级)。
- 算法框架(算法1)协调种子选择、变异、状态更新与反馈,以逐步实现状态模型推断。

实验结果
研究问题
- RQ1RQ1:种子二进制消息格式是否可以被基于LLM的方法准确解释?
- RQ2RQ2:状态变量是否可以在没有人工干预的情况下自动识别?
- RQ3RQ3:与 AFLNET 和最先进的灰盒协议模糊测试器相比,APFuzz 的效果与效率如何?
主要发现
- APFuzz 通过静态分析和轻量级动态分析自动学习协议状态变量,实现高效的状态跟踪。
- 基于LLM的种子解析实现对二进制消息的字段级理解,使对二进制协议实现字段级的变异成为可能。
- 与 AFLNET、StateAFL、NSFuzz、ChatAFL、HNPFuzzer、SGFuzz 及其他基线相比,APFuzz 在 ProFuzzBench 基准上展示了代码与状态覆盖的提升以及崩溃发现。
- 基于字段的变异方法将面向结构的模糊测试扩展到二进制协议,生成更有效的测试用例并探索更深的状态空间。

更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。