Over the past decade, the automated generation of test inputs has made significant advances. Modern fuzzers and test generators easily produce complex input formats that do systematically cover the input and execution space. Testing _protocols_, though, has remained a frontier for automated testing, as a test generator has to _interact_ with the program under test, producing messages that conform to the current state of the system. In this paper, we introduce _language-based protocol testing_, the first approach to specify, automatically test, and systematically cover the full state and input space of protocol implementations. We specify protocols as _interaction grammars_ -- an extension of context-free grammars that tag each message element with the communication party that is in charge of producing it. Interaction grammars embed classical state models by unifying states, messages, and transitions all into nonterminals, and can be used for _producing_ interactions as well as _parsing_ them, making them ideally suited for testing protocols. Additional _constraints_ over grammar elements allow us to specify and test _semantic features_ such as binary message formats, checksums, encodings, and the many ways that message features induce states and vice versa. To evaluate the effectiveness of language-based protocol testing, we have implemented it as part of the FANDANGO test generator. We specify several protocols as interaction grammars, including features such as human-readable interactions (SMTP), bit-level encodings (DNS), and dynamic port assignments (FTP), and use them to test the corresponding protocol implementations. By systematically covering the interaction grammar and solving the associated constraints, FANDANGO achieves comprehensive coverage of the protocol interactions, resulting in high code coverage and a thorough assessment of the program under test.


翻译:过去十年间,自动化测试输入生成技术取得了显著进展。现代模糊测试工具和测试生成器能够轻松生成复杂的输入格式,系统性地覆盖输入与执行空间。然而,协议测试仍是自动化测试的前沿领域,因为测试生成器必须与被测程序进行交互,生成符合系统当前状态的消息。本文提出基于语言的协议测试方法,这是首个能够对协议实现的全状态与输入空间进行规范描述、自动化测试及系统性覆盖的技术方案。我们将协议规范定义为交互语法——一种上下文无关文法的扩展形式,通过为每个消息元素标注负责生成它的通信方来建模协议。交互语法通过将状态、消息和转移统一表示为非终结符,从而嵌入了经典状态模型,既能用于生成交互序列,也能解析交互过程,使其成为协议测试的理想工具。通过对语法元素施加额外约束,我们能够规范并测试包括二进制消息格式、校验和、编码方式以及消息特征与状态间相互影响机制在内的语义特性。为评估基于语言的协议测试效果,我们在FANDANGO测试生成器中实现了该框架。我们使用交互语法规范了多个协议特性,包括人类可读交互(SMTP)、比特级编码(DNS)和动态端口分配(FTP),并据此测试了相应的协议实现。通过系统覆盖交互语法空间并求解相关约束,FANDANGO实现了对协议交互的全面覆盖,从而获得高代码覆盖率,并对被测程序进行了深入评估。

0
下载
关闭预览

相关内容

《大语言模型驱动的智能红队测试》
专知会员服务
17+阅读 · 2025年11月26日
文本、视觉与语音生成的自动化评估方法综述
专知会员服务
20+阅读 · 2025年6月15日
【新书】使用生成式人工智能进行软件测试
专知会员服务
44+阅读 · 2025年1月6日
《综述:测试与评估中应用的人工智能工具》
专知会员服务
74+阅读 · 2024年1月22日
专知会员服务
98+阅读 · 2021年1月24日
【Facebook】人工智能基准(Benchmarking)测试再思考,55页ppt
专知会员服务
31+阅读 · 2020年12月20日
《人工智能安全测评白皮书》,99页pdf
专知
36+阅读 · 2022年2月26日
你的算法可靠吗? 神经网络不确定性度量
专知
40+阅读 · 2019年4月27日
语音关键词检测方法综述【附PPT与视频资料】
人工智能前沿讲习班
10+阅读 · 2019年2月2日
干货 | 基于深度学习的目标检测算法综述(二)
AI科技评论
21+阅读 · 2018年8月20日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
28+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月22日
Arxiv
0+阅读 · 2月20日
VIP会员
最新内容
最新“指挥控制”领域出版物合集(简介)
专知会员服务
1+阅读 · 今天15:19
面向军事作战需求开发的人工智能(RAIMOND)
专知会员服务
3+阅读 · 今天15:13
软件定义多域战术网络:基础与未来方向(综述)
水下战战术决策中的气象与海洋预报(50页报告)
远程空中优势:新一代超视距导弹的兴起
专知会员服务
1+阅读 · 今天14:45
大语言模型溯因推理的统一分类学与综述
专知会员服务
0+阅读 · 今天12:07
相关VIP内容
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
28+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员