Securing_Modbus_TCP_Communications_in_I4.0_A_Penetration_Testing_Approach_Using_OpenPLC_and_Factory_IO
Securing_Modbus_TCP_Communications_in_I4.0_A_Penetration_Testing_Approach_Using_OpenPLC_and_Factory_IO
Dimitrios Tzovaras
Information Technologies Institute (ITI)
Centre for Research & Technology
Hellas
Thessaloniki, Greece
[email protected]
Abstract— The advent of Industry 4.0 has brought forward security posture of Modbus TCP implementations in industrial
transformative advancements in industrial automation and systems.
control systems, enhancing operational efficiency and
productivity. Among the key communication protocols The current research paper embarks on a journey to address
facilitating this paradigm shift, Modbus TCP is a widely the pressing need for enhanced cybersecurity in industrial
adopted protocol for real-time data exchange between devices in systems. Leveraging the power of penetration testing, we
industrial environments. However, the proliferation of explore the vulnerabilities and potential attack vectors that
interconnected devices also raises significant cybersecurity may threaten Modbus TCP communications. To conduct this
concerns. The current paper presents a comprehensive research, we employ a robust, comprehensive but semi open-
penetration testing approach aimed to securing Modbus TCP source testing software environment consisting of OpenPLC,
communications within the context of Industry 4.0. Leveraging Factory IO, pfSense and Kali Linux. Through this approach,
the capabilities of software platforms, such as OpenPLC and we aim to assess the security landscape of Modbus TCP in
Factory IO, we simulate industrial control systems to assess the industrial settings, identify weaknesses and propose a
vulnerabilities and weaknesses present in Modbus TCP penetration testing strategy, with the ultimate goal of further
implementations. By proactively addressing Modbus TCP researching on automating the penetration testing process by
security issues, our research work contributes to the introducing Machine Learning (ML) techniques in order to
safeguarding of critical infrastructure and underscores the
simplify the whole procedure. With this approach, we
importance of cybersecurity in the Industry 4.0 era.
endeavour to contribute to the protection of critical
Keywords—Industry 4.0, Modbus TCP, penetration testing, infrastructure, ensuring its resilience against the evolving
simulation, cybersecurity, PLC threat.
The rest of the paper is organized as follows: Section II
I. INTRODUCTION
presents background information on Modbus TCP penetration
In an era marked by the convergence of Information testing together with the related work. Section III analyzes the
Technology (IT) and Operational Technology (OT) in the industrial simulation environment, presenting all
scope of Industry 4.0 (I4.0), the industrial landscape has aforementioned tools that are jointly utilized. Section IV
witnessed unprecedented transformations. Industrial Control illustrates the conducted penetration testing procedures,
Systems (ICSs), once isolated and proprietary, have now taking advantage of the earlier-mentioned testbed and lists the
become interconnected and increasingly reliant on standard findings, while Section V concludes the performed work and
networking protocols. Among these, Modbus TCP stands as a proposes potential future directions.
prominent choice for communication within industrial
systems, offering efficiency and flexibility. However, the II. BACKGROUND AND RELATED WORK
integration of Modbus TCP into the fabric of critical
infrastructure has not come without its cybersecurity The discussion about security for ICSs, particularly of
challenges. Modbus TCP communications, has garnered significant
attention in recent years due to the growing interconnectivity
The proliferation of interconnected devices and the advent of of industrial devices and the potential risks associated with
the Industrial Internet of Things (IIoT) have expanded the cyberattacks on critical infrastructure. A wealth of research
attack surface of industrial environments, rendering them and practical solutions has emerged to address the unique
susceptible to a spectrum of cyber threats. Securing Modbus security challenges posed by Modbus TCP and similar
TCP communications is of paramount importance, as any protocols. More specifically, authors in [1] demonstrate the
security compromise could lead to severe consequences, potential of misuse-based Intrusion Detection Systems (IDSs)
including unauthorized access, data manipulation and system to detect and prevent attacks on Modbus/TCP-based Industrial
downtime. Thus, it is imperative to thoroughly evaluate the Automation and Control Systems (IACSs). The proposed
Authorized licensed use limited to: Universita degli Studi di Genova. Downloaded on December 10,2024 at 08:14:48 UTC from IEEE Xplore. Restrictions apply.
979-8-3503-9538-9/23/$31.00 ©2023 IEEE 265
2023 IEEE Conference on Standards for Communications and Networking (CSCN)
approach is simple to be implemented and can be used to focusing on the increasing use of open-source software and
detect a wide range of attacks. Nevertheless, the authors of the hardware, the increasing use of cloud computing to deploy and
work in [2] present a novel and effective approach to securing manage these testbeds and finally the increasing use of AI and
industrial communication protocols. This proposal, based on ML to improve the effectiveness of ICS testbeds.
a widely used protocol, addresses several key security
vulnerabilities and can be used to protect ICSs from various III. SIMULATION ENVIRONMENT
attacks. One of the most significant challenges in the industrial
Previous research efforts have delved into the security cybersecurity sector is the prohibitive cost of purchasing the
assessment of Modbus TCP in industrial settings. Notable devices, together with any software licensing, required to gain
studies have conducted vulnerability assessments, penetration practical experience working with OT systems and processes.
tests and threat-modelling to uncover weaknesses and Virtualization is an excellent method to overcome this
potential attack vectors. These assessments have revealed obstacle and start becoming familiar with the protocols and
weaknesses of unauthorized access, command injection and characteristics of the ICS world with only a relatively small
data manipulation, and the need for advanced security. primary cost.
Authors in [3] present an approach for testing the security of
Modbus TCP devices. The proposed tool, namely MTF, can
easily be used to find a wide range of security vulnerabilities
and by organizations to improve the security of their IACSs.
On the other hand, authors in [4] propose a combined AI-
based detection and SDN-based mitigation solution to defend
the IIoT against Modbus TCP threats, while in [5] authors
propose a novel method for enhancing the cybersecurity of
Modbus TCP-based IACSs by implementing an
authentication method based on Message Authentication
Codes (MACs).
Penetration testing has also emerged as a crucial tool in
assessing the cybersecurity of industrial systems. Researchers
Fig. 1. Physical architectural diagram of simulated environment
and practitioners have employed penetration testing
methodologies to identify vulnerabilities in critical
Figure 1 depicts the simulated industrial environment that
infrastructure components, including Programmable Logic
consists of the following components, all of which were
Controllers (PLCs), Remote Terminal Units (RTUs) and
installed on a Windows 11 host machine (Intel Core i5-6600
Human-Machine Interfaces (HMIs). These assessments have
CPU @ 3.30Ghz, 40GB RAM, 2x 1TB SSD), either as Virtual
provided valuable insights into the security of industrial
Machines (VMs) or straight installations on the host:
environments, emphasizing the significance of rigorous
testing and security audits. The authors in [6] investigate • pfSense: Software for simulating the network equipment
methods to secure RTUs in smart grid systems. RTUs are the
• SCADABR: Software for simulating the HMI
building blocks of smart grids and are responsible for
collecting and transmitting data from field devices to central • OpenPLC: Software for simulating the PLC
control systems. However, RTUs are also vulnerable to a • OpenPLC Editor: Complementary software in order to
variety of cyberattacks, which could disrupt or disable the program the PLC activities
smart grid. Going one step further, researchers have already
studied the possibility of integrating Artificial Intelligence • Factory IO: Software for simulating the RTU (driver)
(AI) into the process of penetration testing in order to make it and the sensors & actuators (scene)
more automated, smarter and less time consuming. For this • Kali Linux: Operating System (OS) simulating the
reason, authors in [7] present a comprehensive overview of the malicious actions against the Modbus TCP simulation
state-of-the-art, and the benefits and the research challenges environment
of AI-enabled IoT penetration testing.
The use of industrial simulation environments, such as A. pfSense
OpenPLC and Factory IO, has gained prominence for pfSense is an open-source, FreeBSD-based firewall and
evaluating ICS security. These platforms enable researchers to routing software that has gained significant popularity in the
create realistic industrial scenarios, replicate system field of network security and management. It was initially
configurations and conduct controlled experiments. Studies developed as a fork of the m0n0wall project [10] in 2004 and
have demonstrated the effectiveness of such environments in has evolved into a robust and versatile solution for a wide
assessing the security of industrial protocols, making them range of networking needs. With flexibility and scalability, it
invaluable tools for security researchers. An example of a
suits businesses, schools, and individuals. pfSense boasts a
developed industrial testbed is presented in [8], where authors
describe a novel testbed for cybersecurity analysis of Nuclear rich feature set that caters to diverse network requirements.
Power Plants (NPPs). The testbed is open-source and based on Core features include NAT, VPN, and traffic shaping,
the Modbus protocol. It can be used to simulate a realistic NPP managed via an intuitive web interface. pfSense excels at
environment and to test the security of ICS devices and Quality of Service (QoS) for bandwidth optimization and
networks. Besides the aforementioned testbed, authors in [9] supports packages like IDS/IPS, content filtering, and proxy
survey a wide range of ICS testbeds, including testbeds that services. In the context of our testbed, pfSense runs in a VM
are developed by academia, industry or government agencies and created two network interfaces as depicted in Figure 2.
Authorized licensed use limited to: Universita degli Studi di Genova. Downloaded on December 10,2024 at 08:14:48 UTC from IEEE Xplore. Restrictions apply.
266
2023 IEEE Conference on Standards for Communications and Networking (CSCN)
Authorized licensed use limited to: Universita degli Studi di Genova. Downloaded on December 10,2024 at 08:14:48 UTC from IEEE Xplore. Restrictions apply.
267
2023 IEEE Conference on Standards for Communications and Networking (CSCN)
Authorized licensed use limited to: Universita degli Studi di Genova. Downloaded on December 10,2024 at 08:14:48 UTC from IEEE Xplore. Restrictions apply.
268
2023 IEEE Conference on Standards for Communications and Networking (CSCN)
Authorized licensed use limited to: Universita degli Studi di Genova. Downloaded on December 10,2024 at 08:14:48 UTC from IEEE Xplore. Restrictions apply.
269
2023 IEEE Conference on Standards for Communications and Networking (CSCN)
Having analyzed all Modbus information and with the usage to an I4.0 scene. The penetration testing activities described
of the information collected by Factory IO, we are able to in the current research paper will be further developed, taking
distinguish which actuators are in which production line and advantage of ML algorithms that will automate the
performed all corresponding activities. At this point, it is procedures and itroduce intelligence that will eliminate the
worth mentioning that in all Modbus communications (TCP, human intervention in some steps of the penetration testing
RTU) there are no security mechanisms implemented, process. The final step will include the deployment of the
meaning that someone could have full access to the industrial AI-based automated penetration module in a real
information allowing a malicious actor to read and write all industrial environment in the context of the research project
data in Modbus communications. Consequently, the packet funding this work. This will allow us to draw conclusions of
sniffing with Wireshark revealed several pieces of the proposed algorithm in a real environment and examine as
information that could be used to compromise the Modbus many as possible communication protocols.
TCP communication.
ACKNOWLEDGMENT
Based on the information gathered using the Wireshark tool
This work has received funding from the European Union’s
and taking advantage of the known information on the
Horizon Europe research and innovation programme under
sensors and actuators in Factory IO, also including the
grant agreement No. 101057083 – Zero-SWARM
mapping of the components used in the scene, we are able to
recognize the packet sequences they exchange. By listing the REFERENCES
exact bits they receive, the security researcher had the ability [1] F. Katulić, D. Sumina, I. Erceg and S. Groš, “Enhancing Modbus/TCP-
to intervene and execute a Man-in-The-Middle (MiTM) Based Industrial Automation and Control Systems Cybersecurity Using
attack and inject different bits than those sent regularly. This a Misuse-Based Intrusion Detection System“, in Proceedings of the
action was conducted using the Metasploit framework of International Symposium on Power Electronics, Electrical Drives,
Automation and Motion (SPEEDAM), Sorrento, Italy, pp. 964-969,
Kali. More specifically, it provides a Modbus tool that allows 2022.
the user, to read the registers and then perform the [2] W. Jingran, L. Mingzhe, X. Aidong, H. Bo, H. Xiaojia and Z. Xiufang,
intervention (write function) of a different bit. This leads to “Research and Implementation of Secure Industrial Communication
the malfunction of the production line, causing several Protocols”, in Proceedings of the IEEE International Conference on
Artificial Intelligence and Information Systems (ICAIIS), Dalian,
damage and financial loss. Besides Metasploit, another China, pp. 314-317, 2020.
Modbus penetration testing tool was examined, namely the [3] A. Voyiatzis , K. Katsigiannis, and S. Koubias,. “A Modbus/TCP
Smod tool, but the attacks conducted through this tool did not fuzzer for testing internetworked industrial systems”, in Proceedings
affect the operations of the testbed at all. of the 20th IEEE Conference on Emerging Technologies & Factory
Automation (ETFA 2015), pp. 1–6, 2015.
V. CONCLUSIONS [4] P. Radoglou-Grammatikis et al., “Defending Industrial Internet of
Things Against Modbus/TCP Threats: A Combined AI-Based &
The current work presented the initial work of our Detection and SDN-Based Mitigation Solution,” SSRN Electronic
cybersecurity research in industrial environments, aiming at Journal, 2022.
the development of an industrial AI-based automated [5] F. Katulić, D. Sumina, S. Groš and I. Erceg, “Protecting Modbus/TCP-
penetration testing module that can be easily used by anyone, Based Industrial Automation and Control Systems Using Message
Authentication Codes”, in IEEE Access, vol. 11, pp. 47007-47023,
without the need of any particular cybersecurity knowledge. 2023.
Towards this direction, we first deployed a industrial [6] E. R. Ling, J. E. Urrea Cabus, I.Butun, R. Lagerström, and J. Olegard,
simulated environment to be able to simulate modbus “Securing Communication and Identifying Threats in RTUs: A
communications and then we gathered the necessary Vulnerability Analysis”, in Proceedings of the 17th International
information in order to perform the penetration tests. The first Conference on Availability, Reliability and Security (ARES 2022). pp.
1–7, 2022.
results reveal that the Modbus TCP protocol can be easily
[7] Greco Claudia, Fortino Giancarlo, Crispo Bruno, Choo Kim-Kwang
compromized by performing only a simple attack by injecting Raymond “AI-enabled IoT penetration testing: state-of-the-art and
information different from the information expected. The research challenges”, Enterprise Information Systems, vol. 17, issue 9,
findings of these tests where illustrated in the simulation pp. 1223–1247, 2023.
environment of Factory IO, showing that the production line [8] I. B. de Brito and R. T. de Sousa Jr., "Development of an open-source
was malfunctioning. On the other hand, the Smod tool failed testbed based on the modbus protocol for cybersecurity analysis of
nuclear power plants”, MDPI Applied Sciences, vol. 12, no. 15, 2022.
to perform any attacks towards the simulation evironment.
[9] H. Holm, M. Karresand, A. Vidström & E. Westring, “A survey of
The next steps of our research journey include the industrial control system testbeds”, in Proceedings of the Nordic
Conference on Secure IT Systems (NordSec 2015), pp. 11–26, 2015.
development of an IEC 61499-based automation platform
[10] The m0n0wall project (https://m0n0.ch/wall/index.php)
that supports Modbus TCP, MQTT and OPC-UA
[11] MODBUS Messaging on TCP/IP Implementation Guide V1.0b
communication protocols that will allow the examination of (https://www.modbus.org/docs/Modbus_Messaging_Implementation_
cybersecurity activities in a more realistic environment closer Guide_V1_0b.pdf)
Authorized licensed use limited to: Universita degli Studi di Genova. Downloaded on December 10,2024 at 08:14:48 UTC from IEEE Xplore. Restrictions apply.
270