《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (10): 3241-3251.DOI: 10.11772/j.issn.1001-9081.2024091331
• 网络空间安全 • 上一篇
宗学军1,2(), 韩冰1,2, 王国刚1,2, 宁博伟2,3, 何戡1,2, 连莲1,2
收稿日期:
2024-09-20
修回日期:
2024-12-19
接受日期:
2024-12-26
发布日期:
2025-01-14
出版日期:
2025-10-10
通讯作者:
宗学军
作者简介:
宗学军(1970—),男,辽宁沈阳人,教授,硕士,主要研究方向:工业信息安全 Email:xuejun_zong@syuct.edu.cn基金资助:
Xuejun ZONG1,2(), Bing HAN1,2, Guogang WANG1,2, Bowei NING2,3, Kan HE1,2, Lian LIAN1,2
Received:
2024-09-20
Revised:
2024-12-19
Accepted:
2024-12-26
Online:
2025-01-14
Published:
2025-10-10
Contact:
Xuejun ZONG
About author:
ZONG Xuejun, born in 1970, M. S., professor. His research interests include industrial information security.Supported by:
摘要:
针对模糊测试在工业控制协议(ICP)应用中存在测试用例接受率(TCAR)低和多样性不足等问题,提出一种基于自适应动态区间策略的ICP模糊测试方法。将循环神经网络(RNN)加入Transformer的自注意力机制,以构建协议特征提取模型;使用RNN通过滑动窗口提取数据的局部特征,并引入自注意力机制进行全局特征提取,以保证TCAR;在自注意力块间添加残差连接,以传递权重分数并提高计算效率;生成过程定义动态区间策略,调节模型在任意时间步的采样范围,从而增加测试用例的多样性;在测试过程中构建字段自适应重要性函数,以定位变异关键字段。基于上述方法,设计模糊测试框架TDRFuzzer,并采用Modbus TCP、S7 comm和Ethernet/IP等3种工业协议进行实验评估。结果表明,相较于GANFuzzer、WGANFuzzer和PeachFuzzer这3种模型,TDRFuzzer的TCAR指标显著提高,且漏洞检测率(VDR)分别提高了0.073、0.035和0.150个百分点,表明TDRFuzzer具备更强的ICP漏洞挖掘能力。
中图分类号:
宗学军, 韩冰, 王国刚, 宁博伟, 何戡, 连莲. 基于自适应动态区间策略的工业控制协议模糊测试方法TDRFuzzer[J]. 计算机应用, 2025, 45(10): 3241-3251.
Xuejun ZONG, Bing HAN, Guogang WANG, Bowei NING, Kan HE, Lian LIAN. TDRFuzzer: fuzzing method for industrial control protocols based on adaptive dynamic interval strategy[J]. Journal of Computer Applications, 2025, 45(10): 3241-3251.
字段类型 | 变异算子 |
---|---|
Transaction ID | 特殊字符、ASCII码 |
Length | 超长、欠长、非法长度边界值 |
Unit ID | 非法ID、特殊值、未定义ID |
Function code | 非法功能码、未定义功能码、非法字符 |
Data | 单个字符、随机字符、非法数据 特殊分隔符:! @ # * % + = - | < > / ? { } []… 格式化字符串:%s, %d, %n, %x, %n%s … 循环字符串:AAAA…、FFF…、SSSSS… 特殊ASCALL字符:! " ,@, &, %, ~*=… 文件路径字符:~/、/…˙..、\.、\.. |
表1 协议变异算子
Tab. 1 Protocol mutation operators
字段类型 | 变异算子 |
---|---|
Transaction ID | 特殊字符、ASCII码 |
Length | 超长、欠长、非法长度边界值 |
Unit ID | 非法ID、特殊值、未定义ID |
Function code | 非法功能码、未定义功能码、非法字符 |
Data | 单个字符、随机字符、非法数据 特殊分隔符:! @ # * % + = - | < > / ? { } []… 格式化字符串:%s, %d, %n, %x, %n%s … 循环字符串:AAAA…、FFF…、SSSSS… 特殊ASCALL字符:! " ,@, &, %, ~*=… 文件路径字符:~/、/…˙..、\.、\.. |
解码器层数 | α | 自注意力头数 | TCAR/% |
---|---|---|---|
4 | 0.5 | 4 | 77.4 |
8 | 77.8 | ||
0.8 | 4 | 78.1 | |
8 | 75.4 | ||
6 | 0.5 | 4 | 87.6 |
8 | 86.1 | ||
0.8 | 4 | 81.5 | |
8 | 78.5 | ||
8 | 0.5 | 4 | 85.8 |
8 | 84.3 | ||
0.8 | 4 | 82.2 | |
8 | 83.6 |
表2 模型参数的对比
Tab. 2 Comparison of model parameters
解码器层数 | α | 自注意力头数 | TCAR/% |
---|---|---|---|
4 | 0.5 | 4 | 77.4 |
8 | 77.8 | ||
0.8 | 4 | 78.1 | |
8 | 75.4 | ||
6 | 0.5 | 4 | 87.6 |
8 | 86.1 | ||
0.8 | 4 | 81.5 | |
8 | 78.5 | ||
8 | 0.5 | 4 | 85.8 |
8 | 84.3 | ||
0.8 | 4 | 82.2 | |
8 | 83.6 |
超参数 | 数值 |
---|---|
RNN层级 | 2 |
RNN层数 | 1 |
窗口大小 | 4 |
嵌入维度 | 512 |
自注意力头数 | 6 |
批次大小 | 32 |
残差缩放因子 | 0.5 |
优化器 | Adam |
表3 模型参数配置
Tab. 3 Model parameter configuration
超参数 | 数值 |
---|---|
RNN层级 | 2 |
RNN层数 | 1 |
窗口大小 | 4 |
嵌入维度 | 512 |
自注意力头数 | 6 |
批次大小 | 32 |
残差缩放因子 | 0.5 |
优化器 | Adam |
测试模型 | 设备 | 训练时间/h | 发送用例数 | 异常数 | VDR/% | 触发异常种类数 |
---|---|---|---|---|---|---|
TDRFuzzer | Modbus Slave v6.2.2 | 11.36 | 50 000 | 86 | 0.172 | 5 |
Modbus Rssim v8.2.0 | 125 | 0.250 | 6 | |||
Modbus Sim32 v4.0 | 68 | 0.136 | 4 | |||
SIEMENS S7-300 | 8 | 0.016 | 3 | |||
AB1769-L30ER/A | 9 | 0.018 | 4 | |||
GANFuzzer | Modbus Slave v6.2.2 | 16.78 | 50 000 | 70 | 0.140 | 4 |
Modbus Rssim v8.2.0 | 84 | 0.168 | 3 | |||
Modbus Sim32 v4.0 | 51 | 0.102 | 4 | |||
SIEMENS S7-300 | 2 | 0.004 | 2 | |||
AB1769-L30ER/A | 3 | 0.006 | 1 | |||
WGANFuzzer | Modbus Slave v6.2.2 | 14.25 | 50 000 | 78 | 0.156 | 4 |
Modbus Rssim v8.2.0 | 105 | 0.210 | 5 | |||
Modbus Sim32 v4.0 | 62 | 0.124 | 5 | |||
SIEMENS S7-300 | 5 | 0.010 | 3 | |||
AB1769-L30ER/A | 6 | 0.012 | 2 | |||
PeachFuzzer | Modbus Slave v6.2.2 | — | 50 000 | 27 | 0.054 | 2 |
Modbus Rssim v8.2.0 | 38 | 0.076 | 1 | |||
Modbus Sim32 v4.0 | 32 | 0.064 | 1 | |||
SIEMENS S7-300 | 1 | 0.002 | 1 | |||
AB1769-L30ER/A | 2 | 0.004 | 1 |
表4 不同模型的VDR对比
Tab. 4 Comparison of VDR across different models
测试模型 | 设备 | 训练时间/h | 发送用例数 | 异常数 | VDR/% | 触发异常种类数 |
---|---|---|---|---|---|---|
TDRFuzzer | Modbus Slave v6.2.2 | 11.36 | 50 000 | 86 | 0.172 | 5 |
Modbus Rssim v8.2.0 | 125 | 0.250 | 6 | |||
Modbus Sim32 v4.0 | 68 | 0.136 | 4 | |||
SIEMENS S7-300 | 8 | 0.016 | 3 | |||
AB1769-L30ER/A | 9 | 0.018 | 4 | |||
GANFuzzer | Modbus Slave v6.2.2 | 16.78 | 50 000 | 70 | 0.140 | 4 |
Modbus Rssim v8.2.0 | 84 | 0.168 | 3 | |||
Modbus Sim32 v4.0 | 51 | 0.102 | 4 | |||
SIEMENS S7-300 | 2 | 0.004 | 2 | |||
AB1769-L30ER/A | 3 | 0.006 | 1 | |||
WGANFuzzer | Modbus Slave v6.2.2 | 14.25 | 50 000 | 78 | 0.156 | 4 |
Modbus Rssim v8.2.0 | 105 | 0.210 | 5 | |||
Modbus Sim32 v4.0 | 62 | 0.124 | 5 | |||
SIEMENS S7-300 | 5 | 0.010 | 3 | |||
AB1769-L30ER/A | 6 | 0.012 | 2 | |||
PeachFuzzer | Modbus Slave v6.2.2 | — | 50 000 | 27 | 0.054 | 2 |
Modbus Rssim v8.2.0 | 38 | 0.076 | 1 | |||
Modbus Sim32 v4.0 | 32 | 0.064 | 1 | |||
SIEMENS S7-300 | 1 | 0.002 | 1 | |||
AB1769-L30ER/A | 2 | 0.004 | 1 |
设备 | 异常功能码 | 异常设备地址 | 无法连接 | 缓存溢出 | 数据长度不符 | 从站无响应 | 连接断开 |
---|---|---|---|---|---|---|---|
Modbus Slave v6.2.2 | √ | √ | √ | √ | √ | ||
Modbus Rssim v8.2.0 | √ | √ | √ | √ | √ | √ | |
Modbus Sim32 v4.0 | √ | √ | √ | √ | |||
SIEMENS S7-300 | √ | √ | √ | ||||
AB 1769-L30ER/A | √ | √ | √ | √ |
表5 TDRFuzzer触发的异常种类
Tab. 5 Types of anomalies triggered by TDRFuzzer
设备 | 异常功能码 | 异常设备地址 | 无法连接 | 缓存溢出 | 数据长度不符 | 从站无响应 | 连接断开 |
---|---|---|---|---|---|---|---|
Modbus Slave v6.2.2 | √ | √ | √ | √ | √ | ||
Modbus Rssim v8.2.0 | √ | √ | √ | √ | √ | √ | |
Modbus Sim32 v4.0 | √ | √ | √ | √ | |||
SIEMENS S7-300 | √ | √ | √ | ||||
AB 1769-L30ER/A | √ | √ | √ | √ |
[1] | WEI X, YAN Z, LIANG X. A survey on fuzz testing technologies for industrial control protocols [J]. Journal of Network and Computer Applications, 2024, 232: No.104020. |
[2] | ZOLANVARI M, TEIXEIRA M A, GUPTA L, et al. Machine learning-based network vulnerability analysis of industrial internet of things [J]. IEEE Internet of Things Journal, 2019, 6(4): 6822-6834. |
[3] | ZHANG X, ZHANG C, LI X, et al. A survey of protocol fuzzing[J]. ACM Computing Surveys, 2025, 57(2): No.35. |
[4] | NOURIAN A, MADNICK S. A systems theoretic approach to the security threats in cyber physical systems applied to Stuxnet [J]. IEEE Transactions on Dependable and Secure Computing, 2018, 15(1): 2-13. |
[5] | ZIMBA A, WANG Z, CHEN H. Multi-stage crypto ransomware attacks: a new emerging cyber threat to critical infrastructure and industrial control systems [J]. ICT Express, 2018, 4(1): 14-18. |
[6] | HUANG Y, SHU H, KANG F, et al. Protocol reverse-engineering methods and tools: a survey [J]. Computer Communications, 2022, 182: 238-254. |
[7] | MILLER B P, FREDRIKSEN L, SO B. An empirical study of the reliability of UNIX utilities [J]. Communications of the ACM, 1990, 32(12): 32-44. |
[8] | SHU Z, YAN G. IoTInfer: automated blackbox fuzz testing of IoT network protocols guided by finite state machine inference [J]. IEEE Internet of Things Journal, 2022, 9(22): 22737-22751. |
[9] | 童俊成,赵波. 区块链智能合约漏洞检测与自动化修复综述[J]. 计算机应用, 2023, 43(3):785-793. |
TONG J C, ZHAO B. Review on blockchain smart contract vulnerability detection and automatic repair [J]. Journal of Computer Applications, 2023, 43(3): 785-793. | |
[10] | LI Z, ZHAO H, SHI J, et al. An intelligent fuzzing data generation method based on deep adversarial learning [J]. IEEE Access, 2019, 7: 49327-49340. |
[11] | ZHAO H, LI Z, WEI H, et al. SeqFuzzer: an industrial protocol fuzzing framework from a deep learning perspective [C]// Proceedings of the 12th IEEE Conference on Software Testing, Validation and Verification. Piscataway: IEEE, 2019: 59-67. |
[12] | 徐鹏,刘嘉勇,林波,等. 基于循环神经网络的模糊测试用例生成[J]. 计算机应用研究, 2019, 36(9): 2679-2685. |
XU P, LIU J Y, LIN B, et al. Generation of fuzzing test case based on recurrent neural networks [J]. Application Research of Computers, 2019, 36(9): 2679-2685. | |
[13] | ZHAO X, QU H, XU J, et al. AMSFuzz: an adaptive mutation schedule for fuzzing [J]. Expert Systems with Applications, 2022, 208: No.118162. |
[14] | LV W, XIONG J, SHI J, et al. A deep convolution generative adversarial networks based fuzzing framework for industry control protocols [J]. Journal of Intelligent Manufacturing, 2021, 32(2): 441-457. |
[15] | YU Z, WANG H, WANG D, et al. CGFuzzer: a fuzzing approach based on coverage-guided generative adversarial networks for industrial IoT protocols [J]. IEEE Internet of Things Journal, 2022, 9(21): 21607-21619. |
[16] | WANG W, CHEN Z, ZHENG Z, et al. An adaptive fuzzing method based on Transformer and protocol similarity mutation [J]. Computers and Security, 2023, 129: No.103197. |
[17] | 沈阳化工大学. 一种基于Transformer decoder的工控协议模糊测试用例生成方法: 202410970390.9[P]. 2024-10-29. |
Shenyang University of Chemical Technology. A method for generating fuzzy test cases for industrial control protocols based on Transformer decoder: 202410970390.9 [P]. 2024-10-29. | |
[18] | SARKER I H. Deep learning: a comprehensive overview on techniques, taxonomy, applications and research directions [J]. SN Computer Science, 2021, 2(6): No.420. |
[19] | 庄园,曹文芳,孙国凯,等. 基于生成对抗网络与变异策略结合的网络协议漏洞挖掘方法[J]. 计算机科学, 2023, 50(9): 44-51. |
ZHUANG Y, CAO W F, SUN G K, et al. Network protocol vulnerability mining method based on generative adversarial network and mutation strategy [J]. Computer Science, 2023, 50(9): 44-51. | |
[20] | VASWANI A, SHAZEER N, PARMAR N, et al. Attention is all you need [C]// Proceedings of the 31st International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2017: 6000-6010. |
[21] | SHERSTINSKY A. Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) network [J]. Physica D: Nonlinear Phenomena, 2020, 404: No.132306. |
[22] | ZONG X, LUO W, NING B, et al. DiffusionFuzz: fuzzing framework of industrial control protocols based on denoising diffusion probabilistic model [J]. IEEE Access, 2024, 12: 67795-67808. |
[23] | LIANG X, ZHAO F. Single-image rain removal network based on an attention mechanism and a residual structure [J]. IEEE Access, 2022, 10: 52472-52480. |
[24] | FAN W, HE Y, ZHU F. RM-GPT: enhance the comprehensive generative ability of molecular GPT model via LocalRNN and RealFormer [J]. Artificial Intelligence in Medicine, 2024, 150: No.102827. |
[25] | HE R, RAVULA A, KANAGAL B, et al. RealFormer: Transformer likes residual attention [C]// Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021. Stroudsburg: ACL, 2021: 929-943. |
[26] | LI L, DOROSLOVAČKI M, LOEW M H. Approximating the gradient of cross-entropy loss function [J]. IEEE Access, 2020, 8: 111626-111635. |
[27] | LAI Y, GAO H, LIU J. Vulnerability mining method for the Modbus TCP using an anti-sample fuzzer [J]. Sensors, 2020, 20(7): No.2040. |
[28] | FENG W, LAI Y, LIU Z. Vulnerability mining for Modbus TCP based on exception field positioning [J]. Simulation Modelling Practice and Theory, 2020, 102: No.101989. |
[29] | 徐航,杨智,陈性元,等. 基于自适应敏感区域变异的覆盖引导模糊测试[J]. 计算机应用, 2024, 44(8): 2528-2535. |
XU H, YANG Z, CHEN X Y, et al. Coverage-guided fuzzing based on adaptive sensitive region mutation [J]. Journal of Computer Applications, 2024, 44(8): 2528-2535. | |
[30] | LEMAY A, FERNANDEZ J M. Providing SCADA network data sets for intrusion detection research [C]// Proceedings of the 9th Workshop on Cyber Security Experimentation and Test. Berkeley: USENIX Association, 2016: 1-8. |
[31] | MUKHOPADHYAY S. Industrial control protocol fuzzing using deep adversarial networks [C]// Proceedings of the 2021 International Conference on Advances in Computing, Communication, and Control. Piscataway: IEEE, 2021: 1-6. |
[32] | ZHANG D, WANG J, ZHANG H. Peach improvement on Profinet-DCP for industrial control system vulnerability detection[C]// Proceedings of the 2nd International Conference on Electrical, Computer Engineering and Electronics. Dordrecht: Atlantis Press, 2015: 1622-1627. |
[1] | 李进, 刘立群. 基于残差Swin Transformer的SAR与可见光图像融合[J]. 《计算机应用》唯一官方网站, 2025, 45(9): 2949-2956. |
[2] | 王芳, 胡静, 张睿, 范文婷. 内容引导下多角度特征融合医学图像分割网络[J]. 《计算机应用》唯一官方网站, 2025, 45(9): 3017-3025. |
[3] | 吕景刚, 彭绍睿, 高硕, 周金. 复频域注意力和多尺度频域增强驱动的语音增强网络[J]. 《计算机应用》唯一官方网站, 2025, 45(9): 2957-2965. |
[4] | 周金, 李玉芝, 张徐, 高硕, 张立, 盛家川. 复杂电磁环境下的调制识别网络[J]. 《计算机应用》唯一官方网站, 2025, 45(8): 2672-2682. |
[5] | 陶永鹏, 柏诗淇, 周正文. 基于卷积和Transformer神经网络架构搜索的脑胶质瘤多组织分割网络[J]. 《计算机应用》唯一官方网站, 2025, 45(7): 2378-2386. |
[6] | 陈凯, 叶海良, 曹飞龙. 基于局部-全局交互与结构Transformer的点云分类算法[J]. 《计算机应用》唯一官方网站, 2025, 45(5): 1671-1676. |
[7] | 陈鹏宇, 聂秀山, 李南君, 李拓. 基于时空解耦和区域鲁棒性增强的半监督视频目标分割方法[J]. 《计算机应用》唯一官方网站, 2025, 45(5): 1379-1386. |
[8] | 许鹏程, 何磊, 李川, 钱炜祺, 赵暾. 基于Transformer的深度符号回归方法[J]. 《计算机应用》唯一官方网站, 2025, 45(5): 1455-1463. |
[9] | 李慧, 贾炳志, 王晨曦, 董子宇, 李纪龙, 仲兆满, 陈艳艳. 基于Swin Transformer的生成对抗网络水下图像增强模型[J]. 《计算机应用》唯一官方网站, 2025, 45(5): 1439-1446. |
[10] | 袁宝华, 陈佳璐, 王欢. 融合多尺度语义和双分支并行的医学图像分割网络[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 988-995. |
[11] | 王雅伦, 张仰森, 朱思文. 面向知识推理的位置编码标题生成模型[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 345-353. |
[12] | 王子怡, 李卫军, 刘雪洋, 丁建平, 刘世侠, 苏易礌. 基于Swin Transformer与多尺度特征融合的图像描述方法[J]. 《计算机应用》唯一官方网站, 2025, 45(10): 3154-3160. |
[13] | 梁杰涛, 罗兵, 付兰慧, 常青玲, 李楠楠, 易宁波, 冯其, 何鑫, 邓辅秦. 基于坐标几何采样的点云配准方法[J]. 《计算机应用》唯一官方网站, 2025, 45(1): 214-222. |
[14] | 方介泼, 陶重犇. 应对零日攻击的混合车联网入侵检测系统[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2763-2769. |
[15] | 黄云川, 江永全, 黄骏涛, 杨燕. 基于元图同构网络的分子毒性预测[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2964-2969. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||