• No results found

Security Enhancement Mechanism of Modbus TCP Protocol

N/A
N/A
Protected

Academic year: 2020

Share "Security Enhancement Mechanism of Modbus TCP Protocol"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

2018 3rd International Conference on Information Technology and Industrial Automation (ICITIA 2018) ISBN: 978-1-60595-607-7

Security Enhancement Mechanism of Modbus

TCP Protocol

Xuan Luo and Yongzhong Li

ABSTRACT

Considering the security problem of the Modbus TCP protocol, this paper proposes a secure protocol, Modbus-E. It uses symmetric key and digital signature technology to ensure the confidentiality and authentication of data. It also uses the synchronization principle and the mono-direction principle of the hash function to ensure the uniqueness of data. Through the Filtering method of "white list", it can guarantee the controllability of instruction, ultimately without any increase in communication process to achieve secure communication. Through the verification and analysis of experiment, Modbus-E protocol can prevent the authentication attack, man-in-the-middle attack and replay attack of the instruction by the attacker. Compared with existing methods, this method is more secure and can comprehensively improve the security of Modbus TCP communication.1

INTRODUCTION

Industrial control systems are initially closed and small in scale, and only need to ensure physical security to basically meet the requirements, so the initial design of field bus protocol Modbus did not take security factors into account. With the development of industrial control systems and the wide application of TCP IP protocol, Modbus protocol is integrated with TCP IP to form Modbus TCP[1-2]. However, Modbus TCP fails to solve the security problems existing in the original Modbus protocol, and even introduces the design defect of TCP IP protocol, which makes the security problem of Modbus TCP protocol more serious[3-4].

1

(2)

In view of the security problems of Modbus TCP, Yang Jing[5] designs as security module based on trusted computing, but the data processing is time-consuming and does not meet the real-time requirements. Fovino[6] proposed adding a timestamp and a hash chain field to the Modbus protocol and encrypting it with a private key, but the data is still transmitted in plain text, some sensitive data is easily intercepted by attackers, and there is still a problem of functional code abuse. Hayes[7] proposed a hash-based streaming control protocol STCP while the security of the scheme is based on pre-shared key, once the pre-shared key is cracked, the security will be destroyed.

In view of the problems in the above references, this paper makes in-depth research on the abuse of function code, secure data transmission and feasibility of the scheme of Modbus TCP protocol. This paper improves the Modbus protocol itself and designs a Security Enhancement protocol, Modbus-E protocol. The protocol can resist replay attack, authenticate both sides of sending data, encrypt key fields of data, and prevent abuse of function codes by "white list" method. Therefore, the safety of the industrial control network can be fundamentally improved.

MODBUS TCP SECURITY ANALYSIS

The Modbus TCP protocol application data unit ADU is composed of a 7-byte protocol header MBAP and an N-byte protocol data unit PDU, its message format is shown in Figure 1.

Modbus TCP protocol design does not consider safety factors, and its security risks can be listed as follows:

Lack of authentication: Attackers can impersonate both sides to send malicious instructions, such as the virtus of Stuxnet that once shocked the world, hackers attack industrial control system by cheating, which resulting in serious damage to the system.

Function code abuse: Anyone who has access to the terminal can send arbitrary instructions, the server has no corresponding processing mechanism.

Data transmission in plain text: Hackers can easily intercept the data packet and even tamper with the data message to turn it into malicious message, in order to damage the industrial control system.

TransmissionID Protocol Length

UnitID

Function Data

MBAP

PDU

(3)

Syn Level TransmissionID Protocol Length UnitID TLength Function Data HASH(N-Modbus)

1byte 1byte 2byte 2byte 2byte 1byte 4byte 1byte Nbyte Mbyte

Pri

N-Modbus

PAES

[image:3.612.107.482.89.156.2]

PDU

Figure 2. Modbus-E’s format.

MODBUS-E PROTOCOL'S DESIGN

Modbus-E Protocol's Format

In order to realize authentication, prevent tampering, anti-replay and other mechanisms, and to ensure the availability of the protocol for industrial control system, this paper directly modifies the Modbus TCP protocol without adding communication process, and proposes a secure Modbus TCP protocol to realize the data security of industrial control system. The format of the Modbus-E protocol is shown in Figure 2.

Synchronization Mechanism Based on Hash Chain

Choose a random number as seed, calculate its hash value, and use its first byte data as synchronization identifier code. After each match is successful, the original hash value is hashed to calculate the next synchronization identifier sent, and then update each synchronization identifier code by analogy. Utilizing the unidirectional principle of hashing to ensure the uniqueness of the data, which can effectively resist replay attacks. At the same time, there is no complete hash value in the packets, which greatly increases the difficulty of the synchronization identifier being cracked. The seeds of synchronous identification can be updated periodically, and the seeds of both sides can be synchronized by asymmetric key algorithm.

"White List" Filtering Mechanism

The design idea of "White List" is based on the four key factors of "Level-IP Address-Device ID-Function Code" to implement rule filtering. Its rule model settings are shown in Figure 3, the filtering process is shown in Figure 4.

(4)

can be bound on access layer network devices. The white list is stored in a structured array. By defining the structure array in advance and setting the parameters of each structure, when the server receives the data, it will find the structure array with the value of level field, determine the structure to which it belongs, and then match the corresponding parameter values in turn. If any attribute does not match, it will report an error and discard the data packet. The establishment of a white list based on role can effectively prevent the abuse of functional codes.

Level IP Address Device ID Function Code

Figure 3. "White list" rule model.

IP address Checking legal Device ID Check legal Function Code Check Message passing Message discarded legal illegal illegal illegal Level Check illegal legal

Figure 4. "Whitelist" filtering process.

Modbus Client Modbus-E Client Modbus-E Server Modbus Server

1,Send request packet 2,data processing

3,Send processed packets

4,data processing

5,Send original request packet

6,Return response packet 7,data processing

8,Returns processed packets

9,data processing 10,Return the original

[image:4.612.106.513.204.671.2]

response packet.

Figure 5. Modbus-E protocol system implementation principle.

Modbus TCP PC4 192.168.1.100/24 Level:100 192.168.1.50/24 Level:50 192.168.1.10/24 Level:10 192.168.1.60/24

Not in “White List” 192.168.1.1/24

Modbus TCP Security gateway PC5

Modbus-E Server PC2

Modbus-E Client Modbus-E ClientPC3 PC1

[image:4.612.136.462.560.651.2]
(5)

MODBUS-E'S IMPLEMENTATION

Modbus-E Protocol System Design

This protocol system has developed a pair of communication software Modbus-E Client and Modbus-Modbus-E Server to realize the conversion of Modbus TCP protocol to Modbus-E protocol. The principle of implementation is shown in Figure 5.

Modbus-E Protocol Data Processing

The data processing process of the Modbus-E protocol is as follows: (1) Modbus Client creates an effective Modbus request packet (Mreq);

(2)The Modbus-E Client receives the data packet and reconstructs the data packet according to the synchronization identifier (Syn), the privilege level (Level), the transmission identifier (TID), the protocol flag (PID), the length field (L), and the unit identification field (UID), total length field (Lt), and PDU field encrypted with AES algorithm key PAES, construct N-Modbus field as shown in Figure 2, calculate its hash value by Hash algorithm, sign it with private key (Pri) ,It is then added to the N-Modbus and sent to the modbus-E Server side.

N-Modbus= Syn|Level|TID|PID|L|UID|Lt|{PDU}PAES (1)

C =[N-Modbus] {Hash(N-Modbus)}Pri (2)

(3)When Modbus-E Server receives the data packet, it determines firstly whether its synchronization identifier Synsc is identical with the synchronization identifierSynss of Server communication, then verifies whether its signature is correct, decrypts the PDU field with the shared key, and finally matches the "white list" list rule. If all match returns the result True, otherwise it returns False.

R = Check(Synsc, Synss)&𝐴𝑢𝑡ℎ(C)&𝑊ℎ𝑖𝑡𝑒𝐿𝑖𝑠𝑡𝐶ℎ𝑒𝑐𝑘(𝐶) (3)

(4)If the matching result R is True, then restore and forward the original request packet Mreq, otherwise discard and alarm.

(5)The response packet processing is consistent with the above.

EXPERIMENTAL ANALYSIS

(6)

PC1, PC2, PC3 and PC4 are all client-side. Modbus Poll client simulation software and secure communication software Modbus-E Client are all installed. IP of PC1, PC2 and PC3 are added to the "white list" list. PC5 serves as a server and deploys Modbus Slave server-side simulation software and Modbus-E server-side communication software. Modbus-E protocol is used to communicate between PC1-5 and original Modbus TCP is used to communicate between PCPC1-5 and security gateway.

Modbus-E Security Analysis

Replay attack: An attacker replays intercepted data packets, which are discarded due to mismatch of identification codes.

Tampering attack: Attackers send malicious instructions by tampering with intercepted data packets, but because the key fields have been encrypted and the entire field has been hashed and signed, the tampered data packets will lead to the failure of hash value checking and attack failure.

Eavesdropping attack: because the key field has been encrypted, the attacker cannot obtain the key and cannot get the plaintext data.

[image:6.612.121.472.419.483.2]

The results of test show that "white list" can effectively filter illegal operation instructions. This experiment uses only three roles to manage function codes based on roles, and the definition of function codes is relatively simple, so it can be divided in more detail according to the actual needs of users.

TABLE I.PROTOCOL SECURITY ANALYSIS.

Aspect Document 5 Document 6 Document 7 Modbus-E

Integrity authentication yes yes yes yes

Authentication yes yes yes yes

Functional code control no no no yes

Data transmission security yes no yes yes

TABLE II.EXPERIMENTAL TEST OF "WHITE LIST" .

Level IP Function Code Device ID

100 192.168.1.100 all all

50 192.168.1.50 1-6,F,10H all

[image:6.612.129.465.600.684.2]

10 192.168.1.10 1-4 all

TABLE III.TEST RESULT OF "WHITE LIST".

PC IP Function Code Device ID Expected

results Actual results

PC1 192.168.1.100 3 10 legal expected

PC3 192.168.1.10 6 5 illegal expected

PC2 192.168.1.50 6 1 legal expected

PC4 192.168.1.60 3 100 illegal expected

(7)
[image:7.612.136.451.85.200.2]

Figure 7. Modbus-E server alarm record.

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08

1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97

103 109 115 121 127 133 139 145 151 157 163 169 175 181 187 193 199

ti

m

e

/s

Packet sequence Modbus TCP Modbus-E Document 6

Figure 8. Modbus-E packet construction and analysis time comparison chart.

The server-side alarm log is shown in Figure 7.

Modbus-E Efficiency Analysis

The data of Figure 8 is obtained by the time difference between the response packet and the request packet captured by the packet capture tool in the middle of the transmission. This figure reflects the time it takes from sending a packet to receiving a packet. It can be seen from the figure that the time difference between the Modbus-E data packet and the original Modbus TCP data packet transmission is about 20ms, and the time difference is about 10ms compared with the literature 6. Compared with the security improvement, the difference can be ignored.

ACKNOWLEDGMENTS

[image:7.612.159.426.249.379.2]
(8)

REFERENCES

1. Jianjun Huang, Xiqu Chen. 2014,” Research and Implementation of the Communication Based on the Modbus TCP/IP”. Information Technology, (5):162-164.

2. Jinqi Yang, Xunjun Liu. 2002, Industrial Ethernet and Current Application and Development. Journal of Sichuan University of Science and Technology, 21(3):34-37.

3. Yubin Wang, Si Chen, Nan Cheng. 2016, Research on Industrial Control System Security Defense. Netinfo Security, (09):35-39.

4. Xing Chen, Zhuosheng Jia. 2012, Industrial Control Network Information Security Threats and Vulnerability Analysis and Research. Computer Science, (A2):188-190.

5. Jing Yang. Research On Modbus/Tcp Protocol Security In Scada Systems[D].Beijing University of Technology,2016.

6. In Fovino, A Carcano, M Masera, Etc.. 2009, Design And Implementation Of A Secure Modbus Protocol. International Conference on Critical Infrastruc, (311):83-96.

Figure

Figure 2. Modbus-E’s format.
Figure 3. "White list" rule model.
TABLE III.TEST RESULT OF "WHITE LIST". Expected
Figure 7. Modbus-E server alarm record.

References

Related documents

En efecto, así como los libertarianos ven en cual- quier forma de intervención del Estado una fuente inevitable de interferencias arbitrarias –con la excepción de aquella acción

(2010) Effect of Fly Ash Content on Friction and Dry Sliding Wear Behaviour of Glass Fibre Reinforced Polymer Composites - A Taguchi Approach. P HKTRSR and

○ If BP elevated, think primary aldosteronism, Cushing’s, renal artery stenosis, ○ If BP normal, think hypomagnesemia, severe hypoK, Bartter’s, NaHCO3,

National Conference on Technical Vocational Education, Training and Skills Development: A Roadmap for Empowerment (Dec. 2008): Ministry of Human Resource Development, Department

As inter-speaker variability among these the two groups was minimal, ranging from 0% to 2% of lack of concord in the 21-40 group and from 41% to 46% in the 71+ generation, we

2.16.3.1 Air traffic services units shall, either routinely or on request, in accordance with locally agreed procedures, provide appropriate military units with pertinent flight

A servo mechanical press is different from a traditional mechanical press in such a way that it involves servo actuation design with programmable motors and punching mechanism

Ñ debates with the local producers of organic products (used in the prepara- tion of the meals for schools), in order to find an agreement to reduce the environmental