Network anomaly detection method and device, equipment and storage medium

By using an isolated forest model trained on IPv4 and IPv6 historical data in a dual-stack network environment to detect real-time network data, identify exception points and attack patterns in IPv4 and IPv6 data, the problem of neglecting IPv6 in the existing technology is solved and improved the problem of improving IPv6 The effectiveness and accuracy of network security detection.

CN119030764AActive Publication Date: 2024-11-26中国移动通信集团江西有限公司 +1

Patent Information

Application Number
CN202411124012.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-26
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

In a dual-stack network environment, the existing network anomaly detection methods cannot comprehensively monitor and evaluate network security, resulting in poor detection results. This is mainly due to the ignorance of the existence and characteristics of IPv6 and focuses on the detection of the IPv4 network environment.

Method used

By capturing real-time network data flowing through the switch, using an isolated forest model trained on IPv4 and IPv6 historical network data for detection, identifying exception points and attack patterns in IPv4 and IPv6 data, and achieving comprehensive monitoring and evaluation of dual-stack network environments .

Benefits of technology

It improves the effectiveness of network security detection, can process IPv4 and IPv6 data in parallel, avoids neglect of IPv6, enhances defense capabilities against new attacks, and improves detection accuracy and timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030764A_ABST
    Figure CN119030764A_ABST
Patent Text Reader

Abstract

The invention discloses a network anomaly detection method, device and equipment and a storage medium, relates to the technical field of network security monitoring, and discloses a network anomaly detection method which comprises the following steps: judging whether real-time network data captured and flowing through a switch is abnormal or not; if it is determined that the real-time network data are abnormal, the real-time network data are input into a preset detection model, the abnormal type and abnormal points of the real-time network data are determined, and the preset detection model is obtained by training an isolation forest model through historical network data of IPv6 and IPv4; and identifying an attack mode existing in the real-time network data based on the exception type and the exception point. Namely, the real-time network data is detected by using the preset detection model obtained by training the isolation forest model according to the historical network data of the IPv4 and the IPv6, so that the abnormal points in the IPv4 and / or IPv6 network environment are identified at one time, the network security is comprehensively monitored, and the detection effect on the network security is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of network security monitoring, and in particular to a network anomaly detection method, device, equipment and storage medium. Background Art

[0002] With the rapid development of network technology, IPv4 (Internet Protocol Version 4) address resources have been basically exhausted, but IPv6 (Internet Protocol Version 6) is still being gradually promoted and improved. In order to make the network technology smoothly transition from IPv4 to IPv6, a dual-stack network architecture is usually adopted to support both IPv4 and IPv6 protocols.

[0003] However, the implementation of a dual-stack network environment increases complexity, monitoring difficulty, and security risks. Currently, commonly used network anomaly detection methods rely on fixed rules or single data flow analysis, and mainly focus on IPv4, ignoring the existence and characteristics of IPv6. Therefore, it is impossible to fully monitor and evaluate network security in a dual-stack network environment, resulting in poor network security detection results.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a network anomaly detection method, which aims to solve the technical problem that it is impossible to fully monitor and evaluate network security in a dual-stack network environment, resulting in poor detection effect on network security.

[0006] To achieve the above objectives, the present application proposes a network anomaly detection method, the method comprising:

[0007] Determine whether there are any anomalies in the real-time network data captured and flowing through the switch;

[0008] If it is determined that the real-time network data is abnormal, the real-time network data is input into a preset detection model to determine the abnormal type and abnormal point of the real-time network data, wherein the preset detection model is obtained by training an isolation forest model using historical network data of IPv6 and IPv4;

[0009] An attack pattern existing in the real-time network data is identified based on the anomaly type and the anomaly point.

[0010] In one embodiment, the step of determining whether the captured real-time network data flowing through the switch is abnormal includes:

[0011] Capture real-time network data flowing through the switch;

[0012] Perform TCP classification on the real-time network data, and divide the real-time network data into IPv4 data and / or IPv6 data;

[0013] The IPv4 data and / or the IPv6 data are compared based on a preset baseline model to determine whether there is an anomaly in the IPv4 data and / or the IPv6 data, wherein the preset baseline model is obtained by training a clustering model based on historical IPv4 data and historical IPv6 data flowing through the switch.

[0014] In one embodiment, the step of comparing the IPv4 data and / or the IPv6 data based on a preset baseline model to determine whether there is an abnormality in the IPv4 data and / or the IPv6 data includes:

[0015] If the IPv4 data and the IPv6 data exist in the real-time network data, extracting basic features from the IPv4 data and the IPv6 data based on a preset baseline model, and extracting extended header features from the IPv6 data;

[0016] Based on the comparison of normal features in the preset baseline model with the basic features and the extended header features, it is determined whether there is an abnormality in the IPv4 data and / or the IPv6 data.

[0017] In one embodiment, the step of comparing the IPv4 data and / or the IPv6 data based on a preset baseline model to determine whether there is an abnormality in the IPv4 data and / or the IPv6 data includes:

[0018] If the IPv4 data and the IPv6 data exist in the real-time network data, extracting basic features from the IPv4 data and the IPv6 data based on a preset baseline model, and extracting extended header features from the IPv6 data;

[0019] Based on the comparison of normal features in the preset baseline model with the basic features and the extended header features, it is determined whether there is an abnormality in the IPv4 data and / or the IPv6 data.

[0020] In one embodiment, the identifying the attack mode existing in the real-time network data based on the anomaly type and the anomaly point includes:

[0021] Performing content analysis and behavior analysis on the abnormal data corresponding to the abnormal point based on a preset DPI to determine the traffic pattern of the IPv4 data and the IPv6 data;

[0022] The traffic pattern is compared with a preset baseline pattern to identify an attack pattern of the real-time network data.

[0023] In one embodiment, before the step of determining whether the captured real-time network data flowing through the switch is abnormal, the step further includes:

[0024] Acquire historical network data flowing through the switch;

[0025] Extracting basic features of historical IPv6 data and historical IPv4 data and unique features of IPv6 data from the historical network data;

[0026] Identifying unique abnormal attributes of the historical IPv6 data from the unique features;

[0027] An isolation forest model is trained based on the unique abnormal attributes and the basic features to obtain a preset detection model.

[0028] In one embodiment, the step of identifying the unique abnormal attributes of the historical IPv6 data from the unique features includes:

[0029] Identify the extension header type, extension header sequence, address composition and allocation mode of the historical IPv6 data from the unique features;

[0030] identifying an abnormal type from the extended header type, identifying an abnormal order from the extended header order, identifying an abnormal address from the address composition, and identifying an abnormal mode from the allocation mode;

[0031] Based on the exception type, the exception sequence, the exception address and the exception pattern, the unique exception attribute of the historical IPv6 is obtained.

[0032] In addition, to achieve the above purpose, the present application also proposes a network anomaly detection device, the network anomaly detection device comprising:

[0033] A judgment module, used to judge whether the real-time network data captured and flowing through the switch is abnormal;

[0034] A detection module, for inputting the real-time network data into a preset detection model to determine the abnormal type and abnormal point of the real-time network data if it is determined that the real-time network data is abnormal, wherein the preset detection model is obtained by training an isolation forest model using historical network data of IPv6 and IPv4;

[0035] An identification module is used to identify an attack pattern existing in the real-time network data based on the anomaly type and the anomaly point.

[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a network anomaly detection device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the network anomaly detection method as described above.

[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the network anomaly detection method described above are implemented.

[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the network anomaly detection method described above are implemented.

[0039] One or more technical solutions proposed in this application have at least the following technical effects:

[0040] The present application captures the real-time network data flowing through to perform anomaly detection on the real-time network data, and determines whether the real-time network data has anomalies. When the real-time network data has anomalies, it indicates that there is a security threat to the real-time network data. In order to be able to process IPv4 data and IPv6 data in parallel, a preset detection model obtained by training an isolation forest model based on historical network data of IPv4 and IPv6 is used to detect the real-time network data, so that anomalies in the IPv4 network environment and / or anomalies in the IPv6 network environment can be identified through a single detection, thereby avoiding the concentration of network anomaly detection in the IPv4 network environment, and thus avoiding ignoring the existence and characteristics of IPv6, and then further identifying the attack mode existing in the real-time network data through anomaly types and anomalies, thereby achieving comprehensive monitoring and evaluation of network security, and thus improving the detection effect of network security. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0043] Figure 1 A flowchart of the first embodiment of the network anomaly detection method of the present application is provided;

[0044] Figure 2 A flowchart of the second embodiment of the network anomaly detection method of the present application is provided;

[0045] Figure 3 Schematic diagram of the process provided for the third embodiment of the network anomaly detection method of the present application

[0046] Figure 4 A brief flowchart of the network anomaly detection method provided in the embodiment of the present application;

[0047] Figure 5 A schematic diagram of the network architecture of the network anomaly detection system according to an embodiment of the present application;

[0048] Figure 6 This is a schematic diagram of the module structure of the network anomaly detection device according to an embodiment of the present application;

[0049] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the network anomaly detection method in the embodiment of the present application.

[0050] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0052] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0053] The main solution of the embodiment of the present application is: after the network server captures the real-time network data flowing through the switch, it determines whether there is any abnormality in the real-time network data; if it is determined that the real-time network data is abnormal, the real-time network data is input into a preset detection model to determine the abnormality type and abnormality point of the real-time network data, and the preset detection model is obtained by training the isolation forest model with historical network data of IPv6 and IPv4; based on the abnormality type and the abnormality point, the attack mode existing in the real-time network data is identified.

[0054] In this embodiment, for ease of description, the following description is made with the network server as the execution entity.

[0055] Since the implementation of the dual-stack network environment in the existing technology increases the complexity, monitoring difficulty and security risks, the currently commonly used network anomaly detection methods rely on fixed rules or single data flow analysis, and mainly focus on IPv4, ignoring the existence and characteristics of IPv6. Therefore, it is impossible to comprehensively monitor and evaluate network security in the dual-stack network environment, resulting in poor detection results for network security.

[0056] The present application provides a solution, which captures the real-time network data flowing through to perform anomaly detection on the real-time network data, determine whether the real-time network data has anomalies, and when the real-time network data has anomalies, it indicates that there is a security threat to the real-time network data. In order to be able to process IPv4 data and IPv6 data in parallel, a preset detection model obtained by training an isolation forest model based on historical network data of IPv4 and IPv6 is used to detect the real-time network data, so that anomalies in the IPv4 network environment and / or anomalies in the IPv6 network environment can be identified through one detection, thereby avoiding the concentration of network anomaly detection in the IPv4 network environment, and thus avoiding ignoring the existence and characteristics of IPv6, and then further identifying the attack mode existing in the real-time network data through anomaly types and anomalies, thereby achieving comprehensive monitoring and evaluation of network security, and thus improving the detection effect of network security.

[0057] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a network server, etc. The network server is taken as an example to illustrate this embodiment and the following embodiments.

[0058] Based on this, the present application embodiment provides a network anomaly detection method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the network anomaly detection method of the present application.

[0059] In this embodiment, the network anomaly detection method includes steps S10 to S40:

[0060] Step S10, determining whether there is any abnormality in the real-time network data captured and flowing through the switch;

[0061] It should be noted that a switch can be a network device used to forward electrical (optical) signals and provide an exclusive electrical signal path for any two network nodes connected to the switch. Real-time network data can be real-time traffic of a source port in a network architecture.

[0062] In addition, it should be noted that the source port is the port number used by the sender of the data packet in network communication.

[0063] It is understandable that since switch users exchange data between any two network nodes, and since detecting anomalies in real-time network data will increase the time it takes for the data receiving end to receive the real-time network data, thereby increasing the delay in data transmission, in order to avoid adding delays to each network data during transmission, after capturing the real-time network data flowing through the switch, the real-time network data can be first judged for anomalies. When there is no anomaly in the real-time network data, the real-time network data can be directly released to ensure the real-time nature of normal network data.

[0064] It is understandable that, since the real-time network data may be IPv4 data or IPv6 data, or may include both IPv4 data and IPv6 data, in order to determine the anomalies in the IPv4 data and the IPv6 data, the determination of whether the real-time network data is abnormal is to perform a judgment on the IPv4 data and the IPv6 data in parallel, thereby avoiding focusing the detection of network security on the detection of IPv4 data and ignoring the detection of IPv6 data.

[0065] In a specific implementation, the real-time traffic (real-time network data) flowing through a switch or router can be captured by a traffic capture device. After the real-time network data is captured, a recognition model that can identify anomalies in IPv4 data and anomalies in IPv6 data is used to judge the real-time network data, so that the anomalies in the IPv4 data can be accurately identified, and the anomalies in the IPv6 data can also be accurately identified.

[0066] Step S20, if it is determined that the real-time network data is abnormal, the real-time network data is input into a preset detection model to determine the abnormal type and abnormal point of the real-time network data, wherein the preset detection model is obtained by training an isolation forest model using historical network data of IPv6 and IPv4;

[0067] It should be noted that the anomaly points may include source / destination addresses, ports, protocol types, traffic size, packet length, and extension headers. The anomaly types may be traffic anomalies, extension header usage, and address anomalies. Isolation forest may be an unsupervised learning algorithm for anomaly detection, that is, using a tree structure to identify abnormal data points that are more easily isolated than normal data, so as to obtain detection results more quickly. That is, the isolation forest model may be obtained by training a clustering model using abnormal data points of historical network data of IPv4 and IPv6.

[0068] It is understandable that the detection model using isolation forest and online learning mechanism can adapt to changes in network behavior and attack patterns in a timely manner, improving the accuracy and timeliness of anomaly detection. Among them, IPv6 has unique security threats, including detection of attack methods such as extension header utilization and address spoofing, which improves the system's defense capabilities against new attacks.

[0069] Step S30: identifying attack patterns existing in the real-time network data based on the anomaly type and the anomaly point.

[0070] It should be noted that the attack mode may be a denial of service attack, a man-in-the-middle attack, a SQL injection attack, a cross-site scripting attack, a supply chain attack, or an unknown attack mode.

[0071] It is understandable that after determining the anomaly type, the form of the attack can be determined, and combined with the anomaly points, the attack pattern existing in the real-time network data can be accurately determined, that is, the accuracy of determining the attack pattern is increased.

[0072] Furthermore, in order to increase the recognition accuracy of the attack pattern, step S30 may also include:

[0073] Performing content analysis and behavior analysis on the abnormal data corresponding to the abnormal point based on a preset DPI to determine the traffic pattern of the IPv4 data and the IPv6 data;

[0074] The traffic pattern is compared with a preset baseline pattern to identify an attack pattern of the real-time network data.

[0075] It should be noted that the preset DPI (Deep Packet Inspection) realizes the identification, control and management of non-standard protocols, viruses, spam, and data packets with intrusion intentions in the data packets through in-depth analysis of the application layer of the data packets, and then filters the data packets.

[0076] It is understandable that by presetting DPI, the content of data packets can be deeply analyzed; accurate cross-protocol attacks can be provided; encapsulation and conversion mechanisms can be parsed, attack types can be detected, and cross-protocol attacks can be identified and responded to, such as IPv6 to IPv4 attacks, making security protection more comprehensive; the system can flexibly implement traffic isolation, block attack sources, or adjust access control measures according to different abnormal events.

[0077] In the specific implementation, when the attack is a cross-script attack, the DPI is preset as a traffic monitoring tool to perform data content analysis on the anomaly detection data, and a behavior-based anomaly detection system is used to analyze the traffic pattern, determine the normal IPv4 and IPv6 traffic patterns, and establish a baseline for comparison. For known cross-protocol attacks, signature matching is used to identify the attack pattern; for unknown attacks, anomaly detection is used to analyze traffic anomalies, and predefined response operations are triggered based on the detected abnormal events. The response actions corresponding to the response operations include: traffic isolation, blocking the attack source, and adjusting the access control list.

[0078] The present embodiment provides a network anomaly detection method, which captures the real-time network data flowing through to perform anomaly detection on the real-time network data, and determines whether the real-time network data has anomalies. When the real-time network data has anomalies, it indicates that there is a security threat to the real-time network data. In order to process IPv4 data and IPv6 data in parallel, a preset detection model obtained by training an isolation forest model based on historical network data of IPv4 and IPv6 is used to detect the real-time network data, so that anomalies in the IPv4 network environment and / or anomalies in the IPv6 network environment can be identified through one detection, thereby avoiding the concentration of network anomaly detection in the IPv4 network environment, and further avoiding ignoring the existence and characteristics of IPv6. Then, the attack mode existing in the real-time network data is further identified through the anomaly type and anomaly point, so as to achieve comprehensive monitoring and evaluation of network security, thereby improving the detection effect of network security.

[0079] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , step S10 includes steps S11 to S13:

[0080] Step S11, capturing real-time network data flowing through the switch;

[0081] In a specific implementation, a SPAN (Switched Port Analyzer) port can be configured on a switch or router in the network architecture, and the traffic of the source port to be monitored can be copied to a designated mirror port to mirror the network traffic to a pre-deployed capture device, and capture parameters can be set to capture network data in real time.

[0082] The capture device is a network probe that supports IPv6 and IPv4. The probe is deployed at the network entrance and exit to ensure that all necessary traffic is captured. The SPAN port can copy or mirror the data traffic of a specified port (controlled port) to another port (monitoring port) for in-depth network analysis and monitoring.

[0083] Step S12, performing TCP classification on the real-time network data, dividing the real-time network data into IPv4 data and / or IPv6 data;

[0084] It should be noted that TCP (Transmission Control Protocol) is a connection-oriented, reliable, byte stream-based transport layer communication protocol. TCP types can be IPv4 data types, IPv6 data types, and IPv4 and IPv6 dual stack types.

[0085] It is understandable that after using the capture device to obtain real-time network data, in order to be able to detect the real-time network data in a targeted manner and reduce the complexity of detecting anomalies in the real-time network data, the TCP type contained in the real-time network data can be analyzed first to determine the IPv4 data and IPv6 data in the real-time network data.

[0086] Step S13, comparing the IPv4 data and / or the IPv6 data based on a preset baseline model to determine whether there is an anomaly in the IPv4 data and / or the IPv6 data, wherein the preset baseline model is obtained by training a clustering model based on historical IPv4 data and historical IPv6 data flowing through the switch.

[0087] It should be noted that the preset baseline model may be a clustering model including normal network data features obtained by training with historical IPv4 data and historical IPv6 data.

[0088] Understandably, build accurate baseline models of network behavior, including special considerations for IPv6 traffic. Use statistical and behavioral analysis techniques to define normal behavior patterns. Monitor traffic in real time to quickly identify deviations from the baseline model; apply deep packet inspection and time series analysis to monitor traffic dynamics.

[0089] In a specific implementation, network traffic can be compared with a baseline model in real time to identify abnormal behavior, and deep packet inspection and time series analysis can be applied to monitor the dynamics of network traffic.

[0090] Optionally, the establishment of the preset baseline model may specifically be to use historical network data to model normal network behavior to form a baseline.

[0091] In the specific implementation, the time range for collecting data is determined, and historical network data within this time range is obtained. For example, network data from 9:000 to 17:00 on weekdays is obtained, and then the characteristics of packet size, flow duration, traffic direction or port number are extracted from the historical network data. After data cleaning, clustering is used to establish a baseline model, and the model is trained to identify normal traffic patterns.

[0092] It should be noted that cluster modeling can be performed using K-means cluster modeling. In K-means, the number of clusters k is determined, and the historical network data is divided into multiple clusters. Each cluster represents a normal behavior pattern. The clustering results are analyzed, and the center of each cluster is identified and labeled as a representative of normal behavior. The center of each cluster and its radius (the distance to the farthest point in the cluster) define the range of normal behavior. A baseline is formed and a model is established.

[0093] It should be noted that the clustering results can be analyzed by calculating the mean and the standard deviation. The mean is calculated for each feature as the center point of normal behavior; the dispersion of the data is evaluated to assist in setting the threshold of normal behavior. Then, MDS is applied for multidimensional scaling analysis to reduce the high-dimensional feature space to two or three dimensions, and identify tightly clustered point groups in the low-dimensional space, representing normal behavior patterns.

[0094] Furthermore, step S13 may also include:

[0095] If the IPv4 data and the IPv6 data exist in the real-time network data, extracting basic features from the IPv4 data and the IPv6 data based on a preset baseline model, and extracting extended header features from the IPv6 data;

[0096] Based on the comparison of normal features in the preset baseline model with the basic features and the extended header features, it is determined whether there is an abnormality in the IPv4 data and / or the IPv6 data.

[0097] It should be noted that the extended header features may include the type and order of the extended header, etc. The basic features may include the source / destination address, port, protocol type, traffic size, and data packet length.

[0098] It is understandable that in order to accurately detect anomalies in IPv6 data, and because IPv6 data has exclusive features that IPv4 data does not have, when extracting features from real-time network data, it is necessary not only to extract basic features, but also to extract extended header features from IPv6 data when IPv6 data exists in the real-time network data.

[0099] In the specific implementation, a preset baseline model is used to extract basic features and extended header features of IPv6 data from IPv4 data and IPv6 data. The preset baseline model compares the extracted basic features with the normal basic features obtained through training to determine whether the basic features are abnormal, and compares the extended header features with the standard extended header features obtained through training to determine whether the extended header features are abnormal.

[0100] In the specific implementation, when tcpdump is used to capture data packets, the command is set to: tcpdump-i any-nn-vw capture.pcap, where the capture.pcap file contains data packets transmitted on the network. Then, use tcpdump to read the capture.pcap file and extract key features: tcpdump-nn-vr capture.pcap. Finally, use the script to extract the required features: source / destination address, port, protocol type, traffic size, and packet length. Among them, the source / destination address is the address after the IP field; the port is the number after the IP address for TCP or UDP traffic; the protocol type is usually displayed in the Proto field; the traffic size is the "Total Length" field in IPv6, but "Payload Length", which indicates the length of user data in addition to the 40-byte fixed-length IPv6 header; packet length: the length field in the TCPdump output. Among them, when using tcpdump, manually view the output of each IPv6 packet, identify and track each extension header; look for the "Next Header" field, which indicates the next header type; follow the "Next Header" field and track each extension header until you reach the transport layer.

[0101] Optionally, in order for network engineers to analyze network data, Wireshark can be used as a graphical interface for analysis.

[0102] Specifically, when using Wireshark as a graphical interface for analysis, the steps are as follows:

[0103] 1. Open Wireshark, select File > Open, and select the .pcap file.

[0104] 2. Use Wireshark's filter to view TCP packets:

[0105] 3. Select the packet of interest to view the detailed information pane.

[0106] 4. Look for the source / destination address, port, and other relevant information in the "IP" or "IPv6" and "TCP" or "UDP" layers.

[0107] 5. Export specific fields: Select "File" > "Export Group Decryption" > "To CSV"; in the export dialog box, select the fields you need.

[0108] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction, and will not be described in detail later. Figure 3 Before step S10, the network anomaly detection method further includes steps S01 to S104:

[0109] Step S01, obtaining historical network data flowing through the switch;

[0110] Step S02, extracting basic features of historical IPv6 data and historical IPv4 data and unique features of IPv6 data from the historical network data;

[0111] Step S03, identifying the unique abnormal attributes of the historical IPv6 data from the unique features;

[0112] Step S04: training an isolation forest model based on the unique abnormal attributes and the basic features to obtain a preset detection model.

[0113] It should be noted that the unique features include extended header features and address features. The abnormal attributes can be the type and order of the extended headers, and the composition and allocation mode of the address.

[0114] It is understandable that the detection model is trained using isolation forest, and the detection model is continuously learned and updated online to adapt to changes in network behavior. The IPv6 attack methods are jointly detected based on the IPv6 address allocation and authentication mechanism, among which the IPv6-specific extension header utilization and address spoofing attack methods are detected.

[0115] In the specific implementation, since anomalies are generally rare and different, they are easier to be isolated. Therefore, the detection model can be trained using the isolation forest. That is, during training, select and extract features related to network data: source / destination address, port, protocol type, traffic size, and packet length. Then, use historical network data (including samples of normal and abnormal traffic) to train the isolation forest model. In the isolation forest, the number of trees and subsample size are key parameters. The optimal parameters are selected through cross-validation. After the model training is completed, the isolation forest model can be used to evaluate the degree of abnormality of network data.

[0116] Furthermore, step S3 may also include:

[0117] Identify the extension header type, extension header sequence, address composition and allocation mode of the historical IPv6 data from the unique features;

[0118] identifying an abnormal type from the extended header type, identifying an abnormal order from the extended header order, identifying an abnormal address from the address composition, and identifying an abnormal mode from the allocation mode;

[0119] Based on the exception type, the exception sequence, the exception address and the exception pattern, the unique exception attribute of the historical IPv6 is obtained.

[0120] It is understandable that in order to accurately identify anomalies in IPv6 data, it is necessary to extract the extended header type, extended header order, address composition and allocation mode in the IPv6 data to accurately determine the characteristics of the IPv6 data, so that the detection model trained based on historical IPv6 data can accurately identify attack data of the IPv6 data type in real-time network data.

[0121] For example, to help understand the implementation process of the network anomaly detection method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 4 , Figure 4 A brief flowchart of a network anomaly detection method is provided, specifically:

[0122] Step S1, deploying a dual-stack traffic capture device in the network using a network probe that supports IPv6 and IPv4, capturing all data packets entering and leaving the network, and classifying them according to different protocol types;

[0123] Step S2, extracting key features of the data packet and analyzing the extended header information of the IPv6 data packet; wherein the extracted key features include source / destination address, port, protocol type, flow size, and data packet length;

[0124] Step S3, using historical data to model normal network behavior to form a baseline, and identifying normal patterns of network behavior through statistics; comparing network traffic with the baseline model in real time to identify abnormal behavior, and applying deep packet inspection and time series analysis to monitor the dynamics of network traffic;

[0125] Step S4, using the isolation forest to train the detection model, continuously learning and updating the detection model online, adapting to changes in network behavior, and jointly detecting IPv6 attack methods based on IPv6 address allocation and authentication mechanisms, wherein the attack methods of IPv6-specific extension header utilization and address spoofing are detected;

[0126] Step S5, based on real-time traffic monitoring and analysis of IPv4 and IPv6 traffic, determines whether there is a cross-protocol attack. When a cross-protocol attack is identified, dynamic access control and traffic filtering policies are executed. The system triggers predefined response operations based on the detected abnormal events. The response actions corresponding to the response operations include: traffic isolation, blocking the attack source, and adjusting the access control list.

[0127] Step S6, continuously monitor the performance of the detection system, and regularly update the system's software patches and threat intelligence database to adapt to new threats and attack methods.

[0128] Optionally, when establishing an update strategy, in order to better regularly update the system's software patches and threat intelligence database, it is necessary to determine a strategy that includes frequency, responsibility allocation, and rollback plan for updates, including update frequency (the update frequency of software patches and threat intelligence databases can be daily, weekly, or monthly), responsible personnel (specify a team or individual responsible for monitoring update notifications, performing update operations, and verifying update results), testing and verification (testing in an isolated test environment before updating), and rollback plan.

[0129] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the network anomaly detection method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0130] This application also provides a network anomaly detection system, referring to Figure 5 , the network anomaly detection system includes a network server, a switch and a capture device;

[0131] The network server is used to implement the above method steps;

[0132] The switch is used to exchange network data between any two network nodes;

[0133] The capture device may be a module set in a network server for users to capture network traffic flowing through a switch. The capture device supports both IPv4 and IPv6 data types to ensure that all IPv4 and IPv6 data types can be captured.

[0134] This application also provides a network anomaly detection device, please refer to Figure 6 , the network anomaly detection device comprises:

[0135] A judgment module 10 is used to judge whether the real-time network data captured and flowing through the switch is abnormal;

[0136] A detection module 20, for inputting the real-time network data into a preset detection model to determine the abnormal type and abnormal point of the real-time network data if it is determined that the real-time network data is abnormal, wherein the preset detection model is obtained by training an isolation forest model using historical network data of IPv6 and IPv4;

[0137] The identification module 30 is used to identify the attack mode existing in the real-time network data based on the abnormal type and the abnormal point.

[0138] Optionally, the judgment module 10 is also used to capture real-time network data flowing through the switch; perform TCP classification on the real-time network data, and divide the real-time network data into IPv4 data and / or IPv6 data; compare the IPv4 data and / or the IPv6 data based on a preset baseline model to determine whether there are abnormalities in the IPv4 data and / or the IPv6 data, and the preset baseline model is obtained based on the historical IPv4 data and historical IPv6 data flowing through the switch. Training the clustering model is obtained.

[0139] Optionally, the judgment module 10 is also used to extract basic features from the IPv4 data and the IPv6 data based on a preset baseline model, and extract extended header features from the IPv6 data if the IPv4 data and the IPv6 data exist in the real-time network data; based on the normal features in the preset baseline model, the basic features and the extended header features are compared respectively to determine whether there are abnormalities in the IPv4 data and / or the IPv6 data.

[0140] Optionally, the identification module 30 is also used to perform content analysis and behavior analysis on the abnormal data corresponding to the abnormal point based on a preset DPI, to determine the traffic pattern of the IPv4 data and the IPv6 data; to compare the traffic pattern with a preset baseline pattern, to identify the attack pattern of the real-time network data.

[0141] Optionally, the judgment module 10 is also used to obtain historical network data flowing through the switch; extract basic features of historical IPv6 data and historical IPv4 data and unique features of IPv6 data from the historical network data; identify unique abnormal attributes of the historical IPv6 data from the unique features; and train an isolation forest model based on the unique abnormal attributes and the basic features to obtain a preset detection model.

[0142] Optionally, the judgment module 10 is also used to identify the extended header type, extended header order, address structure and allocation mode of the historical IPv6 data from the unique features; identify the abnormal type from the extended header type, identify the abnormal order from the extended header order, identify the abnormal address from the address structure, and identify the abnormal pattern from the allocation pattern; based on the abnormal type, the abnormal order, the abnormal address and the abnormal pattern, obtain the unique abnormal attributes of the historical IPv6.

[0143] The network anomaly detection device provided by the present application adopts the network anomaly detection method in the above embodiment, which can solve the technical problem that the network security cannot be fully monitored and evaluated in a dual-stack network environment, resulting in poor detection effect on the network security. Compared with the prior art, the beneficial effects of the network anomaly detection device provided by the present application are the same as the beneficial effects of the network anomaly detection method provided by the above embodiment, and the other technical features in the network anomaly detection device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0144] The present application provides a network anomaly detection device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the network anomaly detection method in the above-mentioned embodiment 1.

[0145] Reference below Figure 7 , which shows a schematic diagram of the structure of a network anomaly detection device suitable for implementing an embodiment of the present application. The network anomaly detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The network anomaly detection device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0146] like Figure 7As shown, the network anomaly detection device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the network anomaly detection device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the network anomaly detection device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a network anomaly detection device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0147] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0148] The network anomaly detection device provided by the present application adopts the network anomaly detection method in the above embodiment, which can solve the technical problem that the network security cannot be fully monitored and evaluated in a dual-stack network environment, resulting in poor detection effect on the network security. Compared with the prior art, the beneficial effects of the network anomaly detection device provided by the present application are the same as the beneficial effects of the network anomaly detection method provided by the above embodiment, and the other technical features in the network anomaly detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0149] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0151] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the network anomaly detection method in the above-mentioned embodiment.

[0152] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0153] The computer-readable storage medium may be included in the network anomaly detection device; or may exist independently without being assembled into the network anomaly detection device.

[0154] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the network anomaly detection device, the network anomaly detection device: determines whether there is an anomaly in the real-time network data captured and flowing through the switch; if it is determined that the real-time network data has an anomaly, the real-time network data is input into a preset detection model to determine the anomaly type and anomaly point of the real-time network data, and the preset detection model is obtained by training an isolation forest model using historical network data of IPv6 and IPv4; and identifies the attack mode existing in the real-time network data based on the anomaly type and the anomaly point.

[0155] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0156] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0157] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0158] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned network anomaly detection method, and can solve the technical problem that the network security cannot be fully monitored and evaluated in a dual-stack network environment, resulting in poor detection effect on the network security. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the network anomaly detection method provided by the above-mentioned embodiment, and will not be repeated here.

[0159] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned network anomaly detection method when executed by a processor.

[0160] The computer program product provided by the present application can solve the technical problem that it is impossible to fully monitor and evaluate network security in a dual-stack network environment, resulting in poor detection effect on network security. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the network anomaly detection method provided by the above embodiment, and will not be repeated here.

[0161] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A network anomaly detection method, characterized in that: The method includes: Determine whether there are any anomalies in the real-time network data captured and flowing through the switch; If it is determined that the real-time network data is abnormal, the real-time network data is input into a preset detection model to determine the abnormal type and abnormal point of the real-time network data, wherein the preset detection model is obtained by training an isolation forest model using historical network data of IPv6 and IPv4; An attack pattern existing in the real-time network data is identified based on the anomaly type and the anomaly point.

2. The method according to claim 1, characterized in that The step of determining whether the captured real-time network data flowing through the switch is abnormal comprises: Capture real-time network data flowing through the switch; Perform TCP classification on the real-time network data, and divide the real-time network data into IPv4 data and / or IPv6 data; The IPv4 data and / or the IPv6 data are compared based on a preset baseline model to determine whether there is an anomaly in the IPv4 data and / or the IPv6 data, wherein the preset baseline model is obtained by training a clustering model based on historical IPv4 data and historical IPv6 data flowing through the switch.

3. The method according to claim 2, characterized in that The step of comparing the IPv4 data and / or the IPv6 data based on a preset baseline model to determine whether there is an abnormality in the IPv4 data and / or the IPv6 data includes: If the IPv4 data and the IPv6 data exist in the real-time network data, extracting basic features from the IPv4 data and the IPv6 data based on a preset baseline model, and extracting extended header features from the IPv6 data; Based on the comparison of normal features in the preset baseline model with the basic features and the extended header features, it is determined whether there is an abnormality in the IPv4 data and / or the IPv6 data.

4. The method according to any one of claims 1 to 3, characterized in that The step of identifying the attack mode existing in the real-time network data based on the anomaly type and the anomaly point comprises: Performing content analysis and behavior analysis on the abnormal data corresponding to the abnormal point based on a preset DPI to determine the traffic pattern of the IPv4 data and the IPv6 data; The traffic pattern is compared with a preset baseline pattern to identify an attack pattern of the real-time network data.

5. The method according to any one of claims 1 to 3, characterized in that Before the step of determining whether the real-time network data flowing through the switch is abnormal, the following steps are also included: Acquire historical network data flowing through the switch; Extracting basic features of historical IPv6 data and historical IPv4 data and unique features of IPv6 data from the historical network data; Identifying unique abnormal attributes of the historical IPv6 data from the unique features; An isolation forest model is trained based on the unique abnormal attributes and the basic features to obtain a preset detection model.

6. The method according to claim 5, characterized in that The step of identifying the unique abnormal attributes of the historical IPv6 data from the unique features comprises: Identify the extension header type, extension header sequence, address composition and allocation mode of the historical IPv6 data from the unique features; identifying an abnormal type from the extended header type, identifying an abnormal order from the extended header order, identifying an abnormal address from the address composition, and identifying an abnormal mode from the allocation mode; Based on the exception type, the exception sequence, the exception address and the exception pattern, the unique exception attribute of the historical IPv6 is obtained.

7. A network anomaly detection device, characterized in that: The device comprises: A judgment module, used to judge whether the real-time network data captured and flowing through the switch is abnormal; A detection module, for inputting the real-time network data into a preset detection model to determine the abnormal type and abnormal point of the real-time network data if it is determined that the real-time network data is abnormal, wherein the preset detection model is obtained by training an isolation forest model using historical network data of IPv6 and IPv4; An identification module is used to identify an attack pattern existing in the real-time network data based on the anomaly type and the anomaly point.

8. A network anomaly detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the network anomaly detection method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the network anomaly detection method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the network anomaly detection method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for preventing generation of automatic tunnel loop

    CN102685271A

  • Internet of things intrusion detection method based on finite state automaton and detection system

    CN107135093A

  • Data monitoring system, data monitoring method and related equipment

    CN115277627A

  • Dynamic cybersecurity detection of sequence anomalies

    US20200285737A1

  • Enhanced collaboration between user equpiment and network to facilitate machine learning

    WO2022235525A1

Cited By

  • IPv6 attack automatic forbidding method and system based on NAT64

    CN121077825A

  • Network risk dynamic ACL active protection method and system based on behavior analysis

    CN121262010A

  • Network risk dynamic acl active protection method and system based on behavior analysis

    CN121262010B