paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Shark2Pit: Automated Test Template Generation for Protocol Fuzzing Based on Packet Parser

Shark2Pit:基于数据包解析器的协议模糊测试自动化测试模板生成
FSE Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering2026匹配度 2/10 · 该论文聚焦协议模糊测试中的 Peach Pit 模板自动生成,属于动态测试与领域特定语言建模,与用户的静态分析、LLM/Agent、浮点程序分析、贝叶斯程序分析等核心方向没有直接交集。论文也未涉及 LLM/Agent 作为工具或改进程序分析,因此匹配度较低。引用 0 inbox
Yulai Fu, Yuanliang Chen, Fuchen Ma, Changjian Liu, Wanli Chen, Dalong Shi, Qiang Fu, Heyuan Shi
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:从网络流量自动生成 Peach 的 Pit 测试模板,免去人工编写,覆盖率达手工水平并发现 5 个新缺陷。

协议模糊测试的效果高度依赖测试模板的质量,即 Peach 框架使用的 Pit 文件(基于 XML,同时定义数据模型与状态模型),但手工编写这些文件耗时、易错且需要专业领域知识,阻碍了模糊测试的自动化。本文提出 Shark2Pit,一个从网络流量自动生成 Pit 文件的工具:它首先用 Tshark 解析流量、提取协议元数据并构建数据模型,随后在保持结构的前提下合成新的数据模型;状态模型由数据模型序列构建,并通过状态重组与重复进一步增强;最后将两类模型与预定义配置结合生成完整 Pit 文件。作者在 8 个开源协议上评估,生成的 Pit 文件分支覆盖率与手工文件相当甚至更高(Peach 为 99.4%–106.3%,Peach* 为 90.6%–102.3%),并借助这些模板发现 5 个此前未知的缺陷。

问题
协议模糊测试所需的 Pit 模板(含数据模型与状态模型)通常依赖人工编写,耗时、易错且要求领域知识,成为模糊测试自动化的瓶颈。
方法
Shark2Pit 用 Tshark 解析真实流量并提取协议元数据以构建数据模型,在保持结构的同时合成新数据模型;由数据模型序列构建状态模型并做状态重组与重复增强,再与预定义配置组合生成 Pit 文件。
评估
在 8 个开源协议上,将生成 Pit 文件的分支覆盖率与手工 Pit 文件对比(Peach 为 99.4%–106.3%,Peach* 为 90.6%–102.3%),并通过模糊测试发现 5 个此前未知的缺陷。
原文摘要(Abstract)

The effectiveness of protocol fuzzing depends on the quality of test templates, specifically the Pit file (XML-based definitions used by the Peach frameworks). These Pit files define both data models and state models. However, manually creating these Pit files is not only time-consuming and error-prone but also requires specialized domain knowledge, hindering the automation process. In this paper, we introduce Shark2Pit, an automated tool that generates Pit files from network traffic. Shark2Pit uses Tshark to parse traffic, extract protocol metadata, and construct data models. Then Shark2Pit synthesizes new data models while preserving their structure. The state model is built from data model sequences, further enhanced by state recombination and repetition. Shark2Pit combines these models with predefined configurations to generate a Pit file. We evaluated Shark2Pit on 8 open-source protocols. The branch coverage of the generated Pit files is comparable to or even higher than that of manually created Pit files (99.4%-106.3% for Peach and 90.6%-102.3% for Peach*). Furthermore, fuzzing with these Pit files revealed 5 previously unknown bugs.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{FuCMLCSFS26,
  title = {Shark2Pit: Automated Test Template Generation for Protocol Fuzzing Based on Packet Parser},
  author = {Yulai Fu and Yuanliang Chen and Fuchen Ma and Changjian Liu and Wanli Chen and Dalong Shi and Qiang Fu and Heyuan Shi},
  booktitle = {FSE},
  year = {2026},
  doi = {10.1145/3803437.3806407}
}