Network threat detection method and device, electronic equipment and storage medium

By real-time packet capture and data reorganization of network equipment in industrial control systems, combined with DPI analysis and dynamic rule matching, the problem of insufficient detection capabilities of traditional detection methods in industrial control systems is solved, and a high accuracy and fast response network is achieved Threat detection.

CN118921201APending Publication Date: 2024-11-08BEIJING CHANGYANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410976065.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Traditional cyber threat detection methods have low detection capabilities in industrial control systems and are difficult to deal with complex and hidden cyber threats.

Method used

By catching packets in real-time on the mirrored ports of network devices, reorganizing the bags of pcap file streams and parsing DPIs, and matching threat alarms with dynamic loading rules databases to ensure detection accuracy and response speed.

Benefits of technology

Real-time detection of network threats is realized, detection accuracy and response speed is improved, detection capabilities for hidden attack behaviors are enhanced, and the problem of leaking rules and untimely detection is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921201A_ABST
    Figure CN118921201A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of network threat detection, in particular to a network threat detection method and device, electronic equipment and a storage medium. The method comprises the following steps: performing real-time packet capture on mirror image traffic of a mirror image port of network equipment to obtain a pcap file stream; on the basis of a preset strategy, carrying out satchel reorganization on a pcap packet in the pcap file stream to obtain reorganized data; detecting an application protocol of the recombined data, and performing DPI analysis on the recombined data based on the detected protocol; and dynamically loading the rules in the rule base into a memory, and performing rule matching on the data subjected to DPI analysis so as to determine threat alarm data based on a matching result. According to the application, threats in the network can be detected in real time, the detection accuracy is high, and the response speed is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network threat detection, and in particular to a network threat detection method, device, electronic equipment and storage medium. Background Art

[0002] In the current ever-expanding network landscape, the Industrial Internet, as the core support of the country's critical infrastructure, is becoming increasingly important. With the rapid development of this field, the field of network security is facing unprecedented challenges, including various complex and changing threats, such as virus intrusion, Trojan implantation, denial of service attacks (DoS / DDoS) and elusive advanced persistent threats (APT). Traditional security lines of defense, such as firewalls and anti-virus software, are gradually becoming incapable of fully defending against these new and secretive attack strategies. Intelligent and highly adaptable intrusion detection is urgently needed to strengthen or replace existing measures.

[0003] When performing network threat detection, related technologies usually capture and parse data packets directly on the network interface. However, due to the complex network architecture of industrial control systems and communication constraints, the above-mentioned method of directly monitoring the network interface will lead to problems such as low detection capabilities.

[0004] Therefore, there is an urgent need for a network threat detection method, device, electronic device and storage medium to solve the above technical problems. Summary of the invention

[0005] The embodiments of the present invention provide a network threat detection method, device, electronic device and storage medium, which can detect threats in the network in real time with high detection accuracy and fast response speed.

[0006] In a first aspect, an embodiment of the present invention provides a network threat detection method, comprising:

[0007] Capture the mirror traffic of the mirror port of the network device in real time to obtain the pcap file stream;

[0008] Based on a preset strategy, the pcap packets in the pcap file stream are reassembled to obtain reassembled data;

[0009] Detect the application protocol of the reassembled data, and perform DPI analysis on the reassembled data based on the detected protocol;

[0010] The rules in the rule base are dynamically loaded into the memory, and the rule matching is performed on the data after DPI parsing to determine the threat alarm data based on the matching results.

[0011] In a second aspect, an embodiment of the present invention further provides a network threat detection device, including:

[0012] The packet capture unit is used to capture the mirror traffic of the mirror port of the network device in real time to obtain a pcap file stream;

[0013] A reassembly unit, used for reassembling the pcap packets in the pcap file stream based on a preset strategy to obtain reassembled data;

[0014] A parsing unit, used to detect an application protocol of the reassembled data, and perform DPI parsing on the reassembled data based on the detected protocol;

[0015] The matching unit is used to dynamically load the rules in the rule base into the memory and perform rule matching on the data parsed by the DPI to determine the threat alarm data based on the matching results.

[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.

[0018] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the above-mentioned network threat detection method when executed by a processor.

[0019] The embodiment of the present invention provides a network threat detection method. First, when performing network threat detection, not only the current Pcap package is reorganized, but multiple Pcap packages are reorganized, thereby ensuring that the context of network activities is understood as a whole and improving the detection capability of covert attack behaviors. Secondly, by dynamically loading the rules in the rule base into the memory, the rules can be kept confidential and dynamically upgraded, thereby preventing problems such as rule leakage and untimely detection. It can be seen that the present application can detect threats in the network in real time, with high detection accuracy and fast response speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 is a flow chart of a network threat detection method provided by an embodiment of the present invention;

[0022] Figure 2 is a hardware architecture diagram of an electronic device provided by an embodiment of the present invention;

[0023] Figure 3 It is a structural diagram of a network threat detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0025] Please refer to Figure 1 , an embodiment of the present invention provides a network threat detection method, comprising:

[0026] Step 100, real-time packet capture of the mirrored traffic of the mirrored port of the network device to obtain a pcap file stream;

[0027] Step 102, based on a preset strategy, reorganize the pcap packets in the pcap file stream to obtain reorganized data;

[0028] Step 104, detecting the application protocol of the reorganized data, and performing DPI analysis on the reorganized data based on the detected protocol;

[0029] Step 106, dynamically load the rules in the rule base into the memory, and perform rule matching on the data after DPI parsing to determine threat warning data based on the matching results.

[0030] In this embodiment, firstly, when performing network threat detection, not only the current Pcap package is reorganized, but multiple Pcap packages are reorganized, thereby ensuring the overall understanding of the context of network activities and improving the ability to detect covert attack behaviors. Secondly, by dynamically loading the rules in the rule base into the memory, the rules can be kept confidential and dynamically upgraded, thereby preventing problems such as rule leakage and untimely detection. It can be seen that the present application can detect threats in the network in real time, with high detection accuracy and fast response speed.

[0031] Described below Figure 1 How the various steps are performed.

[0032] First, with respect to step 100, the mirrored traffic of the mirrored port of the network device is captured in real time to obtain a pcap file stream.

[0033] In this step, port mirroring technology can copy the data traffic of one or more source ports to another port (called a mirror port) for network monitoring and troubleshooting. Port mirroring can help network administrators understand the traffic situation on the network, find problems and take corresponding measures. Through the pcap file stream, network traffic can be monitored and analyzed to find potential security threats and abnormal behavior problems. This process starts from capturing network data packets until the processed data is used for security business analysis.

[0034] In some embodiments, step 100 includes:

[0035] Capture packets in real time on the mirror port on the network device, use Tshark to monitor the mirror traffic and save the received data packets as pcap files, and send the shared pcap file location to the Kafka stream processing platform in real time;

[0036] Send the formed pcap file to the specified location for storage;

[0037] The absolute path of each pcap file is pushed as an ordered message to the message queue of the Kafka stream processing platform to obtain the pcap file stream.

[0038] In this step, mirroring traffic ensures that all network activities are captured, not just traffic directly connected to the host. Mirroring traffic allows the network to be monitored without affecting the existing industrial network environment. The storage location of the Pcap file can be a local disk, a remote server, or a cloud storage service, depending on the specific deployment environment, which is not specifically limited in this application.

[0039] In addition, as a distributed stream processing platform, Kafka stream processing platform can be used to build real-time data pipelines and stream applications, enabling back-end systems to share real-time data with each other through Kafka topics. Through standard Kafka settings, any user or application can write any message to any topic and read data from any topic. Kafka stream processing platform can provide a reliable message delivery mechanism for the detection system to ensure that these file path information can be processed correctly even under high load.

[0040] With respect to step 102, based on a preset strategy, the pcap packets in the pcap file stream are reassembled to obtain reassembled data.

[0041] In some implementations, the specific implementation process of step 102 is:

[0042] For each pcap packet traversed, execute:

[0043] S1, determine whether the pcap package exists. If so, parse the pcap package to obtain the parsed pcap data and execute S2; if not, traverse the next pcap package and re-execute S1;

[0044] S2, perform a pseudo-empty data packet check on the parsed pcap data. If the check result shows that the pcap packet is not a pseudo-empty data packet, execute S3;

[0045] S3, for the parsed and verified data, take the five-tuple hash value as the primary key of the data, and assign an expiration time to the data; if the data reaches the expiration time, delete the data; if the expiration time has not been reached, store the data in the current flow table, and determine whether the five-tuple hash value of the data is the same as the five-tuple hash value of other data in the current flow table; if they are the same, execute S4;

[0046] S4, determine whether the session flow corresponding to the data has ended. If so, reassemble the data and other data with the same five-tuple hash value to obtain the reassembled data; if not, do not reassemble, traverse the next pcap package, and return to execute S1 until the session flow ends to obtain the reassembled data.

[0047] With respect to step S1, due to storage space limitations or network fluctuations during storage, the pcap package may not be saved, so it is necessary to check whether the pcap package exists. Only the existing pcap package will be parsed for data.

[0048] For step S2, the parsed pcap data is subjected to pseudo-empty data packet verification, including: verification and verification of encryption algorithm, data length, specific fields, encapsulation format and data completeness. Through pseudo-empty data packet verification, information filtering can be performed for subsequent detection.

[0049] For step S3 and step S4, first, the expiration time is not less than the duration of the session flow to ensure that the reassembled data can cover the complete data flow. Secondly, when the data reaches the expiration time, the data is deleted to reduce memory usage. Finally, the operation will not be destroyed after the pcap package is parsed, so the effect of cross-packet reassembly can be achieved, providing more accurate data for subsequent parsing and matching.

[0050] With respect to step 104, the application protocol of the reorganized data is detected, and DPI analysis is performed on the reorganized data based on the detected protocol.

[0051] In this embodiment, there are many types of application protocols, such as http protocol, ftp protocol, smtp protocol, etc. The data adopts different protocols and different parsing methods. For example, when the data adopts http protocol, http parsing is performed to ensure the accuracy of the parsing.

[0052] Finally, for step 106, the rules in the rule base are dynamically loaded into the memory, and the rule matching is performed on the data after DPI parsing to determine the threat alarm data based on the matching results.

[0053] In this step, the matching results include matching and mismatching. If it does not match, it means there is no threat. If it matches, it means there is a threat and a real-time alarm needs to be triggered immediately. Threat alarm data can be pushed to security personnel through mini-programs, websockets, SMS and other methods for timely attention to prevent further network loss.

[0054] In addition, in some implementations, dynamically loading the rules in the rule base into the memory includes:

[0055] A1, decode the encrypted data in the rule base;

[0056] A2, updating the incremental rules in the decoded rule base to obtain an updated rule base;

[0057] A3, updating the encryption rules of the updated rule base;

[0058] A4, loads the updated encryption rules into the memory.

[0059] A5, based on preset requirements, loads the required encryption rules into the system.

[0060] With respect to step A1, decoding is the first step in the encryption process, and the encrypted file or data is decoded to facilitate subsequent rule detection and processing.

[0061] Regarding step A2, in a dynamic encryption system, incremental rules refer to updating only the changed parts instead of reloading the entire rule set, which can improve efficiency and reduce resource consumption.

[0062] With respect to step A3, dynamic update means that the system can update encryption rules in real time as needed to adapt to changing security requirements and threat environments.

[0063] For step A4, the encryption rules can be loaded into the memory for quick access and application. The rules in the memory can quickly respond to changes in security policies.

[0064] With respect to step A5, the required encryption rules are dynamically loaded into the system based on preset requirements, which usually involves selecting appropriate rules from a rule library and then applying them to the memory for rule detection.

[0065] In the existing detection engine, the rules are stored in files, the rules are displayed in plain text, and the rule upgrade can only be actively pulled from the rule base in the external network or the central network for upgrade. It is impossible to keep the rules confidential and dynamically upgrade them, which will cause problems such as rule leakage and untimely detection. The dynamic loading method of this embodiment can keep the rules confidential and dynamically upgrade them, thereby avoiding rule leakage and improving detection efficiency.

[0066] In some embodiments, the method of the present application further comprises:

[0067] Extract characteristic values ​​of threat warning data;

[0068] Based on intelligence matching, vulnerability matching and attck matching, the extracted feature values ​​are deeply analyzed and windowed to obtain an alarm portrait.

[0069] In this embodiment, by performing in-depth analysis on the threat alert data, extracting the vital sign values ​​of the alert data, performing window operations after a series of in-depth analyses such as intelligence matching, vulnerability matching, and attck matching, and profiling the alert set, security personnel can conduct visual analysis and attention, providing support for security decisions.

[0070] like Figure 2 , Figure 3 As shown, an embodiment of the present invention provides a network threat detection device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 2 As shown, it is a hardware architecture diagram of an electronic device where a network threat detection device provided by an embodiment of the present invention is located, except Figure 2 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 3 As shown, as a device in a logical sense, the CPU of the electronic device in which it is located reads the corresponding computer program in the non-volatile memory into the memory and runs it. A network threat detection device provided in this embodiment includes:

[0071] The packet capture unit 300 is used to capture the mirror traffic of the mirror port of the network device in real time to obtain a pcap file stream;

[0072] The reassembly unit 302 is used to reassemble the pcap packets in the pcap file stream based on a preset strategy to obtain reassembled data;

[0073] The parsing unit 304 is used to detect the application protocol of the reorganized data and perform DPI parsing on the reorganized data based on the detected protocol;

[0074] The matching unit 306 is used to dynamically load the rules in the rule base into the memory, and perform rule matching on the data after DPI parsing to determine the threat warning data based on the matching results.

[0075] In some implementations, the packet capture unit 300 is configured to perform the following operations:

[0076] Capture packets in real time on the mirror port on the network device, use Tshark to monitor the mirror traffic and save the received data packets as pcap files, and send the shared pcap file location to the Kafka stream processing platform in real time;

[0077] Send the formed pcap file to the specified location for storage;

[0078] The absolute path of each pcap file is pushed as an ordered message to the message queue of the Kafka stream processing platform to obtain the pcap file stream.

[0079] In some embodiments, the recombination unit 302 is configured to perform the following operations:

[0080] For each pcap packet traversed, execute:

[0081] S1, determine whether the pcap package exists. If so, parse the pcap package to obtain the parsed pcap data and execute S2; if not, traverse the next pcap package and re-execute S1;

[0082] S2, perform a pseudo-empty data packet check on the parsed pcap data. If the check result shows that the pcap packet is not a pseudo-empty data packet, execute S3;

[0083] S3, for the parsed and verified data, take the five-tuple hash value as the primary key of the data, and assign an expiration time to the data; if the data reaches the expiration time, delete the data; if the expiration time has not been reached, store the data in the current flow table, and determine whether the five-tuple hash value of the data is the same as the five-tuple hash value of other data in the current flow table; if they are the same, execute S4;

[0084] S4, determine whether the session flow corresponding to the data has ended. If so, reassemble the data and other data with the same five-tuple hash value to obtain the reassembled data; if not, do not reassemble, traverse the next pcap package, and return to execute S1 until the session flow ends to obtain the reassembled data.

[0085] In some implementations, the expiration time is no less than the duration of the session flow.

[0086] In some implementations, the parsed pcap data is subjected to a pseudo-empty data packet check, including: checking and verifying the encryption algorithm, data length, specific fields, encapsulation format, and data completeness.

[0087] In some implementations, dynamically loading rules in a rule base into memory includes:

[0088] Decode the encrypted data in the rule base;

[0089] Updating the incremental rules in the decoded rule base to obtain an updated rule base;

[0090] updating the encryption rules of the updated rule base;

[0091] Loading the updated encryption rules into memory;

[0092] The required encryption rules are loaded into the system based on preset requirements.

[0093] In some embodiments, it further comprises:

[0094] Extract characteristic values ​​of threat warning data;

[0095] Based on intelligence matching, vulnerability matching and attck matching, the extracted feature values ​​are deeply analyzed and windowed to obtain an alarm portrait.

[0096] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on a network threat detection device. In other embodiments of the present invention, a network threat detection device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0097] The information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For the specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.

[0098] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, a network threat detection method in any embodiment of the present invention is implemented.

[0099] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes a network threat detection method in any embodiment of the present invention.

[0100] An embodiment of the present application further provides a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program, so that the computer device executes any one of the network threat detection methods in the above embodiments.

[0101] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0102] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0103] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0104] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0105] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0106] It should be noted that, in this article, relational terms such as first and second 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. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical factors in the process, method, article or device including the elements.

[0107] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A network threat detection method, characterized in that: include: Capture the mirror traffic of the mirror port of the network device in real time to obtain the pcap file stream; Based on a preset strategy, the pcap packets in the pcap file stream are reassembled to obtain reassembled data; Detect the application protocol of the reassembled data, and perform DPI analysis on the reassembled data based on the detected protocol; The rules in the rule base are dynamically loaded into the memory, and the rule matching is performed on the data after DPI parsing to determine the threat alarm data based on the matching results.

2. The method according to claim 1, characterized in that The process of capturing the mirrored traffic of the mirrored port of the network device in real time to obtain a pcap file stream includes: Capture packets in real time on the mirror port on the network device, use Tshark to monitor the mirror traffic and save the received data packets as pcap files, and send the shared pcap file location to the Kafka stream processing platform in real time; Send the formed pcap file to the specified location for storage; The absolute path of each pcap file is pushed as an ordered message to the message queue of the Kafka stream processing platform to obtain the pcap file stream.

3. The method according to claim 1, characterized in that Based on the preset strategy, the pcap packets in the pcap file stream are reassembled to obtain reassembled data, including: For each pcap packet traversed, execute: S1, determine whether the pcap package exists. If so, parse the pcap package to obtain the parsed pcap data and execute S2; if not, traverse the next pcap package and re-execute S1; S2, perform a pseudo-empty data packet check on the parsed pcap data. If the check result shows that the pcap packet is not a pseudo-empty data packet, execute S3; S3, for the parsed and verified data, take the five-tuple hash value as the primary key of the data, and assign an expiration time to the data; if the data reaches the expiration time, delete the data; if the expiration time has not been reached, store the data in the current flow table, and determine whether the five-tuple hash value of the data is the same as the five-tuple hash value of other data in the current flow table; if they are the same, execute S4; S4, determine whether the session flow corresponding to the data has ended. If so, reassemble the data and other data with the same five-tuple hash value to obtain the reassembled data; if not, do not reassemble, traverse the next pcap package, and return to execute S1 until the session flow ends to obtain the reassembled data.

4. The method according to claim 3, characterized in that The expiration time is not less than the duration of the session flow.

5. The method according to claim 3, characterized in that: The pseudo-empty data packet verification is performed on the parsed pcap data, including: verifying and checking the encryption algorithm, data length, specific fields, encapsulation format and data completeness.

6. The method according to claim 1, characterized in that The dynamically loading the rules in the rule base into the memory includes: Decode the encrypted data in the rule base; Updating the incremental rules in the decoded rule base to obtain an updated rule base; updating the encryption rules of the updated rule base; Loading the updated encryption rules into memory; The required encryption rules are loaded into the system based on preset requirements.

7. The method according to claim 1, characterized in that Also includes: Extracting characteristic values ​​of the threat warning data; Based on intelligence matching, vulnerability matching and attck matching, the extracted feature values ​​are deeply analyzed and windowed to obtain an alarm portrait.

8. A network threat detection device, characterized in that: include: The packet capture unit is used to capture the mirror traffic of the mirror port of the network device in real time to obtain a pcap file stream; A reassembly unit, used for reassembling the pcap packets in the pcap file stream based on a preset strategy to obtain reassembled data; A parsing unit, used to detect an application protocol of the reassembled data, and perform DPI parsing on the reassembled data based on the detected protocol; The matching unit is used to dynamically load the rules in the rule base into the memory and perform rule matching on the data parsed by the DPI to determine the threat alarm data based on the matching results.

9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.