基于改进小生境遗传算法的PLC协议模糊测试方法
Fuzz Test for PLC Protocol Based on Improved Niche Genetic Algorithm
针对现有可编程逻辑控制器(PLC)协议模糊测试自动化程度与程序覆盖率不足的问题,提出一种基于改进小生境遗传算法的黑盒测试方法。首先,通过分析PLC协议以功能码为核心的“请求—响应”特征,论证其与小生境遗传算法的适配性;其次,提出以功能码划分小生境和“子种群选优、全种群进化”的进化策略,改进小生境遗传算法;最后,结合个体相似度与被测设备响应状态的适应度计算方法,最终实现自动引导测试用例更全面探索程序空间的目的。实验结果表明,相比Peach及基本遗传算法的方法,该方法生成的测试用例触发异常响应占比更多,漏洞发现能力更强,在施耐德、三菱、通用电气(GE)的3款PLC中均触发故障,发现1个未公开漏洞。
To address the issues of insufficient automation and program coverage in existing programmable logic controller (PLC) protocol fuzz testing, a black-box fuzz testing method is proposed. Firstly, the characteristics of PLC protocol, which are characterized by a “request-response” pattern with function code as the core, are analyzed to demonstrate its adaptability to niche genetic algorithms. Secondly, a method of dividing niches based on function codes and an evolution strategy of “subpopulation selection and full population evolution” are proposed to improve the niche genetic algorithm. Then, a fitness calculation method combining individual similarity and the response status of the device under test is designed, aiming to automatically guide test cases to more comprehensively explore the program space. Experiments show that compared with Peach and the method using a simple genetic algorithm, the generated test cases trigger a higher proportion of abnormal responses and have stronger vulnerability discovery capabilities. Faults are triggered in three PLCs from Schneider, Mitsubishi, and General Electric (GE), and one undisclosed vulnerability is found.
PLC protocol / fuzz test / niche / genetic algorithm
| [1] |
东北大学谛听网络安全团队.2023年工业控制网络安全态势白皮书[EB/OL].(2024-02-19)[2024-07-31]. |
| [2] |
|
| [3] |
张亚丰,洪征,吴礼发,基于范式语法的工控协议Fuzzing测试技术[J].计算机应用研究,2016,33(8):2433-2439. |
| [4] |
冯文倩.基于异常字段定位的Modbus TCP协议漏洞挖掘方法研究[D].北京:北京工业大学,2020:1-55. |
| [5] |
|
| [6] |
杨亚辉,麻荣宽,耿洋洋,基于工控私有协议逆向的黑盒模糊测试方法[J].计算机科学,2023,50(4):323-332. |
| [7] |
|
| [8] |
王田原,武淑红,李兆基,PGNFuzz:基于指针生成网络的工业控制协议模糊测试框架[J].计算机科学,2022,49(10):310-318. |
| [9] |
姜亚光,陈曦,李建彬,基于LSTM的S7协议模糊测试用例生成方法[J].计算机工程,2021,47(7):183-188. |
| [10] |
宋岩,胡志成,郝丽,基于生成对抗式网络的Modbus协议安全性测试方法[J].电网与清洁能源,2019,35(8):8-15. |
| [11] |
黄河,陈君,邓浩江.基于循环神经网络的Modbus/TCP模糊测试算法[J].计算机工程,2019,45(7):164-169. |
| [12] |
|
| [13] |
蒋昀昕.自适应小生境遗传算法的研究[D].淮安:安徽理工大学,2008:1-47. |
| [14] |
|
| [15] |
张冠宇,尚文利,张博文,一种结合遗传算法的工控协议模糊测试方法[J].计算机应用研究,2021,38(3):680-684. |
| [16] |
|
| [17] |
杨雄,吴东.遗传算法密码分析中改进选择算子研究[J].信息工程大学学报,2022,23(3):344-350. |
| [18] |
李志博,李清宝,张俭鸽.面向测试数据生成的遗传算法初始种群分布问题研究[J].信息工程大学学报,2020,21(2):236-241. |
| [19] |
章淑琴.基于遗传算法的模糊测试技术研究[D]. 武汉:华中科技大学,2011:1-55. |
| [20] |
文宇恒.基于协议逆向和模糊测试的PLC漏洞挖掘方法研究[D].杭州:浙江大学,2023:1-79. |
| [21] |
项力,马锐锋.基于遗传算法的Modbus TCP协议模糊测试技术研究[J].舰船电子工程,2020,40(10):149-153. |
| [22] |
The Modbus organization. Modbus application protocol specification: V1.1b [S].Westford,USA:Modbus-IDA,2006:1-51. |
| [23] |
|
| [24] |
Canadian Institute for Cybersecurity. CIC mo-dbus dataset 2023[EB/OL].(2023-08-01)[2024-08-07]. |
河南省重点研发专项(221111210300)
/
| 〈 |
|
〉 |