A network encapsulation detection system and method
By designing a network encapsulation detection system and using clustering and machine learning algorithms to extract network traffic characteristics, the problem of traditional systems identifying complex attacks and unknown threats is solved, real-time monitoring and efficient identification are achieved, and network security protection capabilities are improved.
Patent Information
- Application Number
- CN202410371975.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-03-29
AI Technical Summary
Traditional network detection systems cannot fully extract features from multiple dimensions, find it difficult to identify complex attack features and abnormal behaviors, cannot monitor network traffic in real time, and cannot adaptively learn emerging unknown protocols and attack features, resulting in limited ability to identify unknown threats.
A network encapsulation detection system was designed, including traffic packet capture, storage, classification and feature extraction modules. The network traffic was analyzed through clustering algorithms and machine learning algorithms, statistical features, format features and network topological features were extracted, and real-time detection and Generate alert information to identify unknown protocols and abnormal behaviors.
It improves the accuracy and efficiency of attack detection, can timely identify potential security threats, has real-time monitoring functions, adapts to new threats, and enhances the level of network security protection.
Smart Images

Figure CN118432854B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network detection, and in particular to a network encapsulation detection system and method. Background Art
[0002] Network encapsulation is an important concept in computer network communication, which is used to encapsulate and package data when transmitting data in the network. In network communication, data is usually divided into small data packets, each of which contains the data itself and some necessary control information, such as source address, destination address, checksum, etc.
[0003] Traditional systems can usually only rely on limited features for analysis and detection, and are unable to comprehensively extract features from multiple dimensions, so they are prone to miss some complex attack features and abnormal behaviors. In addition, traditional systems may only be able to analyze static data and are unable to monitor network traffic in real time and generate alarms, making it difficult to promptly discover and respond to potential security threats. Traditional systems are usually unable to perform adaptive learning and model updates based on newly emerging unknown protocols and attack features, so their ability to identify unknown threats is limited. Summary of the invention
[0004] The object of the present invention is to provide a network encapsulation detection system and method to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a network encapsulation detection system, comprising an attack detection unit and an alarm and display unit, and further comprising:
[0006] A traffic packet capturing unit, the traffic packet capturing unit is used to deploy a proxy server in the network, direct traffic to the proxy server for capturing, thereby obtaining a network traffic packet, and transmitting the obtained network traffic packet to a traffic storage unit;
[0007] A traffic storage unit, wherein the traffic storage unit receives the network traffic packets transmitted by the traffic packet capture unit, stores the network traffic packets in a database, provides a data access interface using query and index functions of the database, and transmits the data access interface to the traffic classification unit;
[0008] A traffic classification unit, wherein the traffic classification unit receives the data access interface transmitted by the traffic storage unit, and accesses the database through the data access interface, thereby obtaining the network traffic packets in the database, and classifies the unknown protocol content in the network traffic packets through a clustering algorithm, and transmits the classified network traffic packets to the feature extraction unit;
[0009] A feature extraction unit receives the classified network traffic packets transmitted by the traffic classification unit, extracts statistical features, format features and network topology features from the traffic features, and transmits the extracted statistical features, format features and network topology features to the attack detection unit.
[0010] Preferably, the attack detection unit receives the statistical features, format features and network topology features transmitted by the feature extraction unit, and performs corresponding attack detection on the statistical features, format features and network topology features, thereby obtaining attack detection results, and transmits the attack detection results to the alarm and display unit;
[0011] The alarm and display unit receives the attack detection result transmitted by the attack detection unit, generates corresponding alarm information according to the attack detection result, and displays the attack detection result and the alarm information on the display end.
[0012] Preferably, the traffic packet capture unit includes a traffic steering module and a traffic capture module;
[0013] The traffic steering module is used to configure on the network device to direct the required traffic to the proxy server, and to achieve traffic steering by modifying the routing table;
[0014] The traffic capture module is used for the proxy server to cache the traffic after receiving the traffic, and to achieve the capture and cache of the traffic by using a log recording function.
[0015] Preferably, in the traffic classification unit, the clustering algorithm comprises the following steps:
[0016] A1. Randomly select K samples as the centroids and use the Euclidean distance formula to calculate the distance between the sample data and the centroids, where the Euclidean distance formula is as follows:
[0017]
[0018] Among them, D i represents the Euclidean distance, c i represents the sample position, x i represents the position of the particle, i represents the position of the sample space, and K represents the classification category;
[0019] A2. The sum of squared errors is used as the target and cost function of clustering, wherein the cost function is as follows:
[0020]
[0021] Among them, J represents the cost function, D i (c i ,xj ) represents the Euclidean distance between the sample position and the mass point position;
[0022] A3. For each sample, the particle closest to each sample is the particle with the greatest similarity to the sample. When all samples can find the particle with the greatest similarity, the new centroid position is obtained, where the new centroid position is as follows:
[0023]
[0024] Among them, c i ′ represents the new centroid position, m i Represents the number of centroids.
[0025] Preferably, the feature extraction unit includes a statistical feature extraction module, a format feature extraction module and a network topology extraction module;
[0026] The statistical feature extraction module is used to count the number of data packets received or sent within a period of time, and to count the average size, maximum size and minimum size of the data packets, and the interval time between the arrival of the data packets, and to count the duration of each connection or session, and to count the distribution of different protocols, source addresses, and destination address features in the traffic;
[0027] The format feature extraction module is used to extract format features from a binary stream using a feature extraction algorithm, and construct a feature representation of an unknown protocol based on the extracted format features, and use a machine learning algorithm to train a recognition model to identify an unknown protocol. When a new unknown protocol appears in a communication environment, it is input into the trained recognition model for recognition. If the recognition model cannot recognize the protocol, it is considered that a new unknown protocol has appeared, and if a known unknown protocol has abnormal behavior, the recognition model detects the abnormality.
[0028] The network topology extraction module is used to count the proportion and number of broadcast, unicast and multicast data packets, and count the usage of different service ports, including the number of connections and the frequency of connections. According to historical data, a threshold value of business traffic behavior is set. Once a behavior is detected to exceed the threshold, it is considered that an abnormality has occurred. The characteristics of the attack are listed for various known attacks, and the traffic is analyzed using a real-time traffic monitoring system. It is detected in real time whether there is traffic that meets the attack characteristics. Once a flow that meets the specific attack behavior is detected in the traffic, it is considered that an abnormality has occurred.
[0029] Preferably, the attack detection unit includes a statistical feature detection module, a format feature detection module and a network topology feature detection module;
[0030] The statistical feature detection module is used to detect the number of server session connections, the average length of server inflow packets and the average length of server outflow packets according to the session information features in the statistical features, and detect the type, category, number and time of application programs used by the server according to the application distribution class features in the statistical features, and detect the SYN and ACK packets generated in the TCP three-way handshake process to indicate the three-way handshake process and the number of handshakes in the process according to the indicator bit identification class features in the statistical features;
[0031] The format feature detection module is used to calculate the types of unknown protocols and their respective proportions, the data frame composition of each unknown protocol and the protocol format of each unknown protocol according to the format features, and to judge whether abnormal behavior occurs by comparing the types of data frames existing in a class of unknown protocols and the proportion of each data frame;
[0032] The network topology feature detection module is used to calculate the entropy value of the four-tuple (source address, destination address, source port, destination port) in each data stream. For normal business traffic behavior and known attack behavior, the range of normal entropy values is determined through historical data, and corresponding thresholds are set. A real-time monitoring system is deployed in the communication system to collect and calculate the entropy value of the four-tuple information in the data stream in real time, and then the entropy value calculated in real time is compared with the pre-set normal entropy value. Once the entropy value change of a four-tuple exceeds the preset threshold, it is considered that abnormal behavior has occurred.
[0033] Preferably, in the network topology feature detection module, entropy value calculation is performed on the four-tuple (source address, destination address, source port, destination port) in each data stream, wherein the entropy value calculation formula is as follows:
[0034]
[0035] Among them, H sa,t represents information entropy, P i It represents the probability of the corresponding source address appearing, and n represents the total amount of traffic in the data flow.
[0036] The present invention also provides the following technical solution: a network encapsulation detection method, which is applicable to the network encapsulation detection system, comprising the following steps:
[0037] S1. Traffic packet capture: deploying a proxy server to capture network traffic packets and transmitting the captured network traffic packets to a traffic storage unit;
[0038] S2, traffic storage: receiving and storing traffic packets in the database, and providing a data access interface for the traffic classification unit to use;
[0039] S3, traffic classification: receiving data access interface, accessing network traffic packets in the database, using clustering algorithm to classify unknown protocol content, and transmitting the classified network traffic packets to the feature extraction unit
[0040] S4, feature extraction: receiving the classified network traffic packets, extracting statistical features, format features and network topology features from the traffic features, and transmitting the extracted features to the attack detection unit;
[0041] S5, attack detection: receiving statistical features, format features and network topology features, performing corresponding attack detection on the features, obtaining attack detection results, and transmitting the results to the alarm and display unit;
[0042] S6. Alarm and display: Receive attack detection results, generate corresponding alarm information, and display the attack detection results and alarm information on the display terminal.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] 1. The present invention uses multiple steps such as traffic packet capture, storage, classification and feature extraction. The system can comprehensively analyze and process network traffic, thereby improving the accuracy and efficiency of attack detection. By adopting statistical features, format features and network topology feature extraction modules, it can timely identify unknown protocols, abnormal data traffic and abnormal behaviors in network topology, helping to discover potential security threats early;
[0045] 2. The present invention has a real-time monitoring function and can perform real-time analysis and detection on traffic. Once traffic that meets the attack characteristics is found, corresponding alarm information is immediately generated to help network administrators take timely countermeasures. The format feature extraction module uses a machine learning algorithm to train the recognition model, and can continuously update the model according to newly emerging unknown protocols to improve the system's adaptability to new threats. Moreover, through comprehensive feature extraction and multi-level attack detection, it can help network administrators to perceive and prevent various network attacks in a timely manner, improve the level of network security protection, and ensure network and data security. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of the overall system flow provided by an embodiment of the present invention;
[0047] Figure 2 An internal module block diagram of a traffic packet capture unit provided in an embodiment of the present invention;
[0048] Figure 3 A flow chart of a clustering algorithm provided by an embodiment of the present invention;
[0049] Figure 4An internal module block diagram of a feature extraction unit provided by an embodiment of the present invention;
[0050] Figure 5 An internal module block diagram of an attack detection unit provided by an embodiment of the present invention;
[0051] Figure 6 A schematic diagram of the overall method flow provided by an embodiment of the present invention.
[0052] In the figure: 1. Traffic packet capture unit; 101. Traffic steering module; 102. Traffic capture module; 2. Traffic storage unit; 3. Traffic classification unit; 4. Feature extraction unit; 401. Statistical feature extraction module; 402. Format feature extraction module; 403. Network topology extraction module; 5. Attack detection unit; 501. Statistical feature detection module; 502. Format feature detection module; 503. Network topology feature detection module; 6. Alarm and display unit. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Embodiment 1
[0055] See also Figure 1-5 The present invention provides a technical solution: a network encapsulation detection system, including an attack detection unit 5 and an alarm and display unit 6, and also includes:
[0056] Traffic packet capturing unit 1, the traffic packet capturing unit 1 is used to deploy a proxy server in the network, direct traffic to the proxy server for capturing, thereby obtaining network traffic packets, and transmitting the obtained network traffic packets to the traffic storage unit 2;
[0057] Traffic storage unit 2, the traffic storage unit 2 receives the network traffic packet transmitted by the traffic packet capture unit 1, stores the network traffic packet in a database, provides a data access interface using the query and index functions of the database, and transmits the data access interface to the traffic classification unit 3;
[0058] Traffic classification unit 3, the traffic classification unit 3 receives the data access interface transmitted by the traffic storage unit 2, and accesses the database through the data access interface, thereby obtaining the network traffic packets in the database, and classifies the unknown protocol content in the network traffic packets through the clustering algorithm, and transmits the classified network traffic packets to the feature extraction unit 4;
[0059] The feature extraction unit 4 receives the classified network traffic packets transmitted by the traffic classification unit 3, extracts statistical features, format features and network topology features from the traffic features, and transmits the extracted statistical features, format features and network topology features to the attack detection unit 5.
[0060] The attack detection unit 5 receives the statistical features, format features and network topology features transmitted by the feature extraction unit 4, and performs corresponding attack detection on the statistical features, format features and network topology features, thereby obtaining the attack detection result, and transmits the attack detection result to the alarm and display unit 6;
[0061] The alarm and display unit 6 receives the attack detection result transmitted by the attack detection unit 5, generates corresponding alarm information according to the attack detection result, and displays the attack detection result and the alarm information on the display terminal;
[0062] The traffic packet capturing unit 1 comprises a traffic steering module 101 and a traffic capturing module 102;
[0063] The traffic steering module 101 is used to configure on the network device to direct the required traffic to the proxy server, and to achieve traffic steering by modifying the routing table;
[0064] The traffic capture module 102 is used for the proxy server to cache the traffic after receiving the traffic, and to achieve the capture and cache of the traffic by using the logging function;
[0065] In the traffic classification unit 3, the clustering algorithm includes the following steps:
[0066] A1. Randomly select K samples as the centroid and use the Euclidean distance formula to calculate the distance between the sample data and the centroid. The Euclidean distance formula is as follows:
[0067]
[0068] Among them, D i represents the Euclidean distance, c i represents the sample position, x i represents the position of the particle, i represents the position of the sample space, and K represents the classification category;
[0069] A2. The sum of squared errors is used as the clustering target and cost function, where the cost function is as follows:
[0070]
[0071] Among them, J represents the cost function, D i (c i ,x j) represents the Euclidean distance between the sample position and the mass point position;
[0072] A3. For each sample, the particle closest to each sample is the particle with the greatest similarity to the sample. When all samples can find the particle with the greatest similarity, the new centroid position is obtained, where the new centroid position is as follows:
[0073]
[0074] Among them, c i ′ represents the new centroid position, m i represents the number of centroids;
[0075] The feature extraction unit 4 includes a statistical feature extraction module 401, a format feature extraction module 402 and a network topology extraction module 403;
[0076] The statistical feature extraction module 401 is used to count the number of data packets received or sent within a period of time, and to count the average size, maximum size and minimum size of the data packets, and to count the interval time between the arrival of the data packets, and to count the duration of each connection or session, and to count the distribution of different protocols, source addresses, and destination address features in the traffic;
[0077] The format feature extraction module 402 is used to extract format features from the binary stream using a feature extraction algorithm, and construct a feature representation of the unknown protocol based on the extracted format features, and use a machine learning algorithm to train a recognition model to identify the unknown protocol. When a new unknown protocol appears in the communication environment, it is input into the trained recognition model for recognition. If the recognition model cannot recognize the protocol, it is considered that a new unknown protocol has appeared, and if a known unknown protocol has abnormal behavior, the recognition model detects the abnormality.
[0078] The network topology extraction module 403 is used to count the proportion and number of broadcast, unicast and multicast data packets, and count the usage of different service ports, including the number of connections and the connection frequency, and set the threshold of the business flow behavior according to the historical data. Once a behavior is detected to exceed the threshold, it is considered that an abnormality has occurred, and the characteristics of the attack are listed for various known attacks. The real-time traffic monitoring system is used to analyze the traffic and detect in real time whether there is traffic that meets the attack characteristics. Once a flow that meets the specific attack behavior is detected in the traffic, it is considered that an abnormality has occurred;
[0079] The attack detection unit 5 includes a statistical feature detection module 501, a format feature detection module 502 and a network topology feature detection module 503;
[0080] The statistical feature detection module 501 is used to detect the number of server session connections, the average length of server inflow packets and the average length of server outflow packets according to the session information features in the statistical features, and detect the type, category, number and time of application programs used by the server according to the application distribution features in the statistical features, and detect the SYN and ACK packets generated in the TCP three-way handshake process to indicate the three-way handshake process and the number of handshakes in the process according to the indicator bit identification features in the statistical features;
[0081] The format feature detection module 502 is used to calculate the types of unknown protocols and their respective proportions, the data frame composition of each unknown protocol and the protocol format of each unknown protocol according to the format features, and to judge whether abnormal behavior occurs by comparing the types of data frames existing in a class of unknown protocols and the proportion of each data frame;
[0082] The network topology feature detection module 503 is used to calculate the entropy value of the four-tuple source address, destination address, source port, and destination port in each data stream. For normal business traffic behavior and known attack behavior, the range of normal entropy values is determined through historical data, and corresponding thresholds are set. A real-time monitoring system is deployed in the communication system to collect and calculate the entropy value of the four-tuple information in the data stream in real time, and then the entropy value calculated in real time is compared with the pre-set normal entropy value. Once the entropy value change of a certain four-tuple exceeds the preset threshold, it is considered that abnormal behavior has occurred;
[0083] In the network topology feature detection module 503, entropy value calculation is performed on the four-tuple source address, destination address, source port, and destination port in each data stream, wherein the entropy value calculation formula is as follows:
[0084]
[0085] Among them, H sa,t represents information entropy, P i It represents the probability of the corresponding source address appearing, and n represents the total amount of traffic in the data flow.
[0086] Embodiment 2
[0087] See also Figure 6 The present invention also provides a technical solution: a network encapsulation detection method, which is applicable to a network encapsulation detection system, comprising the following steps:
[0088] S1, traffic packet capture: deploy a proxy server to capture network traffic packets, and transmit the captured network traffic packets to the traffic storage unit 2;
[0089] S2, traffic storage: receiving and storing traffic packets in a database, and providing a data access interface for the traffic classification unit 3 to use;
[0090] S3, traffic classification: receiving the data access interface, accessing the network traffic packets in the database, using the clustering algorithm to classify the unknown protocol content, and transmitting the classified network traffic packets to the feature extraction unit 4
[0091] S4, feature extraction: receiving the classified network traffic packets, extracting statistical features, format features and network topology features from the traffic features, and transmitting the extracted features to the attack detection unit 5;
[0092] S5, attack detection: receiving statistical features, format features and network topology features, performing corresponding attack detection on the features, obtaining attack detection results, and transmitting the results to the alarm and display unit 6;
[0093] S6. Alarm and display: Receive attack detection results, generate corresponding alarm information, and display the attack detection results and alarm information on the display terminal.
[0094] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0095] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A network encapsulation detection system, comprising an attack detection unit (5) and an alarm and display unit (6), characterized in that: A traffic packet capturing unit (1), the traffic packet capturing unit (1) being used to deploy a proxy server in the network, direct traffic to the proxy server for capturing, thereby obtaining a network traffic packet, and transmitting the obtained network traffic packet to a traffic storage unit (2); A traffic storage unit (2), wherein the traffic storage unit (2) receives the network traffic packet transmitted by the traffic packet capture unit (1), stores the network traffic packet in a database, provides a data access interface using the query and index functions of the database, and transmits the data access interface to the traffic classification unit (3); A traffic classification unit (3), wherein the traffic classification unit (3) receives the data access interface transmitted by the traffic storage unit (2), and accesses the database through the data access interface, thereby obtaining network traffic packets in the database, and classifies the unknown protocol content in the network traffic packets through a clustering algorithm, and transmits the classified network traffic packets to a feature extraction unit (4); The feature extraction unit (4) comprises a statistical feature extraction module (401), a format feature extraction module (402) and a network topology extraction module (403); The statistical feature extraction module (401) is used to count the number of data packets received or sent within a period of time, and to count the average size, maximum size and minimum size of the data packets, and to count the interval time of the arrival of the data packets, and to count the duration of each connection or session, and to count the distribution of different protocols, source addresses, and destination address features in the traffic; The format feature extraction module (402) is used to extract format features from a binary stream using a feature extraction algorithm, and construct a feature representation of an unknown protocol based on the extracted format features, and use a machine learning algorithm to train a recognition model to recognize an unknown protocol. When a new unknown protocol appears in a communication environment, it is input into the trained recognition model for recognition. If the recognition model cannot recognize the protocol, it is considered that a new unknown protocol has appeared, and if a known unknown protocol has abnormal behavior, the recognition model detects the abnormality. The network topology extraction module (403) is used to count the proportion and number of broadcast, unicast and multicast data packets, and count the usage of different service ports, including the number of connections and the connection frequency, and set a threshold for business flow behavior based on historical data. Once a behavior is detected to exceed the threshold, it is considered that an abnormality has occurred, and the characteristics of the attack are listed for various known attacks. The real-time traffic monitoring system is used to analyze the traffic and detect in real time whether there is traffic that meets the attack characteristics. Once a flow that meets the specific attack behavior is detected in the traffic, it is considered that an abnormality has occurred; A feature extraction unit (4) receives the classified network traffic packets transmitted by the traffic classification unit (3), extracts statistical features, format features and network topology features from the traffic features, and transmits the extracted statistical features, format features and network topology features to the attack detection unit (5).
2. A network encapsulation detection system according to claim 1, characterized in that: The attack detection unit (5) receives the statistical features, format features and network topology features transmitted by the feature extraction unit (4), performs corresponding attack detection on the statistical features, format features and network topology features, thereby obtaining attack detection results, and transmits the attack detection results to the alarm and display unit (6); The alarm and display unit (6) receives the attack detection result transmitted by the attack detection unit (5), generates corresponding alarm information according to the attack detection result, and displays the attack detection result and the alarm information on a display terminal.
3. A network encapsulation detection system according to claim 1, characterized in that: The traffic packet capturing unit (1) comprises a traffic guiding module (101) and a traffic capturing module (102); The traffic steering module (101) is used to configure on the network device to direct the required traffic to the proxy server, and to achieve traffic steering by modifying the routing table; The traffic capture module (102) is used for the proxy server to cache the traffic after receiving the traffic, and to achieve the capture and cache of the traffic by using a log recording function.
4. A network encapsulation detection system according to claim 1, characterized in that: In the traffic classification unit (3), the clustering algorithm comprises the following steps: A1. Randomly select K samples as the centroids and use the Euclidean distance formula to calculate the distance between the sample data and the centroids, where the Euclidean distance formula is as follows: Among them, D i represents the Euclidean distance, c i represents the sample position, x i represents the position of the particle, i represents the position of the sample space, and K represents the classification category; A2. The sum of squared errors is used as the target and cost function of clustering, wherein the cost function is as follows: Among them, J represents the cost function, D i (c i ,x j ) represents the Euclidean distance between the sample position and the mass point position; A3. For each sample, the particle closest to each sample is the particle with the greatest similarity to the sample. When all samples can find the particle with the greatest similarity, the new centroid position is obtained, where the new centroid position is as follows: Among them, c i ′ represents the new centroid position, m i Represents the number of centroids.
5. A network encapsulation detection system according to claim 1, characterized in that: The attack detection unit (5) comprises a statistical feature detection module (501), a format feature detection module (502) and a network topology feature detection module (503); The statistical feature detection module (501) is used to detect the number of server session connections, the average length of server incoming packets and the average length of server outgoing packets according to the session information features in the statistical features, and detect the type, category, number and time of application programs used by the server according to the application distribution features in the statistical features, and detect the SYN and ACK packets generated in the TCP three-way handshake process to indicate the three-way handshake process and the number of handshakes in the process according to the indicator bit identification features in the statistical features; The format feature detection module (502) is used to calculate the types of unknown protocols and their respective proportions, the data frame composition of each unknown protocol and the protocol format of each unknown protocol according to the format features, and to judge whether abnormal behavior occurs by comparing the types of data frames existing in a class of unknown protocols and the proportion of each data frame; The network topology feature detection module (503) is used to calculate the entropy value of the four-tuple (source address, destination address, source port, destination port) in each data stream. For normal business traffic behavior and known attack behavior, the range of normal entropy value is determined through historical data, and corresponding thresholds are set. A real-time monitoring system is deployed in the communication system to collect and calculate the entropy value of the four-tuple information in the data stream in real time, and then the entropy value calculated in real time is compared with the pre-set normal entropy value. Once the entropy value change of a certain four-tuple exceeds the preset threshold, it is considered that abnormal behavior has occurred.
6. A network encapsulation detection system according to claim 5, characterized in that: In the network topology feature detection module (503), entropy value calculation is performed on the four-tuple (source address, destination address, source port, destination port) in each data stream, wherein the entropy value calculation formula is as follows: Among them, H sa,t represents information entropy, P i It represents the probability of the corresponding source address appearing, and n represents the total amount of traffic in the data flow.
7. A network encapsulation detection method, which is applicable to a network encapsulation detection system according to any one of claims 1 to 6, characterized in that: The following steps are involved: S1, traffic packet capture: deploying a proxy server to capture network traffic packets, and transmitting the captured network traffic packets to a traffic storage unit (2); S2, traffic storage: receiving and storing traffic packets in a database, and providing a data access interface for the traffic classification unit (3); S3, traffic classification: receiving a data access interface, accessing a network traffic packet in a database, classifying unknown protocol content using a clustering algorithm, and transmitting the classified network traffic packet to a feature extraction unit (4), wherein the feature extraction unit (4) includes a statistical feature extraction module (401), a format feature extraction module (402), and a network topology extraction module (403); The statistical feature extraction module (401) is used to count the number of data packets received or sent within a period of time, and to count the average size, maximum size and minimum size of the data packets, and to count the interval time of the arrival of the data packets, and to count the duration of each connection or session, and to count the distribution of different protocols, source addresses, and destination address features in the traffic; The format feature extraction module (402) is used to extract format features from a binary stream using a feature extraction algorithm, and construct a feature representation of an unknown protocol based on the extracted format features, and use a machine learning algorithm to train a recognition model to recognize an unknown protocol. When a new unknown protocol appears in a communication environment, it is input into the trained recognition model for recognition. If the recognition model cannot recognize the protocol, it is considered that a new unknown protocol has appeared, and if a known unknown protocol has abnormal behavior, the recognition model detects the abnormality. The network topology extraction module (403) is used to count the proportion and number of broadcast, unicast and multicast data packets, and count the usage of different service ports, including the number of connections and the connection frequency, and set a threshold for business flow behavior based on historical data. Once a behavior is detected to exceed the threshold, it is considered that an abnormality has occurred, and the characteristics of the attack are listed for various known attacks. The real-time traffic monitoring system is used to analyze the traffic and detect in real time whether there is traffic that meets the attack characteristics. Once a flow that meets the specific attack behavior is detected in the traffic, it is considered that an abnormality has occurred; S4, feature extraction: receiving the classified network traffic packets, extracting statistical features, format features and network topology features from the traffic features, and transmitting the extracted features to the attack detection unit (5), the attack detection unit (5) comprising a statistical feature detection module (501), a format feature detection module (502) and a network topology feature detection module (503); The statistical feature detection module (501) is used to detect the number of server session connections, the average length of server incoming packets and the average length of server outgoing packets according to the session information features in the statistical features, and detect the type, category, number and time of application programs used by the server according to the application distribution features in the statistical features, and detect the SYN and ACK packets generated in the TCP three-way handshake process to indicate the three-way handshake process and the number of handshakes in the process according to the indicator bit identification features in the statistical features; The format feature detection module (502) is used to calculate the types of unknown protocols and their respective proportions, the data frame composition of each unknown protocol and the protocol format of each unknown protocol according to the format features, and to judge whether abnormal behavior occurs by comparing the types of data frames existing in a class of unknown protocols and the proportion of each data frame; The network topology feature detection module (503) is used to calculate the entropy value of the four-tuple source address, destination address, source port, and destination port in each data stream. For normal business traffic behavior and known attack behavior, the range of normal entropy value is determined through historical data, and corresponding thresholds are set. A real-time monitoring system is deployed in the communication system to collect and calculate the entropy value of the four-tuple information in the data stream in real time, and then the entropy value calculated in real time is compared with the pre-set normal entropy value. Once the entropy value change of a certain four-tuple exceeds the preset threshold, it is considered that abnormal behavior occurs; In the network topology feature detection module (503), entropy value calculation is performed on the four-tuple source address, destination address, source port, and destination port in each data stream, wherein the entropy value calculation formula is as follows: Among them, H sa,t represents information entropy, P i represents the probability of the corresponding source address appearing, and n represents the total amount of traffic in the data flow; S5, attack detection: receiving statistical features, format features and network topology features, performing corresponding attack detection on the features, obtaining attack detection results, and transmitting the results to the alarm and display unit (6); S6. Alarm and display: Receive attack detection results, generate corresponding alarm information, and display the attack detection results and alarm information on the display terminal.
