EPA industrial control network security test system and method
Technical Field
The invention relates to the technical field of network security, in particular to a system and a method for testing the security of an EPA industrial control network.
Background
At present, with the development of information technologies such as computers, communications, networks, etc., the field of information exchange has covered factories, and with the further development of automation control technologies, it is necessary to establish a comprehensive automation network platform including various layers from an industrial field device layer to a control layer, a management layer, etc., and to establish an enterprise informatization system based on the industrial network technology.
For the network system, the method of preventing intrusion is usually an encryption method for the message, a temporary key distribution method or a pre-stored key form; however, in either form, certain disadvantages exist:
if the key is pre-stored in the form of the key, the function of the so-called encryption key is washed out and saved if the key is obtained in advance and then information is easy to crack if the key is obtained by external intrusion. Therefore, in the prior art, a dynamic key form is adopted, namely, the key is issued in the field when the connection is made. It is also easy to attack the field, and the way of dynamic key also leads to data intrusion and affects the security of the device.
The industrial control network system is very important for industrial production, so that a network technology which ensures network security and is not invaded is hopefully provided, and at present, an effective solution is not provided.
Disclosure of Invention
The invention aims to provide an EPA industrial control network security test system and a method thereof, which aim to solve the problems in the background technology.
In order to achieve the above object, one of the objects of the present invention is to provide an EPA industrial control network security test system, including an industrial control verification platform for verifying security of an EPA industrial control network, the industrial control verification platform including:
the security management unit is used for managing security measures of messages in an application layer of an EPA control network and a data link;
the message control unit is used for controlling the EPA message in the data link;
the communication session contact unit comprises a communication directory, wherein the communication directory records the ID of the communication equipment required, and the communication between the communication session contact unit and all the message senders and message receivers adopts a physical communication path different from the communication between the message senders and the message receivers, so that even if one physical communication path is intercepted, message information or communication key data can still not be intercepted, and the difficulty of intercepting the communication is increased;
the communication session contact unit is communicated with all the message senders and the message receivers, and the communication session contact between the message senders and the message receivers is confirmed by the communication session contact unit and provides physical addresses for connection;
the information base unit stores the information required by the safety management unit and performs operation processing on the information;
the security management unit comprises a message encryption module, an integrity check module, an equipment identification module and an access control module; the message encryption module is used for encrypting the message in the data link; the integrity checking module is used for ensuring the integrity of the encrypted message in the transmission process; the equipment authentication module is used for sending an authentication request message to the trusted center; the access control module is used for controlling and receiving the request received by the trusted center and establishing communication with the trusted device through the network bridge;
the message sending party constructs an original message, generates a check code by using the check key and the original message through a designed check algorithm, attaches the check code to the original message to be used as a field of the message, constructs the check code together with the original message to be an integrity check message, and sends the integrity check message to a receiving party.
After receiving the message, the message receiver extracts the original message, generates a new check code by the original message and a corresponding check key through a designed check algorithm, compares the new check code with the check code in the received message, and determines that the message is legal and receives a data packet if the new check code is completely the same as the check code in the received message; otherwise, the data packet is discarded, and whether a negative response is returned or not is determined according to the serviceID, so that whether the user data is illegally tampered or damaged or not is judged.
The message control unit comprises a message control module and a message filtering module; the message control module is used for controlling a message protocol in transmission; the message filtering module is used for filtering the message in transmission;
the information base unit comprises an information detection module, a vulnerability detection module, a protocol module and a storage module; the information detection module is used for scanning an open port of the equipment, identifying service, identifying trojans and detecting an operating system; the vulnerability detection module is used for scanning and detecting the characteristic messages in the storage module; the protocol module is used for information interaction among the information base unit, the security management unit and the message control unit; the storage module is used for storing the messages and the data of information interaction.
For the non-EPA equipment in the information detection module, whether the equipment is alive or not can be detected by sending PING or ARP messages, wherein the ARP can bypass the firewall to filter the PING; for EPA equipment, a capturing thread is developed to analyze an EPA equipment declaration message, so that equipment survival information, equipment information such as MAC (media access control), IP (Internet protocol) and redundant numbers are identified, illegal EPA equipment is found, then, the finding equipment is tested on UDP (user datagram protocol) ports and TCP (transmission control protocol) ports of a target system by adopting various port scanning technologies such as fully-open scanning, half-open scanning and UDP (user datagram protocol) scanning, the states of the ports are identified, and first-time service identification is carried out according to an open port and a service mapping table; this process may identify trojan threats on some ports; the second identification is that after the connection with the target system is established, returned Banner information is collected, the service type, even the name and the version of software can be roughly identified by inquiring a service feature library, and finally, the target system is identified by the measures of TTL flags and the like; for equipment depending on a general operating system, the system bug needs to be tested during bug detection, and for real-time operating systems such as UC/OS and EPA network equipment and field equipment without the operating systems, the system bug test can be bypassed.
As a further improvement of the technical solution, the message encryption module adopts a periodically updated key encryption method, and the key is initialized by the trusted center.
The key is stored in an Octet String of 128 bytes, the device acquires the key actually used from the cipher table according to the offset of the key in the table and the length of the cipher table actually used, and the offset of the key in the table and the length of the key table actually used are determined by the application scenario and the requirement of the life cycle of the session key applied to the trusted center before the communication starts.
As a further improvement of the technical solution, the periodically updated key encryption method uses a key algorithm to produce a ciphertext, and the algorithm formula is as follows:
M={E(m,k)};
wherein M is a ciphertext; e () is an encryption function; m is an original message; k is a key.
As a further improvement of the technical solution, the periodically updated key encryption method uses a decryption function to decrypt, and the function formula is as follows:
m={D(M,k)};
wherein m is an original message; d () is a decryption function; m is a ciphertext; k is a key.
As a further improvement of the technical solution, the authentication request message mainly comprises an equipment ID, an equipment authentication code and a random number, the equipment authentication code is generated by a random algorithm through the equipment ID, the security ID and the random number, and an algorithm formula is as follows:
Maut={A(IDdev,IDsec,C)∣IDdev∣C};
wherein, Maut is a device identification request message; a () is an authentication algorithm; IDdev is the device ID; IDsec is a security ID.
As a further improvement of the technical solution, the trusted center receives the authentication request message, and generates a comparison authentication code by a random algorithm, wherein the algorithm formula is as follows:
MAC={A(IDdev,IDsec,C)};
wherein, MAC is a comparison authentication code; a () is an authentication algorithm; IDdev is the device ID; IDsec is a security ID.
As a further improvement of the technical solution, the message filtering module (122) is an acceptance filtering register.
As a further improvement of the technical scheme, the protocol module (133) adopts a TCP/IP protocol, and the TCP/IP protocol comprises an application layer, a transmission layer, a network layer and a data link layer.
As a further improvement of the present technical solution, the application layer is configured to receive data from the transport layer, and transmit the data to the transport layer according to different application requirements and manners; the transmission layer is used for providing a channel for the combination of the use platform and the internal data of the computer information network; the network layer is used for transmitting data packets in the network; the data link layer is used for providing link management error detection and effectively processing information detail problems related to different communication media.
Another object of the present invention is to provide an EPA industrial control network security testing method, including any one of the above EPA industrial control network security testing systems, including the following method steps:
s1, the communication initiator sends an authentication request message to the trusted center to apply for a session key;
s2, after the credible center receives the authentication request, if the authentication request is allowed, the credible center issues a session key to both communication parties;
s3, the message sender sends the virtual name of the message receiver needing communication to the communication session contact unit, the communication session contact unit distributes a communication key and the physical address of the message receiver to the message sender, and simultaneously sends a communication key and the physical address of the message sender to the message receiver; thereby establishing communication permission of a message sender and a message receiver;
s4, after obtaining the communication permission, the message sender encrypts the original message and the session key;
after encryption, the ciphertext is added as a message body to the security message header and then sent to an EPA application entity, and at the moment, a physical communication path which is the same as the physical communication path for communication among a message sender, a message receiver and a communication session contact unit is adopted as a physical communication path for communication;
s5, requesting the equipment authentication module to send an authentication request message;
s6, the network equipment receives the authentication request message;
s7, judging whether the identification request message exceeds the request frequency after receiving the identification request message;
s8, the trusted center receives the identification request message, and compares the generated equipment identification code with the equipment identification code in the message;
s9, before sending the message, the message sender firstly generates a ciphertext by a session key for a plaintext through a designed algorithm, and the ciphertext, a source IP, a destination IP and an operation form a message main body and are sent to the network equipment;
s10, after receiving the message, the network device firstly checks the message sending frequency;
and S11, after receiving the message, the message receiver decrypts the message to obtain the plaintext information.
Compared with the prior art, the invention has the beneficial effects that:
1. in the EPA industrial control network safety test system and method, a message receiver extracts an original message after receiving the message, generates a new check code by a designed check algorithm for the original message and a corresponding check key, compares the new check code with the check code in the received message, and determines that the message is legal and receives a data packet if the new check code is completely the same as the check code in the received message; otherwise, the data packet is discarded, thereby effectively avoiding the network from being threatened and damaged by the invading data packet.
2. In the EPA industrial control network security test system and method, the random factor added in the random algorithm is the timestamp in the calculation process, and the timestamp is used for preventing replay attack and guaranteeing semantic security.
3. In the EPA industrial control network security test system and method, the offset of the key in the table and the length of the actually used key table are determined by the application scene and the requirement of the life cycle of the session key applied to the trusted center before the communication starts, so that the security of the key in use is improved;
4. in the EPA industrial control network security test system and the method, the physical addresses of a message sender and a message receiver are temporarily distributed, so that the message is not easy to crack, and even if the message is cracked, the information cannot be intercepted, or the intercepted message cannot cheat the received method, thereby ensuring the security of communication information;
5. in the EPA industrial control network safety test system and method, the communication establishment channel and the communication channel adopt different physical communication paths, so that the communication and the channel establishment connection adopt different channels, and the communication is safer.
Drawings
FIG. 1 is a schematic view of the entire structure of embodiment 1;
FIG. 2 is a block diagram of a security management unit module of embodiment 1;
fig. 3 is a block diagram of a message control unit module according to embodiment 1;
FIG. 4 is a block diagram of an information library unit module of embodiment 1;
fig. 5 is a schematic view of an acceptance filtering process in embodiment 1.
The various reference numbers in the figures mean:
100. an industrial control verification platform;
110. a security management unit; 111. a message encryption module; 112. an integrity check module; 113. a device authentication module; 114. an access control module;
120. a message control unit; 121. a message control module; 122. a message filtering module;
130. an information base unit; 131. an information detection module; 132. a vulnerability detection module; 133. a protocol module; 134. and a storage module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
Referring to fig. 1-5, an object of the present embodiment is to provide an EPA industrial control network security testing system, which includes an industrial control verification platform 100 for verifying security of an EPA industrial control network, where the industrial control verification platform 100 includes:
the security management unit 110, the security management unit 110 is configured to manage security measures of messages in an EPA control network application layer and a data link;
the message control unit 120, the message control unit 120 is configured to control an EPA message in the data link;
the communication session contact unit comprises a communication directory, wherein the communication directory records the ID of the communication equipment required, and the communication between the communication session contact unit and all the message senders and message receivers adopts a physical communication path different from the communication between the message senders and the message receivers, so that even if one physical communication path is intercepted, message information or communication key data can still not be intercepted, and the difficulty of intercepting the communication is increased;
the communication session contact unit is communicated with all the message senders and the message receivers, and the communication session contact between the message senders and the message receivers is confirmed by the communication session contact unit and provides physical addresses for connection;
the information base unit 130, the information base unit 130 stores the information required by the security management unit 110 and performs operation processing on it, so that the user can easily customize other security measures.
The security management unit 110 includes a message encryption module 111, an integrity check module 112, a device authentication module 113, and an access control module 114; the message encryption module 111 is configured to encrypt a message in a data link; the integrity check module 112 is configured to ensure integrity of the encrypted message in the transmission process; the device authentication module 113 is configured to send an authentication request message to the trusted center; the access control module 114 is used for controlling and receiving the request received by the trusted center, and establishing communication with the trusted device through the network bridge;
the message sending party constructs an original message, generates a check code by using the check key and the original message through a designed check algorithm, attaches the check code to the original message to be used as a field of the message, constructs the check code together with the original message to be an integrity check message, and sends the integrity check message to a receiving party.
After receiving the message, the message receiver extracts the original message, generates a new check code by the original message and a corresponding check key through a designed check algorithm, compares the new check code with the check code in the received message, and determines that the message is legal and receives a data packet if the new check code is completely the same as the check code in the received message; otherwise, the data packet is discarded, and whether a negative response is returned or not is determined according to the serviceID, so that whether the user data is illegally tampered or damaged or not is judged.
The message control unit 120 includes a message control module 121 and a message filtering module 122; the message control module 121 is configured to control a message protocol in transmission; the message filtering module 122 is configured to filter a message in transmission;
the message is a unit of network transmission, and is continuously encapsulated into packets, packets and frames for transmission in the transmission process, wherein the encapsulation mode is to add some information segments.
The information base unit 130 includes an information detection module 131, a vulnerability detection module 132, a protocol module 133, and a storage module 134; the information detection module 131 is used for scanning an open port of the device, identifying services, identifying trojans and detecting an operating system; the vulnerability detection module 132 is used for scanning and detecting the feature messages in the storage module 134; the protocol module 133 is used for information interaction between the information base unit 130 and the security management unit 110 and the message control unit 120; the storage module 134 is used for storing the messages and the data of the information interaction.
For the non-EPA equipment in the information detection module, whether the equipment is alive or not can be detected by sending PING or ARP messages, wherein the ARP can bypass the firewall to filter the PING; for EPA equipment, a capturing thread is developed to analyze an EPA equipment declaration message, so that equipment survival information, equipment information such as MAC (media access control), IP (Internet protocol) and redundant numbers are identified, illegal EPA equipment is found, then, the finding equipment is tested on UDP (user datagram protocol) ports and TCP (transmission control protocol) ports of a target system by adopting various port scanning technologies such as fully-open scanning, half-open scanning and UDP (user datagram protocol) scanning, the states of the ports are identified, and first-time service identification is carried out according to an open port and a service mapping table; this process may identify trojan threats on some ports; the second identification is that after the connection with the target system is established, returned Banner information is collected, the service type, even the name and the version of software can be roughly identified by inquiring a service feature library, and finally, the target system is identified by the measures of TTL flags and the like; for equipment depending on a general operating system, the system bug needs to be tested during bug detection, and for real-time operating systems such as UC/OS and EPA network equipment and field equipment without the operating systems, the system bug test can be bypassed.
The vulnerability detection module is used for scanning and detecting by extracting the characteristic message from the storage module, the test unit is used for extracting the test characteristic fingerprint from the vulnerability characteristic library to form a test message, sending the test message to a test object, then monitoring the response of a detection target, collecting information, and then judging whether the security vulnerability exists in the EPA network by combining the vulnerability characteristic library; the actual expression is that the feature matching pairs are packaged in a test plug-in, the test plug-in completes the extraction of the features to form a test message, receives the return information and judges whether a bug exists.
In this embodiment, the message encryption module 111 adopts a periodically updated key encryption method, the key is initialized by a trusted center, and data confidentiality can be ensured by EPA message encryption, thereby preventing information from being illegally acquired.
The key is stored in an Octet String of 128 bytes, the device acquires the key actually used from the cipher table according to the offset of the key in the table and the length of the cipher table actually used, and the offset of the key in the table and the length of the key table actually used are determined by the application scenario and the requirement of the life cycle of the session key applied to the trusted center before the communication starts.
Further, the periodically updated key encryption method adopts a key algorithm to produce a ciphertext, and the algorithm formula is as follows:
M={E(m,k)};
wherein M is a ciphertext; e () is an encryption function; m is an original message; k is a key.
Specifically, the method comprises the following steps: the encryption method of the key with periodic update adopts a decryption function for decryption, and the function formula is as follows:
m={D(M,k)};
wherein m is an original message; d () is a decryption function; m is a ciphertext; k is a key.
In addition, the authentication request message mainly comprises an equipment ID, an equipment authentication code and a random number, wherein the equipment authentication code is generated through a random algorithm by the equipment ID, the security ID and the random number, and the algorithm formula is as follows:
Maut={A(IDdev,IDsec,C)∣IDdev∣C};
wherein, Maut is a device identification request message; a () is an authentication algorithm; IDdev is the device ID; IDsec is a security ID.
In addition, the trusted center receives the authentication request message, finds the corresponding device security ID according to the device ID, and generates a comparison authentication code together with the device ID and the random number through a random algorithm, wherein the algorithm formula is as follows:
MAC={A(IDdev,IDsec,C)};
wherein, MAC is a comparison authentication code; a () is an authentication algorithm; IDdev is the device ID; IDsec is a security ID.
Further, the message filtering module 122 is an acceptance filter register.
The acceptance filter register preferably adopts an acceptance filter register of the CAN message, the working process of the acceptance filter register is as known by persons in the technical field, the CAN controller monitors all messages from the CAN bus, and when one message arrives, the CAN controller executes a rapid hardware search algorithm to match the identifiers of the received CAN messages with the identifiers stored in the acceptance filter RAM; if the message is not matched with the CAN code, the message is discarded, the process cannot generate interruption to the CAN controller, and the application code is still normally executed; if there is a matching identifier, the CAN controller will generate an interrupt by setting the corresponding bit in the receive status register in the set, the interrupt service routine will copy the message from the CAN controller's register into RAM, and will release the CAN controller's receive register by setting the corresponding bit in the CAN command register.
Specifically, the protocol module 133 adopts a TCP/IP protocol, which includes an application layer, a transport layer, a network layer, and a data link layer.
In addition, the application layer is used for receiving data from the transmission layer and transmitting the data to the transmission layer according to different application requirements and modes; the transmission layer is used for providing a channel for the combination of the use platform and the data in the computer information network, and can realize data transmission and data sharing; the network layer is used for transmitting data packets in the network; the data link layer is used for providing link management error detection and effectively processing information detail problems related to different communication media.
Another object of this embodiment is to provide an EPA industrial control network security testing method, including any one of the above EPA industrial control network security testing systems, including the following method steps:
(I) message encryption:
s1, the communication initiator sends an authentication request message to the trusted center to apply for a session key;
s2, after the credible center receives the authentication request, if the authentication request is allowed, the credible center issues a session key to both communication parties;
s3, the message sender sends the virtual name of the message receiver needing communication to the communication session contact unit, the communication session contact unit distributes a communication key and the physical address of the message receiver to the message sender, and simultaneously sends a communication key and the physical address of the message sender to the message receiver; thereby establishing communication permission of a message sender and a message receiver;
s4, after obtaining the communication permission, the message sender encrypts the original message and the session key;
wherein, the encryption formula is: m ═ { E (M, k) };
after encryption, the ciphertext is added to the security message header as a message body and then sent to an EPA application entity; at this time, the physical communication path is the same as the physical communication path for communication among the message sender, the message receiver and the communication session contact unit;
(II) equipment authentication:
s5, requesting the device identification module 113 to send identification request message, the identification request message mainly consists of device ID, device identification code and random number, the device identification code is generated by device ID, security ID and random number through designed algorithm, the added random factor is time stamp, used to prevent replay attack and guarantee semantic security;
s6, the network equipment receives the authentication request message;
s7, judging whether the identification request message exceeds the request frequency after receiving the identification request message, if so, discarding the message, otherwise, forwarding the message to the terminal
A trusted center;
s8, the credible center receives the authentication request message, finds the corresponding device security ID according to the device ID, generates a device authentication code through a designed algorithm together with the device ID and the random number, compares the generated device authentication code with the device authentication code in the message, discards the message if the device authentication code and the device authentication code are different, sends an authentication passing message (including the initial access control list) to the network device if the device authentication code and the device authentication code are the same, allows the device to communicate, and sends the authentication passing message to the initial session key of the device;
(III) access control:
s9, before sending the message, the message sender firstly generates a ciphertext by a session key for a plaintext through a designed algorithm, and the ciphertext, a source IP, a destination IP and an operation form a message main body and are sent to the network equipment;
s10, after receiving the message, the network device checks the message sending frequency, if the message sending frequency exceeds the highest rate, the message is discarded; if the operation is normal, comparing the source IP, the destination IP and the information in the operation and control list; if the matching is carried out, the message is forwarded;
s11, after receiving the message, the message receiver decrypts the message to obtain the plaintext information;
wherein, the decryption formula is: m ═ D (M.k).
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and the preferred embodiments of the present invention are described in the above embodiments and the description, and are not intended to limit the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.