Identifying and Verifying Vulnerabilities through PLC Network Protocol and Memory Structure Analysis

一、摘要

本研究中,对XGB PLC进行了漏洞分析,该PLC利用制造商专门开发的XGT和GLOFA协议,通过分析PLC的网络协议和存储器结构来识别安全漏洞,并利用这些漏洞发起重放攻击、存储器调制攻击和FTP/Web服务帐户盗窃,以验证结果。根据结果,这些攻击被证明能够导致PLC发生故障并使其失效,并对发现的漏洞进行了定义。

二、介绍

(一)PLC存储结构

PLC具有易失性和非易失性存储器,每个存储器存储操作所需的系统软件和用户为控制PLC而编程的逻辑。本研究中用于分析的PLC提供了一个界面,通过使用字母表定义每个存储区域,可以从工程工作站(EWS)查看存储区域。表2显示了具有代表性的存储器区域。XG5000的存储器接口允许用户编辑存储器区域;尽管如此,用户无法通过界面直接访问含有影响PLC操作的敏感数据的区域。

表1:代表性存储器区域

存储器区域

(二)协议结构

XGB PLC的以太网协议有两种类型:用于HMI和PLC之间通信的XGT协议,以及用于XG5000和PLC之间通信的GLOFA协议。对ICS的网络攻击主要针对EWS,EWS运行ICS上控制设备的总体编程和管理,获得EWS的控制权意味着全面控制ICS。
因此,在本研究中,分析GLOFA协议以攻击EWS和PLC之间的通信,用于分析的数据包是从XG5000向PLC发送运行/停止命令的数据包。GLOFA协议使用端口号2002进行通信,而XG5000通过TCP 三次握手过程连接到PLC。流程完成后,使用图1所示的GLOFA协议传递PLC的基本信息并建立初始连接。

图1:GLOFA协议中的初始连接建立

连接建立
GLOFA协议的帧结构如表2所示。

表2:GLOFA协议的帧结构

协议结构
在XG5000和PLC之间建立通信后,在发送“PLC运行”命令时发送图2中的数据包。对图2中的分组的分析发现字符串M是模式,R表示“Run”命令。此外,当从PLC发送“停止”命令时,字符串R替换为S;仅更改相应的字符串和校验和值,网络数据包上的其他值不受影响。

图2:PLC运行命令的数据包

运行命令

(三)FTP/Web服务

本研究中用于分析的PLC支持FTP/Web服务,并允许通过FTP/Web连接访问PLC上的安全数字(SD)卡。连接到服务后,SD卡上的数据日志文件可以复制到用户的PC或其他设备上(可编程逻辑控制器提供的FTP/Web服务仅支持下载)。这种访问需要在XG5000上设置帐户,并且发现帐户信息存储在PLC的项目文件中。

三、实验评估

(一)实验设计

对PLC的GLOFA协议的分析暴露了其漏洞,并通过一项利用这些漏洞的潜在攻击的实验进行了验证。实验使用三种方法进行:重放攻击、存储器调制攻击和帐户盗窃攻击。表3显示了实验装置,图3显示了网络结构。

表3 实验装置

实验装置

图3:网络结构图

结构

(二) 攻击测试

(1)重放攻击

重放攻击的数据包是用于向PLC发送运行命令的数据包,如果XG5000和PLC之间建立了正常的通信,将从PLC收到图4中红色部分。当重新发送的分组被PLC识别为正常通信时,给出了相同的响应,PLC在不应用任何限制的情况下将相应的分组数据识别为正常数据。这意味着,攻击者在通过网络嗅探分析正常控制命令后,可以通过调制控制命令包向PLC发送恶意控制命令,并可能通过下载恶意逻辑和导致PLC故障对现场设备造成物理损坏。

图4:PLC运行命令的响应数据包

响应数据

(2)存储器调制攻击

我们以表1中的F区域为目标,在实验中,首先获得正常记忆区的数据;然后创建命令包以写入用Pwntools调制的数据。之后,使用重放攻击方法发起存储器调制攻击,在验证攻击是否成功时,利用XG5000的存储器接口功能查看调制数据是否插入实际存储器区域。

图5:使用pwntools的存储器调制攻击

攻击代码
对XG5000用户无法访问的区域进行基于网络分组的存储器调制攻击,发现如图6所示的值为0x5000的F0001区域已更改为0xABCD。

图6:通过攻击调整的存储器值

攻击效果
为了验证附加攻击的连锁反应,我们在PLC中起关键作用的系统标志存储器区域(F区域)上发起了存储器调制攻击,可编程逻辑控制器遇到许多错误,并且变得无法工作,在这种情况下,根本不可能进行任何操作。

(3)FTP/Web服务帐户盗窃攻击

使用XG5000建立与PLC的连接可以下载PLC中的活动项目文件,实验证明,账户信息存储在存储区,没有加密;这也意味着攻击者可以通过提前分析PLC的存储器区域轻松窃取帐户信息。通过此攻击访问服务,攻击者可以获取PLC的操作日志;上传的项目文件将提供特定的攻击信息,如PLC的结构和控制逻辑。

(三)漏洞定义

表4显示了本研究中进行的实验验证的漏洞。

表4: PLC上漏洞的定义

在这里插入图片描述

四、总结

在本研究中,分析了部署在ICS中的PLC的漏洞,以确定攻击的可行性。此外,本文还确认了利用这些漏洞进行攻击的可行性,并根据实验结果定义了需要改进的漏洞,识别所述漏洞和验证攻击都有助于为现场操作员制定措。
未来的研究将通过分析漏洞和发起攻击,重点分析和研究可编程逻辑控制器的运行环境问题,我们还将对先前建议的漏洞保护措施进行研究。

Akpinar, K. O.; Ozcelik, I. (2019): Analysis of machine learning methods in EtherCAT-
based anomaly detection. IEEE Access, vol. 7, pp. 184365-184374. 
Cheng, L.; Li, D.; Ma, L. (2017): The spear to break the security wall of S7commplus. 
Proceedings of Black Hat USA, pp. 1-12. 
Chien, E.; Murchu, L. O.; Falliere, N. (2011): W32.Duqu: the precursor to the next 
Stuxnet. Symantec Security Response, pp. 1-71. 
Dabidson, C. C.; Andel, T. R.; Yampolskiy, M.; McDonald, J. T.; Glisson, W. B. 
(2018): On SCADA PLC and fieldbus cyber-security. Proceedings of 13th International 
Conference on Cyber Warfare and Security, pp. 140-148. 
Falliere, N.; Murchu, L. O.; Chien, E. (2010): W32.Stuxnet Dossier. Symantec Security 
Response, pp. 1-64. 
Farhangi, H. (2010): The path of the smart grid. IEEE Power and Energy Magazine, vol. 
8, no. 1, pp. 18-28. 
Gomez, A. L. P.; Maimo, L. F.; Celdran, A. H.; Clemente, F. G.; Sarmiento, C. C. et 
al. (2019): On the generation of anomaly detection datasets in industrial control system. 
IEEE Access, vol. 7, pp. 177460-177473. 
IEC  (2013):  International  standard  IEC  61131-3  (edition3.0)  programmable  logic 
controllers, part 3: programming languages. International Electrotechnical Commission, 
pp. 1-220. 
Khan,  R.;  Maynard,  P.;  McLaughlin,  K.;  Laverty,  D.;  Sezer,  S.  (2016):  Threat 
analysis  of  BlackEnergy  malware  for  synchrophasor  based  real-time  control  and 
monitoring in smart grid. Proceedings of 4th International Symposium for ICS & SCADA 
Cyber Security Research, pp. 53-63. 
Lutz, M. A.; Vogt, S.; Berkhout, V.; Faulstich, S.; Dienst, S. et al. (2020): Evaluation 
of anomaly detection of an autoencoder based on maintenance information and SCADA-
data. Journal of Energies, vol. 13, pp. 1-18. 
Malchow,  J.;  Marzin,  D.;  Klick,  J.;  Kovacs,  R.;  Roth,  V.  (2015):  PLC  guard:  a 
practical  defense  against  attacks  on  cyber  physical  systems. Proceedings  of  IEEE 
Conference on Communications and Network Security, pp. 326-334.
Mochizuki,  A.;  Sawada,  K.;  Shin,  S.;  Hosokawa,  S.  (2018):  On  experimental 
verification of model based white list for PLC anomaly detection. Proceedings of 11th 
Asian Control Conference, pp. 1766-1771. 
Rrushi,  J.;  Farhangi,  H.;  Howey,  C.;  Carmichael,  K.;  Dabell,  J.  (2015):  A 
quantitative evaluation of the target selection of Havex ICS malware plugin. Proceedings 
of Industrial Control System Security Workshop, pp. 1-5. 
Sandaruwan, G. P. H.; Ranaweera, P. S.; Oleshchuk, V. A. (2013): PLC security and 
critical infrastructure protection. Proceedings of IEEE 8th International Conference on 
Industrial and Information Systems, pp. 81-85. 
Spenneberg, R.; Bruggemann, M.; Schwartke, H. (2016): PLC-blast: a worm living 
solely in the PLC. Proceedings of Black Hat Asia, pp. 1-16. 
Voyiatzis,  A.  G.;  Katsigiannis,  K.;  Koubias,  S.  (2015):  A  Modbus/TCP fuzzer for 
testing  internetworked  industrial  systems. Proceedings  of  IEEE  20th  Conference  on 
Emerging Technologies & Factory Automation, pp. 1-6. 
Wardak, H.; Zhioua, S.; Almulhem, A. (2016): PLC access control: a security analysis. 
Proceedings of World Congress on Industrial Control Systems Security, pp. 56-61. 
Yau, K.; Chow, K. P. (2015): PLC forensics based on control program logic change 
detection. Journal of Digital Forensics, Security and Law, vol. 10, no. 4, pp. 59-68. 
Ylmaz, E. N.; Ciylan, B.; Gönen, S.; Sindiren, E.; Karacayılmaz, G. (2018): Cyber 
security  in  industrial  control  systems:  analysis  of  DoS  attacks  against  PLCs  and  the 
insider effect. Proceedings of 6th International Istanbul Smart Grids and Cities Congress 
and Fair, pp. 81-85. 
You,  Y.  J.;  Oh,  J.  Y.;  Kim,  S.  H.;  Lee,  K.  H.  (2018):  Advanced  approach  to 
information  security  management  system  utilizing  maturity  models  in  critical 
infrastructure. KSII Transactions on Internet and Information Systems, vol. 12, no. 10, pp. 
4995-5012.

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>