A kind of industrial communication method for detecting abnormality based on dual similarity measurement
Technical field
The present invention relates to industrial control system technical field of network security, more particularly to a kind of to be based on dual phase
The industrial communication method for detecting abnormality measured like property.
Background technique
The Information Security Risk hidden danger of current China industrial control system is especially prominent, situation very severe.According to the U.S.
The safety message of Department of Homeland Security subordinate industrial control system network emergency response group, in recent years for industrial control system
Information security events are in staged growth trend, and wherein the industries such as the energy, manufacture accounting is maximum.Especially in recent years internet with
The fusion of industrial control system, has broken the original intrinsic closure of industrial system, and information security issue therewith is also increasingly sudden and violent
Expose.
Industrial control system is by various automation control components and the process for being acquired and monitoring to real time data
Operation flow control system that control assembly collectively forms, ensuring industrial infrastructure automatic operating and process control and monitoring
System.Compared to traditional Network and information system, most of industrial control system needs to take into account using ring when developing design
Many factors, overriding concern efficiency and the real-time characteristics such as border, control management, and only closed at the beginning of industrial control system is established
Pouring functions safety, and lack the relevant design to information security, industrial control system is defendd general lack of effective industry security
And data communication secrecy provision.In addition, the information security of industrial control system must preferentially ensure the available of all system units
Property and reliability, traditional IT information security technology, such as firewall, bogusware is put, the spy of industrial control system can not be adapted to
Point, can be not applied directly in industrial control system.
For this purpose, researcher has set about carrying out the protecting information safety skill for being adapted to industrial control system own characteristic
Art typically comprises: industrial fireproof wall, industrial gateway, industrial software white list technology and industrial intrusion detection etc..Wherein work
Industry intrusion detection includes feature detection and abnormality detection two parts, and abnormality detection is different by the matching realization between normal behaviour
Chang Hangwei discovery, under the premise of not interfering instantaneity of industrial control system and availability, without understanding the feature of attack in advance
Unknown attack can be effectively detected in form, and the consistent approval of researcher has been obtained.At present for industrial control system
Method for detecting abnormality relates generally to three classes: Statistics-Based Method, Knowledge based engineering method and the method based on machine learning.Its
In the method based on machine learning again include cluster, neural network, bayesian algorithm, genetic algorithm, fuzzy logic, supporting vector
The technologies such as machine.Under normal circumstances, these methods are all from the feature of industrial communication behavior, by using unsupervised or half
The means of supervision, the communication data obtained in industrial control network are analyzed, construct normal communication behavior model, pass through meter
The deviation of calculation and normal communication behavior model discriminates whether to occur abnormal.
Above-mentioned industry method for detecting abnormality often only goes to provide abnormality detection from some side that industrial network communicates
Ability, such as many Statistics-Based Methods go to calculate anomalous variation point, the base of industrial communication flow using CUSUM algorithm
It is directed to variation (such as variation of function code) Lai Shixian anomaly of a certain industrial activity in the method for machine learning, is lacked pair
The comprehensive consideration of all industrial communication features, the ability of abnormality detection are limited, while in abnormality detection engine method
Also there is one-sidedness using upper.
Summary of the invention
The further object of the present invention is to provide a kind of industrial communication method for detecting abnormality based on dual similarity measurement,
According to industrial communication interactive mode and industrial protocol specification, analytical industry controls communication data in network and extracts industrial communication row
It is characterized, by these feature construction behavioural characteristic trees, carries out setting similarity measurement between interior similarity measurement and tree respectively, thus
It was found that signal intelligence abnormal in industrial control network.This method by tree in, tree between two kinds of similarity measurements quantity algorithms, Neng Gouyou
Effect, comprehensive promotion abnormality detection ability find the known and unknown attack in industrial network communication, safeguard industries system in real time
System, network and equipment safety.
To achieve the goals above, the technical solution that the invention uses are as follows: a kind of based on dual similarity measurement
Industrial communication method for detecting abnormality, which is characterized in that the steps include:
1) classification and selection of industrial communication behavioural characteristic: industrial communication data are divided into not by identical time interval
It is special to extract industrial communication behavior according to the agreement specification and industrial communication interactive mode of industrial communication protocol for same intelligence sample
Sign, constitutive characteristic space;
2) it constructs industrial behavioural characteristic tree: according to the feature space of each intelligence sample, it is special to construct industrial behavior respectively
Main branch, secondary branch and the leaf node of tree are levied, to make each intelligence sample with an industrial behavioural characteristic tree representation;
3) it the real-time anomalous discrimination of dual similarity measurement: to the industrial behavioural characteristic tree of each intelligence sample, carries out
Dual similarity measurement calculates, and by calculated result, metric threshold is compared between the interior metric threshold of tree and tree respectively, and judgement is
It is no exception occur and alarm.
In the step 1), the industrial communication behavioural characteristic is divided into two classes: general networking behavioural characteristic, industry association
Discuss semantic feature.
The characteristic that the general networking behavior characteristic characterization intelligence sample is showed in network transmission, comprising: packet rate,
The round-trip delay that average packet size, IP are accessed to port mapping, once.
The industrial protocol semantic feature is the proprietary feature extracted according to industrial protocol grammer and protocol specification, including
Function code, coil or register address, coil or register thresholding.
In the step 2), industrial behavioural characteristic tree building process is as follows:
2.1) root and trunk of industrial behavioural characteristic tree are created;
2.2) according to two class industrial communication behavioural characteristics, two main branches are created on tree trunk respectively;
2.3) on each main branch, to all feature-modelings time branch for belonging to the main branch, the net as representing
Creation represents the secondary branch of packet rate on the main branch of network behavioural characteristic;
2.4) on each secondary branch, using each characteristic value of this feature as a leaf node.
In the step 3), the real-time anomalous discrimination of dual similarity measurement, specific two aspects that carry out are calculated:
3.1) similarity measurement is directed to the measurement in industrial behavioural characteristic tree between different characteristic in setting, wherein industrial behavior
Characteristic belongs to same intelligence sample;
3.2) similarity measurement is for the measurement between the industrial behavioural characteristic tree of different messages sample between setting.
Similarity measurement is used as metric algorithm using Minkowski distance in the tree;Similarity measurements between the tree
Amount is using cosine similarity as metric algorithm.
Similarity measurement is used as metric algorithm using Minkowski distance in the tree, and calculation formula is as follows:
Wherein, P=(p1,p2,…,pN) and Q=(q1,q2,…,qN) respectively represent the same upper feature of industrial behavioural characteristic tree
The characteristic value of two kinds of features in space, v are variable element, are adjusted with specific reference to actual conditions.
For similarity measurement using cosine similarity as metric algorithm, calculation formula is as follows between tree:
Wherein, xkAnd ykRespectively represent homogenous characteristics value in different industrial behavioural characteristic trees.
In the step 3), setting metric threshold between interior metric threshold and tree is using industrial communication data by dual similar
The rated value that property metric calculation obtains.
The invention has the beneficial effect that
1. compared with prior art, the present disclosure provides a kind of, the industrial communication based on dual similarity measurement is abnormal
Detection method, this method not only allows for general networking behavioural characteristic in industrial control network, but also analyzes industrial protocol
Semantic feature substantially increases the energy of abnormality detection so that feature detection is more comprehensive by constructing industrial behavioural characteristic tree
Power.
2. the process employs two kinds of algorithms of similarity measurement between interior similarity measurement and tree are set, wherein similarity measurements in setting
Metering pin is to the measurement between different characteristic in the industrial behavioural characteristic tree of same intelligence sample, and similarity measurement is for difference between tree
Measurement between the industrial behavioural characteristic tree of intelligence sample, both metric forms can be effectively by malicious attack or maloperation institutes
Caused industrial communication is abnormal.
3. this method is a kind of monitoring and analysis method of third party's bypass, major deployments are at the mirror image end of industrial switch
Mouthful, be not involved in the manufacturing process of industrial control system, therefore will not real-time to Industry Control and availability do
It disturbs.
4. this method can not only identify the intrusion behavior and unauthorized behavior once occurred in industrial network,
Detection and alarm, while the attack of unknown industrial network can also be detected, adapt to unknown industrial network attack concealment and can not
The features such as predictive.
Detailed description of the invention:
Fig. 1 is the method for the present invention in the industrial control network application deployment embodiment schematic diagram based on Modbus/TCP.
Fig. 2 is the basic model schematic diagram of the method for the present invention.
Fig. 3 is the main implementation procedure schematic diagram of real-time abnormality detection in the method for the present invention.
Fig. 4 is the industrial behavioural characteristic tree building process schematic diagram of the method for the present invention.
Specific embodiment
A kind of industrial communication method for detecting abnormality based on dual similarity measurement, the steps include:
1) classification and selection of industrial communication behavioural characteristic: industrial communication data are divided into not by identical time interval
It is special to extract industrial communication behavior according to the agreement specification and industrial communication interactive mode of industrial communication protocol for same intelligence sample
Sign, constitutive characteristic space.
The industrial communication behavioural characteristic is divided into two classes: general networking behavioural characteristic, industrial protocol semantic feature.
The characteristic that general networking behavior characteristic characterization intelligence sample is showed in network transmission, comprising: packet rate, average packet
The round-trip delay that size, IP are accessed to port mapping, once.
Industrial protocol semantic feature is the proprietary feature extracted according to industrial protocol grammer and protocol specification, including function
Code, coil or register address, coil or register thresholding.
2) it constructs industrial behavioural characteristic tree: according to the feature space of each intelligence sample, it is special to construct industrial behavior respectively
Main branch, secondary branch and the leaf node of tree are levied, to make each intelligence sample with an industrial behavioural characteristic tree representation.
Industrial behavioural characteristic tree building process is as follows:
2.1) root and trunk of industrial behavioural characteristic tree are created;
2.2) according to two class industrial communication behavioural characteristics, two main branches are created on tree trunk respectively;
2.3) on each main branch, to all feature-modelings time branch for belonging to the main branch, the net as representing
Creation represents the secondary branch of packet rate on the main branch of network behavioural characteristic;
2.4) on each secondary branch, using each characteristic value of this feature as a leaf node.
3) it the real-time anomalous discrimination of dual similarity measurement: to the industrial behavioural characteristic tree of each intelligence sample, carries out
Dual similarity measurement calculates, and by calculated result, metric threshold is compared between the interior metric threshold of tree and tree respectively, and judgement is
It is no exception occur and alarm.
In the step 3), the real-time anomalous discrimination of dual similarity measurement, specific two aspects that carry out are calculated:
3.1) similarity measurement is directed to the measurement in industrial behavioural characteristic tree between different characteristic in setting, wherein industrial behavior
Characteristic belongs to same intelligence sample, and similarity measurement is used as metric algorithm using Minkowski distance in the tree;Tree
Interior similarity measurement is used as metric algorithm using Minkowski distance, and calculation formula is as follows:
Wherein, P=(p1,p2,…,pN) and Q=(q1,q2,…,qN) respectively represent the same upper feature of industrial behavioural characteristic tree
The characteristic value of two kinds of features in space, v are variable element, are adjusted with specific reference to actual conditions.
3.2) similarity measurement is for the measurement between the industrial behavioural characteristic tree of different messages sample between setting;The tree
Between similarity measurement using cosine similarity as metric algorithm;Similarity measurement is calculated using cosine similarity as measurement between tree
Method, calculation formula are as follows:
Wherein, xkAnd ykRespectively represent homogenous characteristics value in different industrial behavioural characteristic trees.
In the step 3), setting metric threshold between interior metric threshold and tree is using industrial communication data by dual similar
The rated value that property metric calculation obtains.
Embodiment 1: following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out
It clearly and completely describes, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
Every other embodiment, shall fall within the protection scope of the present invention.
Method of the invention belongs to the scope of industrial control system information security detection and protection.Fig. 1 shows the present invention
Method is in the industrial control network application deployment embodiment schematic diagram based on Modbus/TCP.As shown, the method for the present invention can
To be deployed on the mirror port of industrial switch as a kind of third-party monitor method, and industrial switch is responsible for work
It stands the Modbus/TCP communication work of (such as operator station, engineer station) and main controller (such as PLC, DCS controller), industry exchange
Machine copies all Modbus/TCP control communication data to its mirror port, catches in real time using the detection device of the method for the present invention
The communication data of mirror port, this communication data of analysis detection are obtained, so that discovery is mingled in industrial control system normal process behaviour
Intrusion behavior, unauthorized behavior either maloperation behavior during work, and alarm.In the present embodiment, side of the present invention
Method captures the communication of the Modbus/TCP between work station (Modbus/TCP main website) and main controller (Modbus/TCP slave station) first
Data flow extracts the general networking behavioural characteristic (packet of Modbus/TCP communication data stream by deep analysis and feature extraction
Include packet rate, average data packet size, the map information of IP address to 503 ports, every secondary control of Modbus/TCP data packet
The information such as the round-trip delay of request) and industrial protocol semantic feature (function code, coil address including control request and corresponding
Switching value), then by these feature construction industry behavioural characteristic trees, it is different to be utilized respectively dual similarity measurements quantity algorithm progress
Often detection.
The present invention provides a kind of industrial communication method for detecting abnormality based on dual similarity measurement.Referring to fig. 2, it shows
A kind of basic model of the industrial communication method for detecting abnormality based on dual similarity measurement.The model is broadly divided into initialization
Pretreatment, the abnormality detection model construction of dual similarity measurement and real-time abnormality detection three parts.In initialization pretreatment portion
Point, according to different agreement specifications, every kind of industry control communication protocol has a unique communication interaction mode, this species specificity often with
Time factor tight association, therefore when analyzing the communication data of capture, take the communication with same time interval
Data analyze intelligence sample as intelligence sample, while using deep packet analytic technique.In dual similarity measurement
Abnormality detection model construction part, first to intelligence sample carry out feature extraction and classifying, obtain general networking behavioural characteristic and
Industrial protocol semantic feature ultimately forms the feature space of industrial communication behavior, and according to this feature space, it is special to establish industrial behavior
Sign tree, in this way each intelligence sample can use an industrial behavioural characteristic tree description, then special for each industrial behavior
Sign tree, is normalized all features, calculates by dual similarity measurement mechanism, learns to set interior measurement door out respectively
Metric threshold between limit and tree, wherein similarity measurement is for different characteristic in the industrial behavioural characteristic tree of same intelligence sample in setting
Between measurement;Similarity measurement is for the measurement between the industrial behavioural characteristic tree of different messages sample between tree.Different in real time
Normal detection part shows the main implementation procedure of real-time abnormality detection referring to Fig. 3, passes through online capture industrial communication net in real time
Transmission data in network carry out character selection and abstraction to data, corresponding industrial behavioural characteristic tree are constructed, then by dual
Similarity measurement mechanism calculates, and according to calculated result between interior with tree respectively, tree compared with metric threshold, judges whether that appearance is abnormal simultaneously
Alarm.During abnormal determination, carry out setting interior similarity measurement calculating first, if calculated result, which is not met, measures door in tree
Limit, then be determined as exception and alarm, if meeting metric threshold in tree, carries out setting similarity measurement calculating, if calculated result
Metric threshold between setting is not met, then is determined as exception and alarms.
In dual similarity measurement mechanism, interior similarity measurement is set using Minkowski distance and is used as metric algorithm,
Its calculation formula is as follows:
Wherein, P=(p1,p2,…,pN) and Q=(q1,q2,…,qN) respectively represent the same upper feature of industrial behavioural characteristic tree
The characteristic value of two kinds of features in space, v are variable element, can be adjusted according to specific actual conditions.
For similarity measurement using cosine similarity as metric algorithm, calculation formula is as follows between tree:
Wherein, xkAnd ykRespectively represent homogenous characteristics value in different industrial behavioural characteristic trees.
Referring to fig. 4, the specific building process embodiment schematic diagram of industrial behavioural characteristic tree in the method for the present invention is shown.Root
According to the feature space of each intelligence sample, main branch, secondary branch and the leaf node of industrial behavioural characteristic tree are constructed respectively, from
And make each intelligence sample with an industrial behavioural characteristic tree representation.Main implementation procedure is as follows:
Step 1: the root and trunk of industrial behavioural characteristic tree are created;
Step 2: two main branches are respectively created on tree trunk, it is special that one of them main branch represents general networking behavior
Sign, another main branch represent industrial protocol semantic feature;
Step 3: intelligence sample is analyzed using technologies such as depth Packet analyzings, obtains all industrial communication rows in intelligence sample
It is characterized, to every kind of feature for belonging to general networking behavioural characteristic, corresponding branch is created on the main branch, while to category
In every kind of feature of industrial protocol semantic feature, corresponding branch is created on the main branch;
Step 4: creating leaf node on each secondary branch, wherein each leaf node represents a characteristic value, belongs to
All characteristic values of same feature constitute all leaf nodes on the secondary branch;
Step 5: judge in intelligence sample whether all features and characteristic value on industrial behavioural characteristic tree have had phase
The secondary branch and leaf node answered, if so, completing industrial behavioural characteristic tree building;If it is not, then repeating step 3~five.