A threat detection method and device in a virtual detection environment
Through the three-layer structure of probes, distributed analysis and management control nodes in the virtual detection environment, it solves the problem of being unable to detect threats in east-west traffic in complex networks, realizes comprehensive threat detection and processing in the virtualized environment, and improves the network safety and processing efficiency.
Patent Information
- Application Number
- CN202410413593.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-08
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-04-08
AI Technical Summary
In a complex network structure, the traditional core switching mirroring method is unable to detect and handle lateral mobile network traffic threats. As a result, it can only detect threats from north-south traffic and cannot fully protect network security.
Through the three-layer structure of probe nodes, distributed analysis nodes, and management control nodes in the virtual detection environment, traffic is directed from the virtual switch for filtering, session reorganization, and elephant flow identification. After threats are identified, offline instructions are issued. Implement threat detection and processing of east-west traffic.
It effectively overcomes the shortcoming of traditional methods that cannot detect threats in east-west traffic, realizes comprehensive analysis and threat processing of east-west traffic in a virtualized environment, and improves network security and processing efficiency.
Smart Images

Figure CN118413352B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data security processing, and in particular to a threat detection method and device in a virtual detection environment. Background Art
[0002] In the traditional network threat detection field, since its detection target is the relevant network communication data of the physical host, it is generally sufficient to include the relevant host switch access port that needs to be detected into the observation port of the switch. However, considering the deployment cost, usually only the traffic of the core switch is mirrored to the network threat traffic monitoring device. However, if the organization's network structure is more complex and there are multi-layer deployments, only the core switch mirroring method is used. It is completely impossible to obtain the horizontal communication network traffic that does not pass through the core switch. This results in only being able to detect and process threats to north-south traffic, but not to detect and process threats to east-west network traffic, that is, horizontal movement. Summary of the invention
[0003] The present application provides a threat detection method and device in a virtual detection environment to solve the problems existing in the related art.
[0004] In a first aspect, the present invention provides a threat detection method in a virtual detection environment, comprising: drawing internal traffic of the virtual environment from a virtual switch to a probe node; after processing the traffic at the probe node according to preset rules, sending the processed data to a remote distributed analysis node, wherein the distributed analysis node identifies whether a threat exists; if a threat exists, a control command is issued to a corresponding probe node through a management control node, so that the corresponding probe node issues an offline instruction to the corresponding virtual switch.
[0005] Optionally, processing according to preset rules at the probe node includes: filtering the internal traffic of the virtual environment based on a preset filtering strategy at the probe node; encapsulating the filtered traffic after session reorganization; identifying elephant flows for the encapsulated session packets, and processing the session packets with identified elephant flows in different ways.
[0006] Optionally, performing session reorganization and encapsulation on the filtered traffic includes: performing session reorganization according to the network quintuple; and encapsulating according to the three-layer IP forwarding source address and destination address agreed upon by ERSPAN, wherein, if a tenant ID is configured, it is encapsulated in a reserved field of the ERSPAN II and III protocols, using three bytes of the reserved field.
[0007] Optionally, different processing methods are used to process the session packets of the identified elephant flow, including: if the preset discarding rules are met, the session packet is discarded; for the session packets that are not discarded, the east-west session traffic data similar to them is determined; and the similar east-west session traffic data is imported into the idle CPU core of the probe node.
[0008] Optionally, after processing in different processing modes, the session packet to be sent is further marked with a session identifier and a session sequence number, the identifier is put into the end of the session packet, and encapsulated using the ERSPAN protocol.
[0009] Optionally, the identifying whether a threat exists at the distributed analysis node includes: performing actions of identifying a tenant ID identifier and removing an ERSPAN protocol header for a processed session packet; reorganizing the protocol layers in order; and identifying threats based on the reorganized data.
[0010] In a second aspect, the present invention provides a threat detection device in a virtual detection environment, comprising a traffic detection unit, configured to lead the internal traffic of the virtual environment from the virtual switch to the probe node; a probe node processing unit, configured to send the processed data to a remote distributed analysis node after processing according to preset rules at the probe node, and a distributed analysis node processing unit, configured to identify whether there is a threat at the distributed analysis node; if there is a threat, a control command is sent to the corresponding probe node through the management control node, so that the corresponding probe node sends an offline instruction to the corresponding virtual switch.
[0011] Optionally, processing according to preset rules at the probe node includes: filtering the internal traffic of the virtual environment based on a preset filtering strategy at the probe node; encapsulating the filtered traffic after session reorganization; identifying elephant flows for the encapsulated session packets, and processing the session packets with identified elephant flows in different ways.
[0012] In a third aspect, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspects is implemented.
[0013] In a fourth aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the first aspect when executing the program.
[0014] The present invention discloses a threat detection method and device in a virtual detection environment, wherein the method includes leading the internal traffic of the virtual environment from the virtual switch to the probe node; after processing at the probe node according to preset rules, the processed data is sent to the remote distributed analysis node, wherein the distributed analysis node identifies whether there is a threat; if there is a threat, a control command is issued to the corresponding probe node through the management control node, so that the corresponding probe node issues an offline instruction to the corresponding virtual switch. By using a three-layer structure of probes, distributed analysis nodes, and centralized control nodes, the east-west traffic in the virtualized environment is mainly analyzed, overcoming the defect in the related art that the threat of the east-west network traffic cannot be detected and processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0016] Figure 1 This application provides a method for flattening a real-life three-dimensional model;
[0017] Figure 2 A method corresponding to the present application Figure 1 Schematic diagram of an electronic device. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0019] The following is combined with Figure 1 The method for flattening a real-life 3D model is described in an exemplary manner. The method comprises the following steps:
[0020] Step 101: Lead the internal traffic of the virtual environment from the virtual switch to the probe node.
[0021] In this embodiment, the virtual switch related ports are configured to lead the internal traffic of the virtual environment to the related probe node, which is generally also a virtual host, and can sniff the network traffic from the related port (virtual network card). The method of configuring the virtual switch related ports is not limited here, and a virtual switch, a distributed switch, or neutron in OpenStack can be used. The internal traffic of the virtual environment can include east-west network traffic and north-south traffic.
[0022] Step 102: After being processed according to preset rules at the probe node, the processed data is sent to a remote distributed analysis node, where it is identified at the distributed analysis node whether a threat exists.
[0023] In this embodiment, the probe node can use the ERSPAN II and III protocol reserved bits to set different tenant identifiers, and the distributed analysis nodes can analyze and isolate the relevant data of these tenants separately, thereby supporting the detection and disposal of network threats in complex environments.
[0024] Using a specific traffic balancing algorithm, the collected east-west traffic can be automatically and evenly distributed to different distributed analysis nodes, and can automatically identify elephant flows for intelligent processing or discarding. The probe node sends the sequentially reassembled data packets to the distributed analysis nodes, which can accelerate the reorganization efficiency of the distributed analysis nodes.
[0025] Step 103: If there is a threat, a control command is sent to the corresponding probe node through the management control node, so that the corresponding probe node sends an offline instruction to the corresponding virtual switch.
[0026] In this embodiment, a three-layer structure of probe nodes, distributed analysis nodes and centralized control nodes is used to analyze the east-west traffic in the virtualized environment: the probe nodes implement east-west network traffic collection, packet filtering, traffic balancing mechanism, ERSPAN protocol encapsulation capability and the ability to take specific virtual machines offline; the distributed analysis nodes have distributed threat analysis and storage capabilities; and the centralized control nodes can uniformly manage various policies, centrally visualize processing and take offline virtual machines that are determined to be threatening.
[0027] As an optional implementation method of this embodiment, processing according to preset rules at the probe node includes: filtering the internal traffic of the virtual environment based on a preset filtering strategy at the probe node; encapsulating the filtered traffic after session reorganization; identifying elephant flows for the encapsulated session packets, and processing the session packets with identified elephant flows in different ways.
[0028] In this optional implementation, the traffic to be filtered is configured at the probe node, and the filtering strategy adopts a BPF or eBPF compatible format, mainly including addresses and protocols below the transport layer; and it supports filtering of application layer protocols, but the filtering action for the application layer will be after the probe identifies the protocol, which will cause problems affecting processing performance.
[0029] As an optional implementation of this embodiment, the filtered traffic is encapsulated after session reorganization, including: session reorganization according to the network quintuple; encapsulation according to the three-layer IP forwarding source address and destination address agreed upon by ERSPAN, wherein, if a tenant ID is configured, it is encapsulated in a reserved field of the ERSPAN II and III protocols, using three bytes of the reserved field.
[0030] In this optional implementation, the filtered network traffic is reorganized for session reorganization, that is, the session is assembled according to the network quintuple (source destination address, source destination port, transport layer protocol), and encapsulated according to the three-layer IP forwarding source address and destination address agreed upon by ERSPAN. If the tenant ID is configured, it is encapsulated in the reserved field of the ERSPAN II and III protocols, using three bytes of the reserved field.
[0031] In order to fully process the relevant east-west traffic data, the probe node needs to be able to identify the elephant flow and perform certain processing.
[0032] As an optional implementation method of this embodiment, different processing methods are used to process the session packets of the identified elephant flow, including: if the preset discarding rules are met, the session packet is discarded; for the session packets that are not discarded, the east-west session traffic data similar to them is determined; and the similar east-west session traffic data is imported into the idle CPU core of the probe node.
[0033] In this optional implementation, for discarded situations: packet counting means are used to count and identify received session packets, and the discarded elephant flow is directly directed to the packet release part, so that this data is not processed. The statistical method is to comprehensively consider the unit time flow and session duration of a session, and discard it if it exceeds a certain threshold:
[0034] BPS>th1 and Duration>th2 and TotalBytes>th3
[0035] In the above formula, th1, th2, and th3 are three thresholds. If all of them are met, the data will be discarded. BPS is the transmission rate in bytes, Duration is the duration of the session in milliseconds, and TotalBytes is the cumulative number of bytes transmitted in this session.
[0036] For the situation where the data is not discarded: for the elephant flow that needs to be analyzed and cannot be discarded, one or more CPU cores are reserved in the probe node. After the elephant flow is identified, the subsequent elephant flow data is imported into the reserved CPU core to support the continued processing of related network data. Considering the universality of the framework and the implementation of the probe and the limitations of different virtualization environments, the processing of this patent is different from the general use of SDN to process the elephant flow, using the method of re-issuing the flow table or the NitroSketch method used by Intel DPDK (which depends on the hardware, and in order to ensure compatibility, the probe node uses the af-packet method to capture packets).
[0037] In the above-mentioned non-discarding processing method, the probe node will learn the metadata of the data packets that have been historically determined to be elephant flows (i.e., the network five-tuple and the application layer protocol) and part of the load content. Once there is east-west session traffic data with a similarity exceeding a certain threshold, it will be imported into the idle CPU core for processing as soon as possible, that is, it will be processed using the dynamic CPU affinity method to avoid packet loss.
[0038] As an optional implementation of this embodiment, after processing in different processing modes, the session packet to be sent is further marked with a session identifier and a session sequence number, the identifier is placed at the end of the session packet, and encapsulated using the ERSPAN protocol.
[0039] In this optional implementation, the probe node uses a hash function (Hash) on the five-tuple information after the session is reorganized according to the configuration. Before sending these data packets, the forwarded session data packet is identified by its session number and its sequence number in the session with an 8-byte integer data, where the first four bytes are the session identifier and the last four bytes are the sequence number of the data packet in the session. This identifier is placed at the end of each data packet and encapsulated using the ERSPAN protocol to transmit them to the remote distributed analysis node.
[0040] As an optional implementation method of this embodiment, identifying whether there is a threat at a distributed analysis node includes: performing actions of identifying the tenant ID identifier and removing the ERSPAN protocol header for the processed session packet; reorganizing the protocol layers in order; and identifying threats based on the reorganized data.
[0041] In this optional implementation, after the distributed analysis node receives the data of the relevant session, it does not need to reassemble it through the network quintuple, but directly reassembles it through the tail session of each data packet. Prior to this, it is necessary to identify the tenant ID identifier and remove the ERSPAN protocol header for these data packets. Subsequently, these sessions are reassembled in sequence at the protocol layer, and possible threats therein are identified.
[0042] For virtual machines identified as posing threats, the management control node directly sends the location information of the data delivered by the probe to the relevant probe node. The probe then sends the virtual machine offline instruction to the relevant virtual switch based on its location (that is, executes the offline command, which can be done through the API or command line).
[0043] This embodiment can filter the relevant east-west traffic more flexibly, so as to analyze the traffic more selectively. For example, backup traffic, video traffic, etc. can be filtered directly at the bottom layer, effectively improving the overall processing efficiency; using a layered structure, different traffic can be effectively distributed and processed using software methods (not hardware), thereby greatly improving the overall throughput efficiency and elasticity of the system; for possible multi-tenant situations, possible overlapping network IPs can be processed in the collection part of virtualized traffic by using the reserved bits of the protocol, thereby being able to cope with complex virtual environments.
[0044] This embodiment overcomes the problem in the related art that general network vendors provide the so-called ERSPAN (Encapsulated Remote Switch Port Analyzer) method, which can encapsulate the network communication traffic of each network port and send it to the remote switch through a tunnel, thereby solving the problem of threat detection for east-west traffic. However, it is not applicable to east-west threat detection in a virtual environment or cloud environment to a certain extent. Although VMWare can partially solve this problem by using NSX or configuring a distributed virtual switch (VDS), there are still several problems. These problems are manifested in the following aspects:
[0045] It is not possible to flexibly process or filter the required network traffic. In particular, when detecting east-west network traffic, it is necessary to discard network traffic that occupies too much bandwidth and is basically useless, such as some video traffic or known file backup communications, or remove unnecessary protocol packets, such as some broadcast packets or multicast packets.
[0046] It cannot process network packets flexibly, such as retaining only some of the initial bytes of the packet or retaining only a few initial packets of each network session without all of them, only for threat detection. In a virtual environment or cloud environment, for situations where there are multiple tenants, such as multiple tenants with overlapping IP address segments that cannot be distinguished, and VxLAN cannot be used to encapsulate the original packet (not supported by the user deployment environment), but there is a need to distinguish these different tenants. Distributed detection is required for east-west traffic. In the case of large traffic, a hierarchical architecture is used to balance the computing power of threat detection, but the consistency of network sessions needs to be guaranteed (that is, different packets of the same session cannot be distributed to different nodes for analysis, otherwise it will lead to erroneous results or missed results). It can run in a virtual environment that lacks centralized management, such as multiple VMWARE ESXi without VCenter unified management, that is, it is impossible to configure the remote port of the distributed virtual switch for sniffing traffic, or there is no virtual computing management platform such as OpenStack, etc. It is necessary to conveniently manage and control the virtual machines with problems, at least to provide offline operations at the virtual machine level.
[0047] The present application also provides an embodiment of a threat detection device in a virtual detection environment, including a traffic detection unit, configured to lead the internal traffic of the virtual environment from the virtual switch to the probe node; a probe node processing unit, configured to send the processed data to a remote distributed analysis node after processing according to preset rules at the probe node, and a distributed analysis node processing unit, configured to identify whether there is a threat at the distributed analysis node; if there is a threat, a control command is sent to the corresponding probe node through the management control node, so that the corresponding probe node sends an offline instruction to the corresponding virtual switch.
[0048] As an optional implementation method of this embodiment, processing according to preset rules at the probe node includes: filtering the internal traffic of the virtual environment based on a preset filtering strategy at the probe node; encapsulating the filtered traffic after session reorganization; identifying elephant flows for the encapsulated session packets, and processing the session packets with identified elephant flows in different ways.
[0049] As an optional implementation of this embodiment, the filtered traffic is encapsulated after session reorganization, including: session reorganization according to the network quintuple; encapsulation according to the three-layer IP forwarding source address and destination address agreed upon by ERSPAN, wherein, if a tenant ID is configured, it is encapsulated in a reserved field of the ERSPAN II and III protocols, using three bytes of the reserved field.
[0050] As an optional implementation method of this embodiment, different processing methods are used to process the session packets of the identified elephant flow, including: if the preset discarding rules are met, the session packet is discarded; for the session packets that are not discarded, the east-west session traffic data similar to them is determined; and the similar east-west session traffic data is imported into the idle CPU core of the probe node.
[0051] As an optional implementation of this embodiment, after processing in different processing modes, the session packet to be sent is further marked with a session identifier and a session sequence number, the identifier is placed at the end of the session packet, and encapsulated using the ERSPAN protocol.
[0052] As an optional implementation method of the present embodiment, the identification of whether a threat exists at a distributed analysis node includes: performing actions of identifying a tenant ID identifier and removing an ERSPAN protocol header for a processed session packet; reorganizing the protocol layers in sequence; and identifying threats based on the reorganized data.
[0053] Figure 2 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as Figure 2 As shown, the electronic device 50 includes: a processor 501 (processor), a memory 502 (memory) and a bus 503; wherein the processor 501 and the memory 502 communicate with each other through the bus 503; the processor 501 is used to call the program instructions in the memory 502 to execute the methods provided by the above-mentioned method embodiments.
[0054] This embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the methods provided by the above method embodiments.
[0055] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment 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 embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various storage media that can store program codes.
[0056] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0057] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0058] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. A threat detection method in a virtual detection environment, characterized in that: include: Lead the internal traffic of the virtual environment from the virtual switch to the probe node; After processing at the probe node according to preset rules, the processed data is sent to a remote distributed analysis node, wherein the distributed analysis node identifies whether a threat exists; If there is a threat, a control command is sent to the corresponding probe node through the management control node, so that the corresponding probe node sends an offline instruction to the corresponding virtual switch; Processing at the probe node according to a preset rule includes: Filtering the internal traffic of the virtual environment based on a preset filtering strategy at the probe node; Reassemble the filtered traffic and encapsulate it; The encapsulated session packets are subjected to elephant flow identification, and the session packets with elephant flow identified are processed in different ways; Different processing methods are used to process the session packets of the identified elephant flow, including: If the preset discarding rule is met, discarding the session packet; For the session packets that are not discarded, determine the east-west session traffic data similar to the session packets; Import similar east-west session traffic data to the idle CPU cores of the probe node.
2. The threat detection method in a virtual detection environment according to claim 1, characterized in that: The filtered traffic is reassembled and encapsulated after the session, including: Reorganize the session according to the network quintuple; The source and destination addresses of the three-layer IP forwarding protocol are encapsulated according to the ERSPAN protocol. If a tenant ID is configured, it is encapsulated in the reserved field of the ERSPAN II and III protocols, using three bytes of the reserved field.
3. The threat detection method in a virtual detection environment according to claim 1, characterized in that: After being processed in different ways, the session packet to be sent is also marked with a session identifier and a session sequence number, the identifier is put into the end of the session packet, and encapsulated with the ERSPAN protocol.
4. The threat detection method in a virtual detection environment according to claim 2, characterized in that: The identifying whether there is a threat at the distributed analysis node includes: For the processed session packets, identify the tenant ID and remove the ERSPAN protocol header; reorganize the protocol layers in order; Threat identification is performed based on the reorganized data.
5. A threat detection device in a virtual detection environment, characterized in that: include: The traffic detection unit is configured to lead the internal traffic of the virtual environment from the virtual switch to the probe node; The probe node processing unit is configured to process the data at the probe node according to a preset rule and then send the processed data to a remote distributed analysis node. A distributed analysis node processing unit configured to identify whether a threat exists at the distributed analysis node; If there is a threat, a control command is sent to the corresponding probe node through the management control node, so that the corresponding probe node sends an offline instruction to the corresponding virtual switch; Processing at the probe node according to a preset rule includes: Filtering the internal traffic of the virtual environment based on a preset filtering strategy at the probe node; Reassemble the filtered traffic and encapsulate it; The encapsulated session packets are subjected to elephant flow identification, and the session packets with elephant flow identified are processed in different ways; Different processing methods are used to process the session packets of the identified elephant flow, including: If the preset discarding rule is met, discarding the session packet; For the session packets that are not discarded, determine the east-west session traffic data similar to the session packets; Import similar east-west session traffic data to the idle CPU cores of the probe node.
6. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 4 is implemented.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Virtual machine mirror image flow transmission control method and virtual machine mirror image flow transmission control device
CN105743734A
Method, device and equipment for monitoring cloud security and computer storage medium
CN109962891A
Intranet host and in-cloud drainage method and device
CN112019554A
Threat detection method and device based on threat intelligence
CN116346442A
Traffic mirroring method and device
CN117596252A
