Journal of Computer Applications ›› 2023, Vol. 43 ›› Issue (6): 1861-1869.DOI: 10.11772/j.issn.1001-9081.2022050914
Special Issue: 网络空间安全
• Cyber security • Previous Articles Next Articles
Yiting SUN1,2, Yue GUO3(), Changjin LI3, Hongjun ZHANG3, Kang LIU4, Junjiao Liu1,2, Limin SUN1,2
Received:
2022-06-27
Revised:
2022-08-10
Accepted:
2022-08-11
Online:
2022-09-23
Published:
2023-06-10
Contact:
Yue GUO
About author:
SUN Yiting, born in 1996, M. S. candidate. Her research interests include industrial control security.Supported by:
孙怡亭1,2, 郭越3(), 李长进3, 张红军3, 刘康4, 刘俊矫1,2, 孙利民1,2
通讯作者:
郭越
作者简介:
孙怡亭(1996—),女,甘肃白银人,硕士研究生,主要研究方向:工控安全基金资助:
CLC Number:
Yiting SUN, Yue GUO, Changjin LI, Hongjun ZHANG, Kang LIU, Junjiao Liu, Limin SUN. Intrusion detection method for control logic injection attack against programmable logic controller[J]. Journal of Computer Applications, 2023, 43(6): 1861-1869.
孙怡亭, 郭越, 李长进, 张红军, 刘康, 刘俊矫, 孙利民. 可编程逻辑控制器的控制逻辑注入攻击入侵检测方法[J]. 《计算机应用》唯一官方网站, 2023, 43(6): 1861-1869.
Add to citation manager EndNote|Ris|BibTeX
URL: https://www.joca.cn/EN/10.11772/j.issn.1001-9081.2022050914
文件类型 | 含义 | 文件类型 | 含义 |
---|---|---|---|
0x03 | 配置文件 | 0x87 | 计数器 |
0x22 | 控制逻辑 | 0x88 | 控制位 |
0x82 | 输出 | 0x89 | 整型 |
0x83 | 输入 | 0x8A | 浮点数 |
0x84 | 状态 | 0x8E | ASCII |
0x85 | 二进制位 | 0x8D | 字符串 |
0x86 | 计时器 | 0x93 | PID |
Tab. 1 Common file types in PCCC protocol
文件类型 | 含义 | 文件类型 | 含义 |
---|---|---|---|
0x03 | 配置文件 | 0x87 | 计数器 |
0x22 | 控制逻辑 | 0x88 | 控制位 |
0x82 | 输出 | 0x89 | 整型 |
0x83 | 输入 | 0x8A | 浮点数 |
0x84 | 状态 | 0x8E | ASCII |
0x85 | 二进制位 | 0x8D | 字符串 |
0x86 | 计时器 | 0x93 | PID |
存储位置/B | 存储内容 | 存储位置/B | 存储内容 |
---|---|---|---|
1~2 | 文件类型 | 5~6 | 文件起始地址 |
3~4 | 大小 | 7~10 | 填充字段 |
Tab. 2 File information storage structure in configuration file
存储位置/B | 存储内容 | 存储位置/B | 存储内容 |
---|---|---|---|
1~2 | 文件类型 | 5~6 | 文件起始地址 |
3~4 | 大小 | 7~10 | 填充字段 |
梯级结构字段 | 字段含义 | 大小/B |
---|---|---|
Rung start | 梯级起始 | 2 |
Rung Signature | 梯级签名 | 2 |
Rung size | 梯级大小 | 2 |
Instruction Type | 操作码 | 2 |
File No | 文件号 | 1 |
Word Offset | 字偏移量 | 2 |
Bit Address | 位地址 | 2 |
Tab. 3 MicroLogix1400 PLC binary rung structure
梯级结构字段 | 字段含义 | 大小/B |
---|---|---|
Rung start | 梯级起始 | 2 |
Rung Signature | 梯级签名 | 2 |
Rung size | 梯级大小 | 2 |
Instruction Type | 操作码 | 2 |
File No | 文件号 | 1 |
Word Offset | 字偏移量 | 2 |
Bit Address | 位地址 | 2 |
IL指令 | 二进制指令 | IL指令 | 二进制指令 |
---|---|---|---|
MOV | 00 70 | OTE | 00 BC |
AND | 00 8C | MUL | 00 A4 |
OR | 00 90 | DIV | 00 A8 |
JMP | 00 58 | TOD | 01 48 |
END | 00 30 | MVM | 00 98 |
SUB | 00 A0 | XOR | 00 94 |
XIC | 00 E4 | NOT | 00 6C |
LIM | 00 FC | AIC | 01 FC |
ADD | 00 9C | JSR | 00 54 |
SQR | 01 18 | RET | 00 24 |
XIO | 00 E8 | LBL | 00 EC |
Tab. 4 Part of instruction mapping table of MicroLogix 1400 PLC
IL指令 | 二进制指令 | IL指令 | 二进制指令 |
---|---|---|---|
MOV | 00 70 | OTE | 00 BC |
AND | 00 8C | MUL | 00 A4 |
OR | 00 90 | DIV | 00 A8 |
JMP | 00 58 | TOD | 01 48 |
END | 00 30 | MVM | 00 98 |
SUB | 00 A0 | XOR | 00 94 |
XIC | 00 E4 | NOT | 00 6C |
LIM | 00 FC | AIC | 01 FC |
ADD | 00 9C | JSR | 00 54 |
SQR | 01 18 | RET | 00 24 |
XIO | 00 E8 | LBL | 00 EC |
文件类型 | 大小/B | 起始地址 |
---|---|---|
配置文件 | 412 | 0x4e00 |
程序块LAD2 | 30 | 0x52aa |
程序块LAD3 | 92 | 0x52c8 |
程序块LAD4 | 16 | 0x5324 |
程序块LAD5 | 32 | 0x5334 |
程序块LAD6 | 80 | 0x5354 |
Tab. 5 Configuration file parsing results
文件类型 | 大小/B | 起始地址 |
---|---|---|
配置文件 | 412 | 0x4e00 |
程序块LAD2 | 30 | 0x52aa |
程序块LAD3 | 92 | 0x52c8 |
程序块LAD4 | 16 | 0x5324 |
程序块LAD5 | 32 | 0x5334 |
程序块LAD6 | 80 | 0x5354 |
数据类型 | 物理地址 |
---|---|
整型INTEGER | N:7/0 |
整型INTEGER | N:7/17 |
计时器TIMER | T4:34 |
Tab. 6 LAD2 program address range
数据类型 | 物理地址 |
---|---|
整型INTEGER | N:7/0 |
整型INTEGER | N:7/17 |
计时器TIMER | T4:34 |
指令名 | 西门子S7 300/S7 400 | 施耐德M221 | MicroLogix 1400 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TIA (指令 数目) | 反编译 (指令 数目) | 准确度/% | 指令名 | So Machine Basic (指令数目) | 反编译 (指令 数目) | 准确度/% | 指令名 | RSLogix 500 (指令数目) | 反编译 (指令 数目) | 准确度/% | |
A | 330 | 330 | 100 | LD | 540 | 540 | 100 | XIC | 462 | 462 | 100 |
JU | 46 | 46 | 100 | LDN | 151 | 151 | 100 | XIO | 257 | 257 | 100 |
CLR | 10 | 10 | 100 | AND | 164 | 164 | 100 | OTE | 82 | 82 | 100 |
R | 27 | 27 | 100 | ANDN | 52 | 52 | 100 | TON | 125 | 125 | 100 |
NOP | 67 | 67 | 100 | ANDR | 81 | 81 | 100 | MCR | 5 | 5 | 100 |
JL | 8 | 8 | 100 | ANDF | 3 | 3 | 100 | LEQ | 3 | 3 | 100 |
UC | 51 | 51 | 100 | LDR | 21 | 21 | 100 | ADD | 2 | 2 | 100 |
T | 52 | 52 | 100 | R | 16 | 16 | 100 | SUB | 11 | 11 | 100 |
= | 159 | 159 | 100 | AND( | 58 | 58 | 100 | MUL | 4 | 4 | 100 |
OPN | 33 | 33 | 100 | ) | 11 | 11 | 100 | JSR | 53 | 53 | 100 |
AN | 81 | 81 | 100 | BLK | 32 | 32 | 100 | EQU | 8 | 8 | 100 |
O | 64 | 64 | 100 | OUT_BLK | 32 | 32 | 100 | OTU | 15 | 15 | 100 |
ON | 21 | 21 | 100 | END_BLK | 32 | 32 | 100 | END | 97 | 97 | 100 |
Tab. 7 Four PLC decompilation accuracy verification results
指令名 | 西门子S7 300/S7 400 | 施耐德M221 | MicroLogix 1400 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TIA (指令 数目) | 反编译 (指令 数目) | 准确度/% | 指令名 | So Machine Basic (指令数目) | 反编译 (指令 数目) | 准确度/% | 指令名 | RSLogix 500 (指令数目) | 反编译 (指令 数目) | 准确度/% | |
A | 330 | 330 | 100 | LD | 540 | 540 | 100 | XIC | 462 | 462 | 100 |
JU | 46 | 46 | 100 | LDN | 151 | 151 | 100 | XIO | 257 | 257 | 100 |
CLR | 10 | 10 | 100 | AND | 164 | 164 | 100 | OTE | 82 | 82 | 100 |
R | 27 | 27 | 100 | ANDN | 52 | 52 | 100 | TON | 125 | 125 | 100 |
NOP | 67 | 67 | 100 | ANDR | 81 | 81 | 100 | MCR | 5 | 5 | 100 |
JL | 8 | 8 | 100 | ANDF | 3 | 3 | 100 | LEQ | 3 | 3 | 100 |
UC | 51 | 51 | 100 | LDR | 21 | 21 | 100 | ADD | 2 | 2 | 100 |
T | 52 | 52 | 100 | R | 16 | 16 | 100 | SUB | 11 | 11 | 100 |
= | 159 | 159 | 100 | AND( | 58 | 58 | 100 | MUL | 4 | 4 | 100 |
OPN | 33 | 33 | 100 | ) | 11 | 11 | 100 | JSR | 53 | 53 | 100 |
AN | 81 | 81 | 100 | BLK | 32 | 32 | 100 | EQU | 8 | 8 | 100 |
O | 64 | 64 | 100 | OUT_BLK | 32 | 32 | 100 | OTU | 15 | 15 | 100 |
ON | 21 | 21 | 100 | END_BLK | 32 | 32 | 100 | END | 97 | 97 | 100 |
攻击样本种类 | 攻击次数 | 告警次数 | 西门子S7 300/S7 400 | 施耐德M221 | MicroLogix 1400 | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
检测精度/ % | 误报率/% | 漏报率/% | 检测精度/ % | 误报率/% | 漏报率/% | 检测精度/ % | 误报率/% | 漏报率/% | |||
恶意程序完全覆盖 | 300 | 300 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 |
注入/删除/替换程序块 | 482 | 482 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 |
块级控制流劫持 | 240 | 237 | 100.00 | 0.00 | 0.00 | 97.14 | 0.00 | 3.33 | 99.29 | 0.00 | 1.11 |
注入/删除梯级 | 384 | 384 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 |
非法地址读/写操作 | 921 | 943 | 99.01 | 1.57 | 0.24 | 92.50 | 6.89 | 8.67 | 97.84 | 2.29 | 2.79 |
恶意指令注入/篡改 | 945 | 907 | 97.71 | 2.72 | 1.68 | 94.40 | 1.87 | 7.31 | 97.14 | 1.06 | 3.98 |
非法数据篡改 | 675 | 666 | 98.55 | 0.66 | 3.53 | 94.39 | 4.95 | 6.29 | 96.75 | 2.41 | 4.24 |
碎片噪声填充攻击 | 226 | 222 | 98.76 | 0.00 | 1.64 | 98.82 | 0.00 | 1.81 | 98.49 | 0.00 | 1.81 |
Tab. 8 Four PLC detection performance verification results
攻击样本种类 | 攻击次数 | 告警次数 | 西门子S7 300/S7 400 | 施耐德M221 | MicroLogix 1400 | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
检测精度/ % | 误报率/% | 漏报率/% | 检测精度/ % | 误报率/% | 漏报率/% | 检测精度/ % | 误报率/% | 漏报率/% | |||
恶意程序完全覆盖 | 300 | 300 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 |
注入/删除/替换程序块 | 482 | 482 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 |
块级控制流劫持 | 240 | 237 | 100.00 | 0.00 | 0.00 | 97.14 | 0.00 | 3.33 | 99.29 | 0.00 | 1.11 |
注入/删除梯级 | 384 | 384 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 | 100.00 | 0.00 | 0.00 |
非法地址读/写操作 | 921 | 943 | 99.01 | 1.57 | 0.24 | 92.50 | 6.89 | 8.67 | 97.84 | 2.29 | 2.79 |
恶意指令注入/篡改 | 945 | 907 | 97.71 | 2.72 | 1.68 | 94.40 | 1.87 | 7.31 | 97.14 | 1.06 | 3.98 |
非法数据篡改 | 675 | 666 | 98.55 | 0.66 | 3.53 | 94.39 | 4.95 | 6.29 | 96.75 | 2.41 | 4.24 |
碎片噪声填充攻击 | 226 | 222 | 98.76 | 0.00 | 1.64 | 98.82 | 0.00 | 1.81 | 98.49 | 0.00 | 1.81 |
1 | STOUFFER K, FALCO J, SCARFONE K, et al. Guide to Industrial Control Systems (ICS) security: NIST Special Publication 800-82 Revision 2 [EB/OL]. (2015-05) [2022-03-11].. |
2 | LANGNER R. Stuxnet: dissecting a cyberwarfare weapon[J]. IEEE Security and Privacy, 2011, 9(3): 49-51. 10.1109/msp.2011.67 |
3 | LEE R M, ASSANTE M J, CONWAY T. Analysis of the cyber attack on the Ukrainian power grid: defense use case: traffic light protocol: white[EB/OL]. (2016-03-18) [2022-03-11].. |
4 | SENTHIVEL S, DHUNGANA S, YOO H, et al. Denial of engineering operations attacks in industrial control systems[C]// Proceedings of the 8th ACM Conference on Data and Application Security and Privacy. New York: ACM, 2018: 319-329. 10.1145/3176258.3176319 |
5 | KALLE S, AMEEN N, YOO H, et al. CLIK on PLCs! attacking control logic with decompilation and virtual PLC [C]// Proceedings of the 2019 Workshop on Binary Analysis Research. Reston, VA: Internet Society, 2019: 1-12. 10.14722/bar.2019.23074 |
6 | KLICK J, LAU S, MARZIN D, et al. Internet-facing PLCs — a new back orifice [C/OL]// Proceedings of the 2015 Blackhat USA [2022-03-11].. 10.1109/cns.2015.7346865 |
7 | YOO H, AHMED I. Control logic injection attacks on industrial control systems[C]// Proceedings of the 2019 IFIP International Conference on ICT Systems Security and Privacy Protection, IFIPAICT 562. Cham: Springer, 2019: 33-48. 10.1007/978-3-030-22312-0_3 |
8 | International Electrotechnical Commission. Programmable controllers — part 3: programming languages: IEC 61131-3 [S]. Rosslyn, VA: National Electrical Manufacturers Association, 2005. |
9 | SUN R M, MERA A, LU L, et al. SoK: attacks on industrial control logic and formal verification-based defenses[C]// Proceedings of the 2021 IEEE European Symposium on Security and Privacy. Piscataway: IEEE, 2021: 385-402. 10.1109/eurosp51992.2021.00034 |
10 | SPENNEBERG R, BRÜGGEMANN M, SCHWARTKE H. PLC-blaster: a worm living solely in the PLC [C/OL]// Proceedings of the 2016 Black Hat Asia [2022-03-11].. |
11 | GOVIL N, AGRAWAL A, TIPPENHAUER N O. On ladder logic bombs in industrial control systems [C]// Proceedings of the 2017 International Workshop on Security and Privacy Requirements Engineering/ International Workshop on the Security of Industrial Control Systems and Cyber-Physical Systems, LNCS 10683. Cham: Springer, 2018: 110-126. |
12 | SENTHIVEL S, AHMED I, ROUSSEV V. SCADA network forensics of the PCCC protocol [J]. Digital Investigation, 2017, 22: S57-S65. 10.1016/j.diin.2017.06.012 |
13 | MALCHOW J O, MARZIN D, KLICK J, et al. PLC Guard: a practical defense against attacks on cyber-physical systems[C]// Proceedings of the 2015 IEEE Conference on Communications and Network Security. Piscataway: IEEE, 2015: 326-334. 10.1109/cns.2015.7346843 |
14 | ABBASI A, HOLZ T, ZAMBON E, et al. ECFI: asynchronous control flow integrity for programmable logic controllers[C]// Proceedings of the 33rd Annual Computer Security Applications Conference. New York: ACM, 2017: 437-448. 10.1145/3134600.3134618 |
15 | Bond Digital. Quickdraw-Snort: digital Bond’s IDS/IPS rules for ICS and ICS protocols[EB/OL]. (2020-10-03) [2022-03-11].. |
16 | YOO H, KALLE S, SMITH J, et al. Overshadow PLC to detect remote control-logic injection attacks [C]// Proceedings of the 2019 International Conference on Detection of Intrusions and Malware, and Vulnerability Assessment, LNCS 11543. Cham: Springer, 2019: 109-132. |
17 | NEWELL J, PANG L N, TREMAINE D, et al. Translation of IEC 61131-3 function block diagrams to PVS for formal verification with real-time nuclear application[J]. Journal of Automated Reasoning, 2018, 60(1): 63-84. 10.1007/s10817-017-9415-7 |
18 | ZHANG M, CHEN C Y, KAO B C, et al. Towards automated safety vetting of plc code in real-world plants [C]// Proceedings of the 2019 IEEE Symposium on Security and Privacy. Piscataway: IEEE, 2019: 522-538. 10.1109/sp.2019.00034 |
19 | JANICKE H, NICHOLSON A, WEBBER S, et al. Runtime-monitoring for industrial control systems[J]. Electronics, 2015, 4(4): 995-1017. 10.3390/electronics4040995 |
20 | McLAUGHLIN S E, ZONOUZ S A, POHLY D J, et al. A trusted safety verifier for process controller code [C]// Proceedings of the 2014 Network and Distributed System Security Symposium. Reston, VA: Internet Society, 2014: 1-15. 10.14722/ndss.2014.23043 |
21 | CHANG T Y, WEI Q, LIU W W, et al. Detecting PLC program malicious behaviors based on state verification [C]// Proceedings of the 2018 International Conference on Cloud Computing and Security, LNCS 11067. Cham: Springer, 2018: 241-255. |
22 | FERNÁNDEZ ADIEGO B, DARVAS D, BLANCO VIÑUELA E, et al. Applying model checking to industrial-sized PLC programs[J]. IEEE Transactions on Industrial Informatics, 2015, 11(6): 1400-1410. 10.1109/tii.2015.2489184 |
23 | CHADWICK S, JAMES P, ROGGENBACH M, et al. Formal methods for industrial interlocking verification [C]// Proceedings of the 2018 International Conference on Intelligent Rail Transportation. Piscataway: IEEE, 2018: 1-5. 10.1109/icirt.2018.8641579 |
24 | RAWLINGS B C, WASSICK J M, YDSTIE B E. Application of formal verification and falsification to large-scale chemical plant automation systems[J]. Computers and Chemical Engineering, 2018, 114: 211-220. 10.1016/j.compchemeng.2017.11.004 |
25 | 中国科学院信息工程研究所. PLC控制逻辑攻击检测方法及装置: 202111306385.0 [P]. 2022-04-19. |
Institute of Information Engineering,Chinese Academy of Sciences. PLC control logic attack detection method and device: 202111306385.0 [P]. 2022-04-19. |
[1] | Zihao YAO, Yuanming LI, Ziqiang MA, Yang LI, Lianggen WEI. Multi-object cache side-channel attack detection model based on machine learning [J]. Journal of Computer Applications, 2024, 44(6): 1862-1871. |
[2] | Jihui LIU, Chengwan HE. Online detection of SQL injection attacks based on ECA rules and dynamic taint analysis [J]. Journal of Computer Applications, 2023, 43(5): 1534-1542. |
[3] | Xiangju LIU, Xiaobao LU, Xianjin FANG, Linsong SHANG. Low-rate denial-of-service attack detection method under software defined network environment [J]. Journal of Computer Applications, 2022, 42(4): 1301-1307. |
[4] | LIU Xiangju, LIU Pengcheng, XU Hui, ZHU Xiaojuan. Distributed denial of service attack detection method based on software defined Internet of things [J]. Journal of Computer Applications, 2020, 40(3): 753-759. |
[5] | TIAN Jiwei, WANG Buhong, SHANG Fute. False data injection attacks based on robust principal component analysis in smart grid [J]. Journal of Computer Applications, 2017, 37(7): 1943-1947. |
[6] | CHEN Hong, WAN Guangxue, XIAO Zhenjiu. Intrusion detection method of deep belief network model based on optimization of data processing [J]. Journal of Computer Applications, 2017, 37(6): 1636-1643. |
[7] | ZHANG Ye, LU Yuliang. Control flow analysis method of PLC program [J]. Journal of Computer Applications, 2017, 37(12): 3581-3585. |
[8] | MAN Yujia, YIN Qing, ZHU Xiaodong. Fine-grained data randomization technique based on field-sensitive pointer analysis [J]. Journal of Computer Applications, 2016, 36(6): 1567-1572. |
[9] | WEN Liang, JIANG Wei, PAN Xiong, ZHOU Keran, DONG Qi, WANG Junlong. Optimization design of preventing fault injection attack on distributed embedded systems [J]. Journal of Computer Applications, 2016, 36(2): 495-498. |
[10] | LIU Dai-fei DUAN Hua-yan ZHU Meng-zi. Development and application of intelligent control system for post parcel servo based on Modbus protocol [J]. Journal of Computer Applications, 2012, 32(05): 1477-1480. |
[11] | LIU Qing-lin MENG Ke LI Su-feng. Attack detection method based on statistical process control in collaborative recommender system [J]. Journal of Computer Applications, 2012, 32(03): 707-709. |
[12] | Yang Su . Detecting worms based on candidate combination frequent pattern in Internet backbones [J]. Journal of Computer Applications, 2009, 29(1): 178-180. |
[13] | WANG Sheng,SUN Le-chang,GAN Guo-zheng. Application research based on Granger causality test for attack detection [J]. Journal of Computer Applications, 2005, 25(06): 1282-1285. |
Viewed | ||||||
Full text |
|
|||||
Abstract |
|
|||||