Security protection method and device, virtual machine, electronic equipment and storage medium
The five-tuple information of traffic is obtained and filtered through the virtual machine's eBPF program, which solves the problems of inaccurate and poor compatibility of micro isolation policies in the existing technology, and realizes accurate traffic monitoring and policy execution in the virtualized network environment, ensuring high efficiency safety protection.
Patent Information
- Application Number
- CN202310552068.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-05-16
AI Technical Summary
Existing security protection methods cannot produce accurate micro-isolation strategies and have poor compatibility, especially in the virtualized network environment of telecom operators, where traffic monitoring and policy execution between virtual machines are flawed.
The virtual machine's extended Berkeley packet filter (eBPF) program obtains traffic five-tuple information and filters according to preconfigured or generated security policies to identify abnormal traffic, realize micro-isolation mechanism, and ensure policy accuracy and compatibility .
It realizes accurate micro isolation strategy generation and execution in a virtualized network environment, has a full monitoring range and good compatibility, avoiding performance impacts between virtual machines and compatibility issues of third-party proxy software.
Smart Images

Figure CN119011158A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and in particular to a security protection method, device, virtual machine, electronic device and storage medium. Background Art
[0002] Micro-segmentation, as a typical technology for fine-grained control of east-west traffic, was first proposed by Gartner in its software-defined data center (SDDC) related technology system. It is used to provide secure access control between hosts (virtual machines, containers) (different from the past secure access control between security domains) and visualize the east-west traffic. At present, micro-segmentation technology has been regarded as one of the three key technologies of zero trust along with software-defined perimeter (SDP) and identity and access management (IAM). The micro-segmentation solutions proposed by the industry will include micro-segmentation management functions, traffic collection functions, policy execution functions, etc., so as to analyze and generate traffic views and security policies based on traffic, and issue security policies for traffic security monitoring, thereby realizing the traffic visualization and fine-grained traffic management capabilities of micro-segmentation.
[0003] There are some commercial products in the above solutions, but most of these solutions are applied to public cloud scenarios. For telecom operators' telecom networks (i.e., telecom networks built using network function virtualization (NFV) / software defined network (SDN), cloudification, and virtualization technologies, the traditional physical hardware core network is deployed in virtual machines or virtual machine containers to improve deployment and operation and maintenance efficiency and reduce costs), the Guest OS of the virtual machine that deploys the core network element function (NF) has the characteristics of manufacturer privatization, and the Host OS is bound to the virtual layer and also has the characteristics of manufacturer privatization. There is a problem of poor compatibility when installing third-party micro-isolation agent software. In addition, the functions of the virtualized network function (VNF) are carried on multiple virtual machines (VMs), which are connected through the manufacturer's private network. Only the management virtual machine and the external business virtual machine have external access interfaces, so the VM that is not exposed to the outside cannot install a third-party agent, resulting in incomplete agent collection of traffic, and the inability to accurately generate traffic views and micro-isolation policies. The virtual switch method has a great impact on the performance of the virtual layer; based on Hypervisor control, there are compatibility issues between the micro-isolation vendor plug-in and the virtual layer; the traffic diversion mechanism will put pressure on the SDN controller, switch and bandwidth. Summary of the invention
[0004] The purpose of the present invention is to provide a security protection method, device, virtual machine, electronic device and storage medium to solve the problem that the existing security protection method cannot generate accurate micro-isolation strategies and has poor compatibility.
[0005] In a first aspect, the present invention provides a security protection method, which is applied to a virtual machine, and the method comprises:
[0006] Acquire the traffic quintuple information of the virtual machine through the extended Berkeley packet filter eBPF program of the virtual machine;
[0007] By means of the eBPF program, the acquired traffic quintuple information of the virtual machine is filtered according to the security policy to identify abnormal traffic;
[0008] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0009] Optionally, the acquiring the traffic quintuple information of the virtual machine through an extended Berkeley packet filter eBPF program of the virtual machine includes:
[0010] Obtaining traffic quintuple information of the virtual machine through the eBPF program;
[0011] Sending the traffic quintuple information to the storage and data retrieval module of the virtual machine through the eBPF program;
[0012] The flow quintuple information of the virtual machine is obtained from the storage and data retrieval module through the proxy module.
[0013] Optionally, when the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, the method further includes:
[0014] Sending first information to the second device through the proxy module, where the first information includes an identity of the first virtual network function VNF, an identity of the virtual machine, and the traffic quintuple information;
[0015] Among them, the first VNF includes the virtual machine; the first VNF is a VNF connected to the first device.
[0016] Optionally, before obtaining the traffic quintuple information of the virtual machine through the extended Berkeley packet filter eBPF program of the virtual machine, the method further includes:
[0017] Storing the security policy in a storage and data retrieval module of the virtual machine through the proxy module;
[0018] The security policy is obtained from the storage and data retrieval module through the eBPF program.
[0019] Optionally, the method further comprises:
[0020] When abnormal traffic is identified, generating an abnormal traffic log according to the abnormal traffic;
[0021] The traffic quintuple information of the abnormal traffic and the abnormal traffic log are stored in the storage and data retrieval module of the virtual machine through the eBPF program;
[0022] Preprocessing the traffic quintuple information of the abnormal traffic and the abnormal traffic log by the proxy module to obtain the processed traffic quintuple information of the abnormal traffic and the processed abnormal traffic log;
[0023] Sending second information to the second device through the proxy module, the second information including the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the VNF includes the virtual machine; the first VNF is a VNF connected to the first device;
[0024] Receiving an updated security policy sent by the first device through the proxy module; the updated security policy is generated by the first device according to the traffic quintuple information of the abnormal traffic in the second information sent by the second device and the processed abnormal traffic log, or the updated security policy is pre-configured by the first device;
[0025] Sending the updated security policy to the eBPF program via the storage and data retrieval module;
[0026] The eBPF program is used to filter the acquired traffic quintuple information of the virtual machine according to the updated security policy.
[0027] In a second aspect, an embodiment of the present invention further provides a security protection method, which is applied to a first device, and the method includes:
[0028] sending a security policy to a second device;
[0029] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device, the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0030] Optionally, sending the security policy to the second device includes:
[0031] Sending third information to the second device, the third information including the security policy, the identity of the first virtual network function VNF and the identity of the virtual machine;
[0032] Among them, the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0033] Optionally, when the security policy is generated by the first device according to traffic quintuple information of the virtual machine, the method further includes:
[0034] Receive first information sent by the second device, where the first information includes an identity of the first VNF, an identity of the virtual machine, and traffic quintuple information of the virtual machine;
[0035] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0036] Optionally, the method further comprises:
[0037] Learning according to the first information obtains network topology information, wherein the network topology information includes: a first VNF, an identity of the first VNF, a virtual machine in the first VNF, an identity of each of the virtual machines, a connection relationship between the first VNFs, and a connection relationship between the virtual machines;
[0038] Among them, the first VNF is a VNF connected to the first device.
[0039] Optionally, the method further comprises:
[0040] Receive the filtered traffic quintuple information sent by the second device; the filtered traffic quintuple information is sent by the virtual machine to the second device through the proxy module, and the filtered traffic quintuple information is obtained by filtering the acquired traffic quintuple information of the virtual machine according to the security policy through the extended Berkeley packet filter eBPF program of the virtual machine;
[0041] Learning the filtered traffic quintuple information to obtain a learning result;
[0042] When the learning result indicates that the filtered traffic quintuple information complies with the network topology information and the security policy, it is determined to continue receiving the filtered traffic quintuple information sent by the second device.
[0043] Optionally, the method further comprises:
[0044] When the virtual machine filters the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program and identifies abnormal traffic, the second information sent by the second device is received; the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the first VNF includes the virtual machine; the first VNF is the VNF connected to the first device; the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log are obtained by the virtual machine through the proxy module to pre-process the traffic quintuple information and the abnormal traffic log of the abnormal traffic; the abnormal traffic log is generated by the virtual machine according to the abnormal traffic through the eBPF program;
[0045] Generate an updated security policy based on the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log, or generate alarm information based on the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log;
[0046] When an updated security policy is generated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log, the updated security policy is sent to the second device.
[0047] Optionally, generating an updated security policy according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log includes:
[0048] In the case where there is a second VNF, and the second VNF includes a virtual machine, generating the updated security policy according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log; the second VNF is a VNF connected to the first device after the first VNF;
[0049] The network topology information is updated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log.
[0050] Optionally, the generating alarm information according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log includes:
[0051] In the absence of the second VNF or in the case where the traffic generated by the VM in the second VNF is different from the abnormal traffic, generating the alarm information according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log;
[0052] Among them, the second VNF is a VNF connected to the first device after the first VNF.
[0053] In a third aspect, an embodiment of the present invention further provides a security protection method, which is applied to a second device, and the method includes:
[0054] Receive a security policy sent by a first device; the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is obtained by the virtual machine through an extended Berkeley packet filter eBPF program, sent to the second device through a proxy module of the virtual machine, and sent by the second device to the first device;
[0055] The security policy is sent to the proxy module of the virtual machine.
[0056] Optionally, when the security policy is generated by the first device according to traffic quintuple information of the virtual machine, the method further includes:
[0057] Receive first information sent by the virtual machine through the proxy module, where the first information includes an identity of a first virtual network function VNF, an identity of the virtual machine, and the traffic quintuple information;
[0058] Among them, the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0059] Optionally, the receiving a security policy sent by the first device includes:
[0060] receiving third information sent by the first device;
[0061] The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine;
[0062] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0063] Optionally, sending the security policy to the proxy module of the virtual machine includes:
[0064] Sending the security policy to the proxy module of the virtual machine according to the identity of the first VNF and the identity of the virtual machine in the third information;
[0065] The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine;
[0066] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0067] Optionally, the method further comprises:
[0068] Receiving filtered traffic quintuple information sent by the virtual machine through the proxy module;
[0069] Sending the filtered traffic quintuple information to the second device;
[0070] The filtered traffic quintuple information is obtained by filtering the traffic quintuple information of the virtual machine obtained by the virtual machine through the eBPF program according to the security policy.
[0071] Optionally, the method further comprises:
[0072] When the virtual machine determines through the eBPF program that the filtered traffic quintuple information indicates the presence of abnormal traffic, the second information sent by the proxy module is received, the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device; the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log are obtained by the virtual machine through the proxy module pre-processing the traffic quintuple information and the abnormal traffic log of the abnormal traffic; the abnormal traffic log is generated by the virtual machine according to the abnormal traffic through the eBPF program;
[0073] An updated security policy is sent to the proxy module, where the updated security policy is generated by the first device based on the traffic quintuple information of the abnormal traffic sent by the second device and the processed abnormal traffic log.
[0074] In a fourth aspect, an embodiment of the present invention further provides a security protection device, which is applied to a virtual machine, and the device includes:
[0075] A first acquisition module, configured to acquire traffic quintuple information of the virtual machine through an extended Berkeley packet filter eBPF program of the virtual machine;
[0076] A first filtering module is used to filter the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program to identify abnormal traffic;
[0077] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0078] In a fifth aspect, an embodiment of the present invention further provides a safety protection device, applied to a first device, the device comprising:
[0079] A first sending module, used to send a security policy to a second device;
[0080] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device, the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0081] In a sixth aspect, an embodiment of the present invention further provides a safety protection device, applied to a second device, the device comprising:
[0082] A first receiving module, configured to receive a security policy sent by a first device; the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is preconfigured by the first device; the traffic quintuple information of the virtual machine is obtained by the virtual machine through an extended Berkeley packet filter eBPF program, sent to the second device through a proxy module of the virtual machine, and sent by the second device to the first device;
[0083] The second sending module is used to send the security policy to the proxy module of the virtual machine.
[0084] In the seventh aspect, an embodiment of the present invention further provides a virtual machine, comprising: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, it implements the steps in the security protection method described in any one of the first aspects.
[0085] In the eighth aspect, an embodiment of the present invention further provides an electronic device, which is a first device and includes: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, it implements the steps in the security protection method described in any one of the second aspects.
[0086] In the ninth aspect, an embodiment of the present invention further provides an electronic device, which is a second device and includes: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, it implements the steps in the security protection method described in any one of the third aspects.
[0087] In the tenth aspect, an embodiment of the present invention further provides a readable storage medium having a program or instruction stored thereon, which, when executed by a processor, implements the steps of the security protection method as described in any one of the first aspect, or implements the steps of the security protection method as described in any one of the second aspect, or implements the steps of the security protection method as described in any one of the third aspect.
[0088] The beneficial effects of the above technical solution of the present invention are as follows:
[0089] The security protection method provided by the scheme of the present invention obtains the traffic quintuple information of the virtual machine through the eBPF program of the virtual machine, receives the security policy sent by the second device through the proxy module, and filters the obtained traffic quintuple information of the virtual machine according to the security policy through the eBPF program to obtain the filtered traffic quintuple information, wherein the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device and sent by the first device to the second device, which can realize the micro-isolation mechanism, generate accurate micro-isolation strategy, and has good compatibility and a full monitoring range. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1 The architecture diagram of the eBPF provided by the present invention;
[0091] Figure 2 A flowchart of a security protection method applied to a virtual machine provided by an embodiment of the present invention;
[0092] Figure 3 A schematic diagram of the structure of a micro-isolation system based on eBPF provided in an embodiment of the present invention;
[0093] Figure 4 A schematic diagram of the architecture of an agent provided in an embodiment of the present invention;
[0094] Figure 5 A flowchart of a security protection method applied to a first device provided by an embodiment of the present invention;
[0095] Figure 6 A flowchart showing that there is no abnormality in the security monitoring provided by an embodiment of the present invention;
[0096] Figure 7 A flowchart of an abnormal security monitoring provided by an embodiment of the present invention;
[0097] Figure 8 A flowchart of a security protection method for a second device provided by an embodiment of the present invention;
[0098] Fig. 9 A specific flow chart of the security protection method provided by the embodiment of the present invention;
[0099] Fig.10 A schematic diagram of the structure of a security protection device applied to a virtual machine provided by an embodiment of the present invention;
[0100] Fig.11 A schematic diagram of the structure of a safety protection device applied to a first device provided in an embodiment of the present invention;
[0101] Fig.12 A schematic diagram of the structure of a safety protection device applied to a second device provided in an embodiment of the present invention;
[0102] Fig.13 A schematic diagram of the structure of a virtual machine provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0103] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0104] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment", "in one embodiment", or "in an alternative embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0105] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0106] Additionally, the terms "system" and "network" are often used interchangeably herein.
[0107] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0108] For ease of understanding, before describing the specific embodiments of the present invention, the following description is first given:
[0109] The following are the main types of micro-isolation solutions proposed by the industry:
[0110] Independent physical security devices: Physical security devices, such as firewalls, are deployed at the boundaries of security domains to isolate different security domains. This will lead to the deployment of a large number of physical security devices. The network of a data center is dynamically changing and has no fixed physical boundaries. Therefore, statically deployed physical security devices will lead to a large amount of traffic diversion and policy configuration.
[0111] Host agent: Install agent software on each virtual machine to check the traffic in and out of the virtual machine and the applications and content inside the virtual machine. This method is dependent on the virtual machine operating system;
[0112] Virtual switch: Divide virtual local area networks (VLNs) and set access control lists (ACLs) on virtual switches. This method requires the capabilities of the switch.
[0113] Hypervisor-based control: The Hypervisor and virtual switch work together to control the virtual network card of the virtual machine. This method relies on the Application Programming Interface (API) provided by the Hypervisor;
[0114] Traffic diversion: divert the traffic of the virtual machine that needs to be protected to a security virtual machine or physical security device that specializes in security analysis for analysis. This method does not rely on the virtual environment and requires a traffic diversion mechanism.
[0115] Extended Berkeley Packet Filter (eBPF) is a packet filtering technology. The architecture of eBPF is as follows: Figure 1As shown in the figure, it is an extension of the Berkeley Packet Filter (BPF) technology. With the help of the Just-In-Time Compiler (JIT), eBPF runs a virtual machine in the kernel to ensure that only verified safe eBPF instructions are executed by the kernel. At the same time, because eBPF instructions still run in the kernel, there is no need to copy data to the user state, which greatly improves the efficiency of event processing. eBPF has been widely used in fault diagnosis, network optimization, security control, performance monitoring and other fields. eBPF will only be executed after an event is triggered. These events include system calls, kernel trace points, kernel function and user state function call exit, network events, etc. The eBPF program is loaded into the kernel in the form of bytecode, attached to the mount point to trigger execution, and interacts with the user state program through the eBPF Map.
[0116] In order to solve the problem that existing security protection methods cannot generate accurate micro-isolation strategies and have poor compatibility, an embodiment of the present invention provides a security protection method, device, virtual machine, electronic device and storage medium.
[0117] like Figure 2 As shown, a security protection method provided by an embodiment of the present invention is applied to a virtual machine, and the method includes:
[0118] Step 201: Obtain traffic quintuple information of the virtual machine through an extended Berkeley packet filter eBPF program of the virtual machine.
[0119] It should be noted that the security protection method provided in the embodiment of the present invention is applied to a micro-isolation system based on eBPF. The structural diagram of the micro-isolation system based on eBPF is as follows: Figure 3 shown.
[0120] The eBPF-based micro-isolation system includes a micro-isolation management module and a VNF connected to the micro-isolation management module. Among them, the VNF includes a management virtual machine (management VM) and a business virtual machine (business VM). The management VM is responsible for processing management-related functions, and the business VM is responsible for processing business-related functions. An eBPF program, an agent, and a storage and data retrieval module (Map) are added to the management VM and business VM of the VNF respectively. And a convergence forwarding module is also added to the management VM.
[0121] The eBPF program in the virtual machine is the kernel eBPF, which is loaded into the kernel by the agent, and after passing the legality verification, it is mounted on the kernel function, such as TC or XDP, or the access or connection-related functions of the network protocol stack Transmission Control Protocol (TCP), etc. In this step, when the system calls the kernel function and executes the eBPF program for traffic processing, the eBPF program is triggered to execute, and the virtual machine collects the five-tuple information of the traffic received by the virtual machine in real time through the eBPF program, that is, the traffic five-tuple information. Specifically, the eBPF program filters the traffic received by the kernel, extracts the five-tuple information of the traffic, and the process of filtering the traffic received by the kernel through the eBPF program is not repeated in the embodiment of the present invention.
[0122] Step 202: Filter the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program to identify abnormal traffic;
[0123] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0124] It should be noted that the first device is a micro-isolation management module, and the second device is a newly added aggregation and forwarding module in the management VM.
[0125] In this step, in the initial traffic learning stage, the first device has not downloaded the security policy yet, and all traffic is released, that is, forwarded according to the destination address, that is, the virtual machine sends the traffic five-tuple information to the second device through the agent, and the second device reports the received traffic five-tuple information to the first device. Optionally, the agent can periodically send the traffic five-tuple information to the second device, and the second device also periodically sends the traffic five-tuple information to the first device, or the first device can periodically actively obtain the traffic five-tuple information from the second device.
[0126] The first device learns according to the traffic quintuple information and generates a security policy. Alternatively, when the operation and maintenance personnel already have the access relationship between the network elements, that is, if it is known which virtual machines are included in the first VNF currently connected to the first device and the traffic interaction between each virtual machine and other virtual machines, the security policy can also be set in advance. The first device sends the security policy to the second device, the second device forwards the security policy to the agent, and the virtual machine filters the acquired traffic quintuple information of the virtual machine according to the security policy, identifies abnormal traffic, and performs security monitoring. Specifically, the virtual machine checks the received traffic quintuple information according to the security policy to see if there is abnormal traffic. The checking method can be to check whether all the extracted traffic quintuple information complies with the security policy, such as whether they are all in the access control list (ACL). If not, it is abnormal traffic.
[0127] It should be noted that the agent is responsible for creating a Map (Map is used to exchange information between kernel space and user space), and managing the eBPF program, such as loading the eBPF program into the kernel, monitoring the running status of the eBPF program, etc., and is responsible for reading the traffic quintuple information written by the eBPF program from the Map. Therefore, in an optional embodiment of the present invention, the extended Berkeley packet filter eBPF program of the virtual machine obtains the traffic quintuple information of the virtual machine, including: when the system calls the kernel function, when the eBPF program is executed for traffic processing, the eBPF program is triggered to execute, and the traffic quintuple information is collected through the eBPF program, and the traffic quintuple information is sent to the Map, the agent reads the traffic quintuple information from the Map, and the agent pre-processes the traffic quintuple information, that is, integrates the overlapping traffic quintuple information.
[0128] In an optional embodiment of the present invention, when sending traffic quintuple information to the first device through the agent, the first information including the identity of the first VNF (VNF id), the identity of the VM in the first VNF (VM id) and the traffic quintuple information is sent to the second device through the agent of the virtual machine, wherein the traffic quintuple information may be pre-processed traffic quintuple information. After the second device receives the first information, the second device sends the VNFid, VM id and traffic quintuple information in the first information to the first device. For example, the agent may periodically send the first information to the second device, and the second device may also periodically send the first information to the first device, or the first device may actively obtain the first information from the second device. Figure 3 As shown, the first VNF includes VNF1 and VNF2, VNF1 includes a management VM, a business VM1 and a business VM2, and the VM in VNF2 is not shown.
[0129] In addition, the agent is also used to store the security policy in a Map associated with the agent. The Map is a data structure managed by the kernel and stores data in the form of key-value pairs. It can be used to store data from the eBPF program, store security policies from the agent that need to be executed by the eBPF program, and support the eBPF program and the agent to read the relevant data stored in the Map respectively. In an optional embodiment of the present invention, the method also includes: the first device sends the security policy to the second device, and carries the corresponding VNF id and VM id. The second device sends the security policy to the agent of the virtual machine according to the VNF id and VM id, and sends the security policy to the Map of the virtual machine through the agent. The agent sends a security policy update notification message to the eBPF program, and the eBPF program obtains the security policy from the Map.
[0130] The eBPF program collects traffic quintuple information of the received traffic and filters the received traffic quintuple information according to the security policy, that is, performs security monitoring. In an optional embodiment of the present invention, when there is no abnormality in security monitoring according to the security policy, traffic monitoring continues. In another optional embodiment, the eBPF program collects traffic quintuple information, and filters the traffic quintuple information according to the security policy to obtain filtered traffic quintuple information. If abnormal traffic is identified in the filtered traffic quintuple information, the message corresponding to the abnormal traffic is discarded, and an abnormal traffic log is generated according to the abnormal traffic. The abnormal traffic log includes the traffic quintuple information of the abnormal traffic that discards the message, the receipt time of the abnormal traffic, the processing action, etc. The eBPF program stores the acquired traffic quintuple information of the abnormal traffic and the abnormal traffic log to a Map, and the agent obtains the traffic quintuple information of the abnormal traffic and the abnormal traffic log from the Map. The agent pre-processes the traffic quintuple information of the abnormal traffic and the abnormal traffic log, merges the overlapping traffic quintuple information and the abnormal traffic log information (i.e., the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log), and the agent reports to the second device the traffic quintuple information including the processed abnormal traffic, the processed abnormal traffic log, and the VNF id, VM The second device sends the second information of the id to the first device, and the first device learns according to the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log in the second information to obtain an updated security policy or alarm information. If an updated security policy is generated, the first device sends the updated security policy to the second device, the second device sends the updated security policy to the agent, and the agent sends the updated security policy to the Map. The eBPF program obtains the updated security policy from the Map and filters the obtained traffic quintuple information according to the updated security policy, that is, continues to monitor the traffic.
[0131] It should also be noted that when the security policy is normally updated due to business evolution or update (for example, after a new business system is launched, there is traffic interaction between the original VNF and the business system, and the security policy of the existing VNF needs to be updated), it is also possible to preset the security policy, that is, pre-configure the updated security policy, and the first device will send the updated security policy to the second device, so that the second device sends it to the agent in the virtual machine. Among them, the method of pre-setting the security policy can avoid the new traffic being blocked because the security policy has not been updated.
[0132] When the eBPF program finds abnormal traffic in the filtered traffic five-tuple information, it immediately sends the second information to the second device through the agent. Legal traffic is forwarded according to the destination address.
[0133] In summary, the agent provided in the embodiment of the present invention has the following features: Figure 4 The architecture shown in the figure, in which the agent at least includes a Map creation module, a traffic and log information acquisition module, a traffic and log information reporting module, a security policy receiving module, a security policy issuing module, and an eBPF management module, which respectively create a Map associated with the eBPF program, obtain traffic quintuple information and abnormal traffic information from the Map, and report to the convergence and forwarding module; receive the security policy from the convergence and forwarding module, store it in the Map, and notify the eBPF program of the security policy update. Manage the eBPF program, including loading the eBPF program into the kernel space, mounting it to the relevant kernel function, and monitoring the running status of the eBPF program.
[0134] The virtual machine provided by the embodiment of the present invention collects traffic information in the kernel and performs security filtering on the traffic through the eBPF program. Compared with the collection and security filtering of traffic information in the user state, it is more efficient and has less impact on the performance of the network element, and there is no need to solve the compatibility issues of components from different manufacturers. The convergence and forwarding module is introduced to reduce the development of new interfaces of the VNF virtual machine and reduce the exposure of the VNF.
[0135] like Figure 5 As shown, an embodiment of the present invention further provides a security protection method, which is applied to a first device, and the method includes:
[0136] Step 501: Sending a security policy to a second device;
[0137] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device, the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0138] It should be noted that the first device provided in the embodiment of the present invention is Figure 3 The micro-isolation management module shown, the second device is a convergence forwarding module. Figure 3 As shown in the figure, the micro-isolation management module includes asset management, security policy management, security monitoring, traffic visualization, etc. It can be deployed independently or as part of the network element's network management OMC. The agents in all VNF virtual machines can communicate with the micro-isolation management module through the aggregation and forwarding module in the management virtual machine, including traffic information, abnormal traffic log reporting, security policy delivery, etc.
[0139] The first device is responsible for learning the traffic quintuple information reported by the convergence forwarding module in the management VM, generating security policies, or forming security policies through pre-configuration, and supporting the security policies to be sent to the convergence management module. The first device (i.e., the micro-management module) can be deployed independently or can be part of the network element's network management operation and maintenance center (OMC). In this scenario, the communication between the micro-isolation management module and the management VM can be expanded based on the interface between the OMC and the management VM, without the need to develop a new interface.
[0140] In this step, the first device receives the traffic quintuple information of the virtual machine sent by the second device, learns according to the traffic quintuple information of the virtual machine, and generates a security policy. Alternatively, when the operation and maintenance personnel already have the access relationship between the network elements, that is, it is known which VMs the VNF contains and which VMs each VM has traffic interaction with, the first device preconfigures the security policy, the first device sends the security policy to the second device, and the second device is used to send the security policy to the agent of the virtual machine, so that the eBPF program of the virtual machine filters the acquired traffic quintuple information of the corresponding virtual machine according to the security policy.
[0141] It should also be noted that security policies can be set for a group of VMs to form a security policy group, and VMid and VNF id can be used instead of IP to identify the VM. In this way, when the VM is expanded, it can be automatically added to the security policy group according to the VM ID, so that the security policy can automatically take effect.
[0142] In an optional embodiment of the present invention, when the first device sends a security policy to the second device, it also carries the corresponding identity of the first VNF (VNF id) and the identity of the virtual machine (VM id) in the first VNF, that is, the first device sends the third information including the security policy, VNF id and VM id to the second device, so that the second device sends the security policy to the corresponding virtual agent according to the VNF id and VM id.
[0143] In an optional embodiment of the present invention, when sending traffic quintuple information to a first device through an agent, first information including an identity of the first VNF (VNF id), an identity of the VM in the first VNF (VM id) and traffic quintuple information is sent to a second device through an agent of the virtual machine, wherein the traffic quintuple information may be pre-processed traffic quintuple information. After the second device receives the first information, the second device sends the VNFid, VM id and traffic quintuple information in the first information to the first device.
[0144] Furthermore, the first device uses artificial intelligence (AI) technology to learn based on the traffic quintuple information in the first information to generate network topology information, wherein the network topology information includes at least the first VNF in the network, the identity of each first VNF (VNF id), the VM included in each VNF and the identity of the VM (VM id), the connection relationship between the VMs, and the connection relationship between the first VNFs.
[0145] In an optional embodiment of the present invention, after the agent of the virtual machine receives the corresponding security policy and filters the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program to obtain the filtered traffic quintuple information, the virtual machine sends the filtered traffic quintuple information to the second device through the agent, the second device summarizes the filtered traffic quintuple information and sends the filtered traffic quintuple information to the first device, the first device learns according to the filtered traffic quintuple information to obtain the learning result, if the learning result indicates that the filtered traffic quintuple information complies with the network topology information and the security policy, it is determined that the virtual machine continues to be monitored, that is, continues to send the filtered traffic quintuple information to the second device, and the first device determines to continue to receive the filtered traffic quintuple information sent by the second device.
[0146] Specifically, see Figure 6 , the process of security monitoring without abnormalities is as follows:
[0147] Step 1: The eBPF program in the VNF virtual machine collects the traffic five-tuple information of the received traffic, and filters the traffic according to the security policy to obtain the filtered traffic five-tuple information;
[0148] Step 2: The eBPF program stores the captured filtered traffic quintuple information into the Map in the virtual machine;
[0149] Step 3: The agent in the virtual machine reads the filtered traffic five-tuple information from the Map;
[0150] Step 4, the agent pre-processes the filtered traffic quintuple information;
[0151] Step 5, the agent periodically reports the pre-processed and filtered traffic quintuple information to the second device;
[0152] Step 6, the agent summarizes the received filtered traffic quintuple information and reports it to the first device;
[0153] Step 7: The first device learns based on the filtered traffic quintuple information, confirms that it is consistent with the current network topology information and security policy, and continues monitoring.
[0154] In another optional embodiment of the present invention, after the agent of the virtual machine receives the corresponding security policy and filters the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program to obtain the filtered traffic quintuple information, if abnormal traffic is identified according to the filtered traffic quintuple information, the message corresponding to the abnormal traffic is discarded, and an abnormal traffic log is generated according to the abnormal traffic. The abnormal traffic log includes the traffic quintuple information of the abnormal traffic of the discarded message, the receipt time of the abnormal traffic, the processing action, etc. The eBPF program stores the acquired traffic quintuple information of the abnormal traffic and the abnormal traffic log to a Map, and the agent obtains the traffic quintuple information of the abnormal traffic and the abnormal traffic log from the Map. The agent pre-processes the traffic quintuple information of the abnormal traffic and the abnormal traffic log, merges the overlapping traffic quintuple information and the abnormal traffic log information (i.e., the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log), and the agent reports to the second device the traffic quintuple information including the processed abnormal traffic, the processed abnormal traffic log, and the VNF id, VM The second device sends the second information of the id to the first device, and the first device learns according to the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log in the second information to obtain an updated security policy or alarm information. If an updated security policy is generated, the first device sends the updated security policy to the second device, the second device sends the updated security policy to the agent, and the agent sends the updated security policy to the Map. The eBPF program obtains the updated security policy from the Map and filters the obtained traffic quintuple information according to the updated security policy, that is, continues to monitor the traffic.
[0155] It should also be noted that when the security policy is normally updated due to business evolution or update (for example, after a new business system is launched, there is traffic interaction between the original VNF and the business system, and the security policy of the existing VNF needs to be updated), it is also possible to preset the security policy, that is, pre-configure the updated security policy, and the first device will send the updated security policy to the second device, so that the second device sends it to the agent in the virtual machine. Among them, the method of pre-setting the security policy can avoid the new traffic being blocked because the security policy has not been updated.
[0156] Further, when the first device obtains from the OMC or the Network Function Virtualisation Orchestrator (NFVO) whether there is a new VNF and a corresponding VM instantiation, if so, that is, when there is a second VNF connected to the first device after the first VNF, and the second VNF includes a newly connected VM, it means that the abnormal traffic is generated by the legal new VNF (second VNF) and the corresponding VM, then the updated security policy is generated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log, and the network topology information is updated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log. If not, that is, when there is no second VNF connected to the first device after the first VNF, or the traffic generated by the VM in the second VNF is different from the abnormal traffic (that is, the VM in the second VNF is not the generator of the abnormal traffic), an alarm message is generated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log, and the administrator handles it.
[0157] Specifically, see Figure 7 , the process of abnormal security monitoring is as follows:
[0158] Step 1: The eBPF program in the VNF virtual machine collects the traffic five-tuple information of the received traffic, filters the traffic according to the security policy, finds abnormal traffic, discards the message, and records the abnormal traffic log. The abnormal traffic log includes the traffic five-tuple information of the discarded message, the receipt time, the processing action, etc.
[0159] Step 2: The eBPF program stores the acquired traffic quintuple information of abnormal traffic and abnormal traffic log into Map;
[0160] Step 3: The agent obtains the traffic quintuple and abnormal traffic log information from the Map;
[0161] Step 4, the agent pre-processes the traffic quintuple information of the abnormal traffic and the abnormal traffic log, and merges the traffic quintuple information of the overlapping abnormal traffic and the abnormal traffic log information;
[0162] Step 5, the agent reports the traffic quintuple information of the pre-processed abnormal traffic, the abnormal traffic log, and the VNFid and VM id to the second device;
[0163] Step 6, the second device reports the received traffic quintuple information of the abnormal traffic, the abnormal traffic log, and the VNF id and VM id to the first device, and Map configures the traffic and port whitelist on the virtualized network element through the eBPF program;
[0164] Step 7: The first device learns based on the traffic quintuple information of the abnormal traffic and the abnormal traffic log, and checks whether the abnormal traffic is generated by the VM in the newly added legal VNF (the second VNF). If so, it generates updated network topology information and an updated security policy, and sends them to the second device. Otherwise, it generates an alarm message, which is handled by the administrator.
[0165] Step 8: The first device sends the updated security policy to the second device;
[0166] Step 9: The second device sends the updated security policy to the corresponding agent;
[0167] Step 10: Store the updated security policy in the Map;
[0168] Step 11: The agent sends a security policy update notification to the eBPF program.
[0169] Step 12: The eBPF program obtains the updated security policy from the Map;
[0170] Step 13, collect traffic five-tuple information from the collected traffic, and filter the traffic according to the updated security policy.
[0171] like Figure 8 As shown, an embodiment of the present invention further provides a security protection method, which is applied to a second device, and the method includes:
[0172] Step 801: Receive a security policy sent by the first device; the security policy is generated by the first device based on the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is obtained by the virtual machine through the extended Berkeley Packet Filter eBPF program, sent to the second device through the proxy module of the virtual machine, and sent by the second device to the first device.
[0173] It should be noted that the first device is a micro-isolation management module, and the second device is a newly added aggregation and forwarding module in the management VM.
[0174] Step 802: Send the security policy to the proxy module of the virtual machine.
[0175] In this embodiment, the aggregation forwarding module is deployed in the management virtual machine of the VNF, receives the traffic quintuple information from the agent in all virtual machines of the VNF, and periodically reports it to the micro-isolation management module; receives the security policy issued from the micro-isolation management module, and forwards it to the corresponding agent in the virtual machine of the VNF.
[0176] In an optional embodiment of the present invention, when the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, the method further includes:
[0177] Receive first information sent by the virtual machine through the proxy module, where the first information includes an identity of a first virtual network function VNF, an identity of the virtual machine, and the traffic quintuple information;
[0178] Among them, the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0179] In an optional embodiment of the present invention, the receiving the security policy sent by the first device includes:
[0180] receiving third information sent by the first device;
[0181] The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine;
[0182] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0183] In an optional embodiment of the present invention, the sending the security policy to the proxy module of the virtual machine includes:
[0184] Sending the security policy to the proxy module of the virtual machine according to the identity of the first VNF and the identity of the virtual machine in the third information;
[0185] The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine;
[0186] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0187] In an optional embodiment of the present invention, the method further includes:
[0188] Receiving filtered traffic quintuple information sent by the virtual machine through the proxy module;
[0189] Sending the filtered traffic quintuple information to the second device;
[0190] The filtered traffic quintuple information is obtained by filtering the traffic quintuple information of the virtual machine obtained by the virtual machine through the eBPF program according to the security policy.
[0191] In an optional embodiment of the present invention, the method further includes:
[0192] When the virtual machine determines through the eBPF program that the filtered traffic quintuple information indicates the presence of abnormal traffic, the second information sent by the proxy module is received, the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device; the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log are obtained by the virtual machine through the proxy module pre-processing the traffic quintuple information and the abnormal traffic log of the abnormal traffic; the abnormal traffic log is generated by the virtual machine according to the abnormal traffic through the eBPF program;
[0193] An updated security policy is sent to the proxy module, where the updated security policy is generated by the first device based on the traffic quintuple information of the abnormal traffic sent by the second device and the processed abnormal traffic log.
[0194] Combine the following Fig. 9 , specifically describes the specific process of security protection provided by the embodiment of the present invention:
[0195] Step 1: The agent in the VNF virtual machine creates a map for exchanging information between the kernel space and the user space.
[0196] Step 2: The agent in the virtual machine loads the eBPF program into the kernel and successfully mounts it on the kernel function.
[0197] Step 3: When the VM of the VNF receives traffic and calls the kernel function of the mounted eBPF program to process the traffic, the eBPF program is triggered to execute. The eBPF program in the virtual machine captures the traffic quintuple information and stores it in the Map.
[0198] Step 4, the agent reads the traffic quintuple information in the Map;
[0199] Step 5, pre-processing the traffic quintuple information to obtain processed traffic quintuple information;
[0200] Step 6: The agent periodically reports the processed traffic quintuple information as well as the VNF id and VM id to the second device;
[0201] Step 7: The second device summarizes the received traffic quintuple information, VNF ID and VM ID, and reports it to the first device;
[0202] Step 8, the first device learns according to the traffic quintuple information to generate network topology information, and learns according to the traffic quintuple information to generate a security policy or a preset security policy;
[0203] Step 9: The first device sends a security policy to the second device;
[0204] Step 10: The second device sends the security policy to the corresponding agent;
[0205] Step 11, the agent stores the security policy in the Map;
[0206] Step 12: The agent sends a security policy update notification to the eBPF program
[0207] Step 13, the eBPF program obtains the security policy from the Map;
[0208] In step 14, the eBPF program collects traffic five-tuple information of the received traffic and filters the traffic according to the security policy.
[0209] The security protection method provided by the embodiment of the present invention is a micro-isolation mechanism based on the eBPF program, which realizes the collection and reporting of network element traffic information and the execution of security policies through the eBPF program; the reports of network element traffic information are aggregated and reported uniformly to avoid the connection between all VMs of VNF and the micro-isolation management function. In this way, efficient data collection and traffic monitoring, as well as VNF security are achieved.
[0210] The embodiment of the present invention avoids the compatibility problem of installing third-party plug-ins, and the operation and maintenance of endogenous plug-ins is more efficient, and the problem of difficulty in locating problems of multiple manufacturers will not occur; eBPF collects and filters traffic information in the kernel state, avoiding copying data back and forth between the kernel and user space, which is more efficient and has little impact on network element performance; the aggregation and forwarding module of the management VM interacts with the micro-isolation management module, avoiding the opening of new interfaces between other business VMs and the micro-isolation management module, thereby reducing the exposure surface of the VNF.
[0211] like Fig.10 As shown, an embodiment of the present invention further provides a security protection device, which is applied to a virtual machine, and the device includes:
[0212] A first acquisition module 1001 is used to acquire the traffic quintuple information of the virtual machine through an extended Berkeley packet filter eBPF program of the virtual machine;
[0213] The first filtering module 1002 is used to filter the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program to identify abnormal traffic;
[0214] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0215] Optionally, the first acquisition module 1001 includes:
[0216] A first acquisition unit, configured to acquire traffic quintuple information of the virtual machine through the eBPF program;
[0217] A first sending unit, configured to send the traffic quintuple information to a storage and data retrieval module of the virtual machine through the eBPF program;
[0218] The second acquisition unit is used to acquire the traffic quintuple information of the virtual machine from the storage and data retrieval module through the proxy module.
[0219] Optionally, the device further includes: a first information sending module;
[0220] The first information sending module is used to send the first information to the second device through the proxy module when the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, wherein the first information includes the identity of the first virtual network function VNF, the identity of the virtual machine and the traffic quintuple information;
[0221] Among them, the first VNF includes the virtual machine; the first VNF is a VNF connected to the first device.
[0222] Optionally, the device further comprises:
[0223] A first storage module, configured to store the security policy in a storage and data retrieval module of the virtual machine through the proxy module;
[0224] A second acquisition module is used to acquire the security policy from the storage and data retrieval module through the eBPF program.
[0225] Optionally, the device further comprises:
[0226] A first processing module, configured to generate an abnormal traffic log according to the abnormal traffic when abnormal traffic is identified;
[0227] A second storage module is used to store the traffic quintuple information of the abnormal traffic and the abnormal traffic log to the storage and data retrieval module of the virtual machine through the eBPF program;
[0228] A second processing module, used for preprocessing the traffic quintuple information of the abnormal traffic and the abnormal traffic log through the proxy module to obtain the processed traffic quintuple information of the abnormal traffic and the processed abnormal traffic log;
[0229] A second information sending module is used to send second information to the second device through the proxy module, wherein the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the VNF includes the virtual machine; the first VNF is a VNF connected to the first device;
[0230] A first policy receiving module is used to receive an updated security policy sent by the first device through a proxy module; the updated security policy is generated by the first device according to the traffic quintuple information of the abnormal traffic in the second information sent by the second device and the processed abnormal traffic log, or the updated security policy is pre-configured by the first device;
[0231] A third acquisition module, configured to acquire the updated security policy from the storage and data retrieval module through the eBPF program;
[0232] The second filtering module is used to filter the acquired traffic quintuple information of the virtual machine according to the updated security policy through the eBPF program.
[0233] It should be noted that the security protection device applied to a virtual machine provided in an embodiment of the present invention is a device capable of executing the above-mentioned security protection method applied to a virtual machine. All embodiments of the above-mentioned security protection method applied to a virtual machine are applicable to the device and can achieve the same or similar technical effects.
[0234] like Fig.11 As shown, an embodiment of the present invention further provides a safety protection device, which is applied to a first device, and the device includes:
[0235] A first sending module 1101, configured to send a security policy to a second device;
[0236] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device, the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0237] Optionally, the first sending module 1101 includes:
[0238] A third sending unit, configured to send third information to the second device, the third information including the security policy, the identity of the first virtual network function VNF and the identity of the virtual machine;
[0239] Among them, the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0240] Optionally, the device further includes: a first information receiving module;
[0241] The first information receiving module is used to receive the first information sent by the second device when the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, wherein the first information includes the identity of the first VNF, the identity of the virtual machine and the traffic quintuple information of the virtual machine;
[0242] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0243] Optionally, the device further comprises:
[0244] A first learning module is configured to learn according to the first information to obtain network topology information, wherein the network topology information includes: a first VNF, an identity of the first VNF, a virtual machine in the first VNF, an identity of each of the virtual machines, a connection relationship between the first VNFs, and a connection relationship between the virtual machines;
[0245] Among them, the first VNF is a VNF connected to the first device.
[0246] Optionally, the device further comprises:
[0247] A second information receiving module is used to receive the filtered traffic quintuple information sent by the second device; the filtered traffic quintuple information is sent by the virtual machine to the second device through the proxy module, and the filtered traffic quintuple information is obtained by filtering the traffic quintuple information of the virtual machine obtained by the virtual machine through the extended Berkeley packet filter eBPF program of the virtual machine according to the security policy;
[0248] The second learning module is used to learn the filtered traffic quintuple information to obtain a learning result;
[0249] The first determination module is used to determine to continue receiving the filtered traffic quintuple information sent by the second device when the learning result indicates that the filtered traffic quintuple information complies with the network topology information and the security policy.
[0250] Optionally, the device further comprises:
[0251] The third information receiving module is used for filtering the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program, and receiving the second information sent by the second device when abnormal traffic is identified; the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the first VNF includes the virtual machine; the first VNF is the VNF connected to the first device; the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log are obtained by the virtual machine through the proxy module Pre-processing the traffic quintuple information and abnormal traffic log of the abnormal traffic; the abnormal traffic log is generated by the virtual machine according to the abnormal traffic through the eBPF program;
[0252] A third processing module, used to generate an updated security policy according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log, or to generate alarm information according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log;
[0253] The first policy sending module is used to send the updated security policy to the second device when the updated security policy is generated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log.
[0254] Optionally, the third processing module includes:
[0255] A first processing unit is configured to generate the updated security policy according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log when there is a second VNF and the second VNF includes a virtual machine; the second VNF is a VNF connected to the first device after the first VNF;
[0256] The second processing unit is used to update the network topology information according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log.
[0257] Optionally, the third processing module includes:
[0258] A third processing unit is used to generate the alarm information according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log when the second VNF does not exist or the traffic generated by the VM in the second VNF is different from the abnormal traffic;
[0259] Among them, the second VNF is a VNF connected to the first device after the first VNF.
[0260] It should be noted that the security protection device applied to the first device provided in the embodiment of the present invention is a device capable of executing the above-mentioned security protection method applied to the first device. All embodiments of the above-mentioned security protection method applied to the first device are applicable to the device and can achieve the same or similar technical effects.
[0261] like Fig.12 As shown, an embodiment of the present invention further provides a safety protection device, which is applied to a second device, and the device includes:
[0262] The first receiving module 1201 is used to receive a security policy sent by a first device; the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is obtained by the virtual machine through an extended Berkeley packet filter eBPF program, sent to the second device through a proxy module of the virtual machine, and sent by the second device to the first device;
[0263] The second sending module 1202 is used to send the security policy to the proxy module of the virtual machine.
[0264] Optionally, the device further includes: a fourth information receiving module;
[0265] The fourth information receiving module is used to receive the first information sent by the virtual machine through the proxy module when the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, wherein the first information includes the identity of the first virtual network function VNF, the identity of the virtual machine and the traffic quintuple information;
[0266] Among them, the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0267] Optionally, the first receiving module 1201 includes:
[0268] A first receiving unit, configured to receive third information sent by the first device;
[0269] The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine;
[0270] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0271] Optionally, the second sending module 1202 includes:
[0272] a fourth sending unit, configured to send the security policy to the proxy module of the virtual machine according to the identity of the first VNF and the identity of the virtual machine in the third information;
[0273] The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine;
[0274] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0275] Optionally, the device further comprises:
[0276] A fifth information receiving module, used to receive the filtered traffic quintuple information sent by the virtual machine through the proxy module;
[0277] A third information sending module, used to send the filtered traffic quintuple information to the second device;
[0278] The filtered traffic quintuple information is obtained by filtering the traffic quintuple information of the virtual machine obtained by the virtual machine through the eBPF program according to the security policy.
[0279] Optionally, the device further comprises:
[0280] The sixth information receiving module is used for filtering the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program, and receiving the second information sent by the proxy module when abnormal traffic is identified, wherein the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the first VNF includes the virtual machine, and the first VNF is the VNF connected to the first device; the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log are obtained by the virtual machine through the proxy module pre-processing the traffic quintuple information and the abnormal traffic log of the abnormal traffic; the abnormal traffic log is generated by the virtual machine according to the abnormal traffic through the eBPF program;
[0281] The fourth policy sending module is used to send an updated security policy to the proxy module, where the updated security policy is generated by the first device based on the traffic quintuple information of the abnormal traffic sent by the second device and the processed abnormal traffic log.
[0282] It should be noted that the security protection device applied to the second device provided in the embodiment of the present invention is a device capable of executing the above-mentioned security protection method applied to the second device. All embodiments of the above-mentioned security protection method applied to the second device are applicable to the device and can achieve the same or similar technical effects.
[0283] like Fig.13 As shown, an embodiment of the present invention also provides a virtual machine, including: a processor 1301; and a memory 1303 connected to the processor 1301 through a bus interface 1302, the memory 1303 is used to store programs and data used by the processor 1301 when performing operations, and the processor 1301 calls and executes the programs and data stored in the memory 1303.
[0284] The transceiver 1304 is connected to the bus interface 1302 and is used to receive and send data under the control of the processor 1301. Specifically, the processor 1301 is used to read the program in the memory 1303 and execute the following process:
[0285] Acquire the traffic quintuple information of the virtual machine through the extended Berkeley packet filter eBPF program of the virtual machine;
[0286] By means of the eBPF program, the acquired traffic quintuple information of the virtual machine is filtered according to the security policy to identify abnormal traffic;
[0287] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0288] Optionally, the processor 1301 is configured to:
[0289] The transceiver 1304 is used for:
[0290] Obtaining traffic quintuple information of the virtual machine through the eBPF program;
[0291] Sending the traffic quintuple information to the storage and data retrieval module of the virtual machine through the eBPF program;
[0292] The flow quintuple information of the virtual machine is obtained from the storage and data retrieval module through the proxy module.
[0293] Optionally, the transceiver 1304 is further configured to:
[0294] In the case where the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, the first information is sent to the second device through the proxy module, where the first information includes the identity of the first virtual network function VNF, the identity of the virtual machine and the traffic quintuple information;
[0295] Among them, the first VNF includes the virtual machine; the first VNF is a VNF connected to the first device.
[0296] Optionally, the processor 1301 is further configured to:
[0297] Storing the security policy in a storage and data retrieval module of the virtual machine through the proxy module;
[0298] The security policy is obtained from the storage and data retrieval module through the eBPF program.
[0299] Optionally, the processor 1301 is further configured to:
[0300] When abnormal traffic is identified, generating an abnormal traffic log according to the abnormal traffic;
[0301] The traffic quintuple information of the abnormal traffic and the abnormal traffic log are stored in the storage and data retrieval module of the virtual machine through the eBPF program;
[0302] Preprocessing the traffic quintuple information of the abnormal traffic and the abnormal traffic log by the proxy module to obtain the processed traffic quintuple information of the abnormal traffic and the processed abnormal traffic log;
[0303] The transceiver 1304 is further used for:
[0304] Sending second information to the second device through the proxy module, the second information including the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the VNF includes the virtual machine; the first VNF is a VNF connected to the first device;
[0305] Receiving an updated security policy sent by the first device through the proxy module; the updated security policy is generated by the first device according to the traffic quintuple information of the abnormal traffic in the second information sent by the second device and the processed abnormal traffic log, or the updated security policy is pre-configured by the first device;
[0306] Obtaining the updated security policy from the storage and data retrieval module through the eBPF program;
[0307] The processor 1301 is further configured to:
[0308] The eBPF program is used to filter the acquired traffic quintuple information of the virtual machine according to the updated security policy.
[0309] Among them, Fig.13 1301 and 1303. The bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 1301 and memory represented by memory 1303. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides a user interface 1305. The transceiver 1304 may be a plurality of components, i.e., including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 1301 is responsible for managing the bus architecture and general processing, and the memory 1303 may store data used by the processor 1301 when performing operations.
[0310] An embodiment of the present invention also provides an electronic device, which is a first device and includes: a processor; and a memory connected to the processor via a bus interface, the memory being used to store programs and data used by the processor when performing operations, and the processor calling and executing the programs and data stored in the memory.
[0311] The transceiver is connected to the bus interface and is used to receive and send data under the control of the processor.
[0312] It should be noted that the first device provided in the embodiment of the present invention is Fig.13 The structures of the virtual machines shown are similar and will not be described in detail here.
[0313] Specifically, the processor is used to read the program in the memory, and the transceiver performs the following process:
[0314] sending a security policy to a second device;
[0315] Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device, the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
[0316] Optionally, the transceiver is used to:
[0317] Sending third information to the second device, the third information including the security policy, the identity of the first virtual network function VNF and the identity of the virtual machine;
[0318] Among them, the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0319] Optionally, the transceiver is further used for:
[0320] In a case where the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, receiving first information sent by the second device, where the first information includes an identity of the first VNF, an identity of the virtual machine, and the traffic quintuple information of the virtual machine;
[0321] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0322] Optionally, the processor is configured to:
[0323] Learning according to the first information obtains network topology information, wherein the network topology information includes: a first VNF, an identity of the first VNF, a virtual machine in the first VNF, an identity of each of the virtual machines, a connection relationship between the first VNFs, and a connection relationship between the virtual machines;
[0324] Among them, the first VNF is a VNF connected to the first device.
[0325] Optionally, the transceiver is further used for:
[0326] Receive the filtered traffic quintuple information sent by the second device; the filtered traffic quintuple information is sent by the virtual machine to the second device through the proxy module, and the filtered traffic quintuple information is obtained by filtering the acquired traffic quintuple information of the virtual machine according to the security policy through the extended Berkeley packet filter eBPF program of the virtual machine;
[0327] The processor is further configured to:
[0328] Learning the filtered traffic quintuple information to obtain a learning result;
[0329] When the learning result indicates that the filtered traffic quintuple information complies with the network topology information and the security policy, it is determined to continue receiving the filtered traffic quintuple information sent by the second device.
[0330] Optionally, the transceiver is further used for:
[0331] When the virtual machine filters the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program and identifies abnormal traffic, the second information sent by the second device is received; the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the first VNF includes the virtual machine; the first VNF is the VNF connected to the first device; the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log are obtained by the virtual machine through the proxy module to pre-process the traffic quintuple information and the abnormal traffic log of the abnormal traffic; the abnormal traffic log is generated by the virtual machine according to the abnormal traffic through the eBPF program;
[0332] The processor is further configured to:
[0333] Generate an updated security policy based on the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log, or generate alarm information based on the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log;
[0334] When an updated security policy is generated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log, the updated security policy is sent to the second device.
[0335] Optionally, the processor is specifically configured to:
[0336] In the case where there is a second VNF, and the second VNF includes a virtual machine, generating the updated security policy according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log; the second VNF is a VNF connected to the first device after the first VNF;
[0337] The network topology information is updated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log.
[0338] Optionally, the processor is specifically configured to:
[0339] In the absence of the second VNF or in the case where the traffic generated by the VM in the second VNF is different from the abnormal traffic, generating the alarm information according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log;
[0340] Among them, the second VNF is a VNF connected to the first device after the first VNF.
[0341] An embodiment of the present invention also provides an electronic device, which is a second device and includes: a processor; and a memory connected to the processor via a bus interface, the memory being used to store programs and data used by the processor when performing operations, and the processor calling and executing the programs and data stored in the memory.
[0342] The transceiver is connected to the bus interface and is used to receive and send data under the control of the processor.
[0343] It should be noted that the second device provided in the embodiment of the present invention is Fig.13 The structures of the virtual machines shown are similar and will not be described in detail here.
[0344] Specifically, the processor is used to read the program in the memory, and the transceiver performs the following process:
[0345] Receive a security policy sent by a first device; the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is obtained by the virtual machine through an extended Berkeley packet filter eBPF program, sent to the second device through a proxy module of the virtual machine, and sent by the second device to the first device;
[0346] The security policy is sent to the proxy module of the virtual machine.
[0347] Optionally, the transceiver is further used for:
[0348] In a case where the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, receiving first information sent by the virtual machine through the proxy module, the first information including an identity of the first virtual network function VNF, an identity of the virtual machine and the traffic quintuple information;
[0349] Among them, the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0350] Optionally, the transceiver is specifically used for:
[0351] receiving third information sent by the first device;
[0352] The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine;
[0353] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0354] Optionally, the transceiver is specifically used for:
[0355] Sending the security policy to the proxy module of the virtual machine according to the identity of the first VNF and the identity of the virtual machine in the third information;
[0356] The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine;
[0357] The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
[0358] Optionally, the transceiver is further used for:
[0359] Receiving filtered traffic quintuple information sent by the virtual machine through the proxy module;
[0360] Sending the filtered traffic quintuple information to the second device;
[0361] The filtered traffic quintuple information is obtained by filtering the traffic quintuple information of the virtual machine obtained by the virtual machine through the eBPF program according to the security policy.
[0362] Optionally, the transceiver is further used for:
[0363] When the virtual machine determines through the eBPF program that the filtered traffic quintuple information indicates the presence of abnormal traffic, the second information sent by the proxy module is received, the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device; the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log are obtained by the virtual machine through the proxy module pre-processing the traffic quintuple information and the abnormal traffic log of the abnormal traffic; the abnormal traffic log is generated by the virtual machine according to the abnormal traffic through the eBPF program;
[0364] An updated security policy is sent to the proxy module, where the updated security policy is generated by the first device based on the traffic quintuple information of the abnormal traffic sent by the second device and the processed abnormal traffic log.
[0365] In addition, a specific embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the security protection method applied to a virtual machine as described in any one of the above, or the steps of the security protection method applied to a first device as described in any one of the above, or the steps of the security protection method applied to a second device as described in any one of the above are implemented.
[0366] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0367] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0368] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the sending and receiving methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0369] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A safety protection method, characterized in that: Applied to a virtual machine, the method comprises: Acquire the traffic quintuple information of the virtual machine through the extended Berkeley packet filter eBPF program of the virtual machine; By means of the eBPF program, the acquired traffic quintuple information of the virtual machine is filtered according to the security policy to identify abnormal traffic; Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
2. The safety protection method according to claim 1, characterized in that: The step of obtaining the traffic quintuple information of the virtual machine through the extended Berkeley packet filter eBPF program of the virtual machine includes: Obtaining traffic quintuple information of the virtual machine through the eBPF program; Sending the traffic quintuple information to the storage and data retrieval module of the virtual machine through the eBPF program; The flow quintuple information of the virtual machine is obtained from the storage and data retrieval module through the proxy module.
3. The safety protection method according to claim 1, characterized in that: In the case where the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, the method further includes: Sending first information to the second device through the proxy module, where the first information includes the identity of the first virtual network function VNF, the identity of the virtual machine, and the traffic quintuple information; Among them, the first VNF includes the virtual machine; the first VNF is a VNF connected to the first device.
4. The safety protection method according to claim 1, characterized in that: Before obtaining the traffic quintuple information of the virtual machine through the extended Berkeley packet filter eBPF program of the virtual machine, the method further includes: Storing the security policy in a storage and data retrieval module of the virtual machine through the proxy module; The security policy is obtained from the storage and data retrieval module through the eBPF program.
5. The safety protection method according to claim 1, characterized in that: The method further comprises: When abnormal traffic is identified, generating an abnormal traffic log according to the abnormal traffic; The traffic quintuple information of the abnormal traffic and the abnormal traffic log are stored in the storage and data retrieval module of the virtual machine through the eBPF program; Preprocessing the traffic quintuple information of the abnormal traffic and the abnormal traffic log by the proxy module to obtain the processed traffic quintuple information of the abnormal traffic and the processed abnormal traffic log; Sending second information to the second device through the proxy module, the second information including the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the VNF includes the virtual machine; the first VNF is a VNF connected to the first device; Receiving an updated security policy sent by the first device through the proxy module; the updated security policy is generated by the first device according to the traffic quintuple information of the abnormal traffic in the second information sent by the second device and the processed abnormal traffic log, or the updated security policy is pre-configured by the first device; Obtaining the updated security policy from the storage and data retrieval module through the eBPF program; The eBPF program is used to filter the acquired traffic quintuple information of the virtual machine according to the updated security policy.
6. A safety protection method, characterized in that: Applied to a first device, the method includes: sending a security policy to a second device; Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device, the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
7. The safety protection method according to claim 6, characterized in that: The sending the security policy to the second device includes: Sending third information to the second device, the third information including the security policy, the identity of the first virtual network function VNF and the identity of the virtual machine; Among them, the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
8. The safety protection method according to claim 6, characterized in that: In the case where the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, the method further includes: Receive first information sent by the second device, where the first information includes an identity of the first VNF, an identity of the virtual machine, and traffic quintuple information of the virtual machine; The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
9. The safety protection method according to claim 8, characterized in that: The method further comprises: Learning according to the first information obtains network topology information, wherein the network topology information includes: a first VNF, an identity of the first VNF, a virtual machine in the first VNF, an identity of each of the virtual machines, a connection relationship between the first VNFs, and a connection relationship between the virtual machines; Among them, the first VNF is a VNF connected to the first device.
10. The safety protection method according to claim 6, characterized in that: The method further comprises: Receive the filtered traffic quintuple information sent by the second device; the filtered traffic quintuple information is sent by the virtual machine to the second device through the proxy module, and the filtered traffic quintuple information is obtained by filtering the acquired traffic quintuple information of the virtual machine according to the security policy through the extended Berkeley packet filter eBPF program of the virtual machine; Learning the filtered traffic quintuple information to obtain a learning result; When the learning result indicates that the filtered traffic quintuple information complies with the network topology information and the security policy, it is determined to continue receiving the filtered traffic quintuple information sent by the second device.
11. The safety protection method according to claim 6, characterized in that: The method further comprises: When the virtual machine filters the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program and identifies abnormal traffic, the second information sent by the second device is received; the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the first VNF includes the virtual machine; the first VNF is the VNF connected to the first device; the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log are obtained by the virtual machine through the proxy module to pre-process the traffic quintuple information and the abnormal traffic log of the abnormal traffic; the abnormal traffic log is generated by the virtual machine according to the abnormal traffic through the eBPF program; Generate an updated security policy based on the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log, or generate alarm information based on the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log; When an updated security policy is generated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log, the updated security policy is sent to the second device.
12. The safety protection method according to claim 11, characterized in that: The generating an updated security policy according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log includes: In the case where there is a second VNF, and the second VNF includes a virtual machine, generating the updated security policy according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log; the second VNF is a VNF connected to the first device after the first VNF; The network topology information is updated according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log.
13. The safety protection method according to claim 11, characterized in that: The generating of alarm information according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log includes: In the absence of the second VNF or in the case where the traffic generated by the VM in the second VNF is different from the abnormal traffic, generating the alarm information according to the traffic quintuple information of the abnormal traffic and the processed abnormal traffic log; Among them, the second VNF is a VNF connected to the first device after the first VNF.
14. A safety protection method, characterized in that: Applied to the second device, the method includes: Receive a security policy sent by a first device; the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is obtained by the virtual machine through an extended Berkeley packet filter eBPF program, sent to the second device through a proxy module of the virtual machine, and sent by the second device to the first device; The security policy is sent to the proxy module of the virtual machine.
15. The safety protection method according to claim 14, characterized in that: In the case where the security policy is generated by the first device according to the traffic quintuple information of the virtual machine, the method further includes: Receive first information sent by the virtual machine through the proxy module, where the first information includes an identity of a first virtual network function VNF, an identity of the virtual machine, and the traffic quintuple information; Among them, the first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
16. The safety protection method according to claim 14, characterized in that: The receiving the security policy sent by the first device includes: receiving third information sent by the first device; The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine; The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
17. The safety protection method according to claim 14, characterized in that: The sending the security policy to the proxy module of the virtual machine includes: Sending the security policy to the proxy module of the virtual machine according to the identity of the first VNF and the identity of the virtual machine in the third information; The third information includes the security policy, the identity of the first VNF and the identity of the virtual machine; The first VNF includes the virtual machine, and the first VNF is a VNF connected to the first device.
18. The safety protection method according to claim 14, characterized in that: The method further comprises: Receiving filtered traffic quintuple information sent by the virtual machine through the proxy module; Sending the filtered traffic quintuple information to the second device; The filtered traffic quintuple information is obtained by filtering the traffic quintuple information of the virtual machine obtained by the virtual machine through the eBPF program according to the security policy.
19. The safety protection method according to claim 18, characterized in that: The method further comprises: When the virtual machine filters the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program and identifies abnormal traffic, the second information sent by the proxy module is received, wherein the second information includes the traffic quintuple information of the processed abnormal traffic, the processed abnormal traffic log, the identity of the first VNF and the identity of the virtual machine; the first VNF includes the virtual machine, and the first VNF is the VNF connected to the first device; the traffic quintuple information of the processed abnormal traffic and the processed abnormal traffic log are obtained by the virtual machine through the proxy module pre-processing the traffic quintuple information and the abnormal traffic log of the abnormal traffic; the abnormal traffic log is generated by the virtual machine according to the abnormal traffic through the eBPF program; An updated security policy is sent to the proxy module, where the updated security policy is generated by the first device based on the traffic quintuple information of the abnormal traffic sent by the second device and the processed abnormal traffic log.
20. A safety protection device, characterized in that: Applied to a virtual machine, the device comprises: A first acquisition module, configured to acquire traffic quintuple information of the virtual machine through an extended Berkeley packet filter eBPF program of the virtual machine; A first filtering module is used to filter the acquired traffic quintuple information of the virtual machine according to the security policy through the eBPF program to identify abnormal traffic; Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device; the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
21. A safety protection device, characterized in that: Applied to a first device, the apparatus comprises: A first sending module, used to send a security policy to a second device; Among them, the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is pre-configured by the first device, the traffic quintuple information of the virtual machine is sent by the virtual machine to the second device through the proxy module, and the second device sends it to the first device; the security policy is sent by the first device to the second device, and the second device sends it to the proxy module of the virtual machine.
22. A safety protection device, characterized in that: Applied to a second device, the apparatus comprises: A first receiving module, configured to receive a security policy sent by a first device; the security policy is generated by the first device according to the traffic quintuple information of the virtual machine or the security policy is preconfigured by the first device; the traffic quintuple information of the virtual machine is obtained by the virtual machine through an extended Berkeley packet filter eBPF program, sent to the second device through a proxy module of the virtual machine, and sent by the second device to the first device; The second sending module is used to send the security policy to the proxy module of the virtual machine.
23. A virtual machine, comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the steps in the security protection method as described in any one of claims 1 to 5 are implemented.
24. An electronic device, the electronic device being a first device, comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the steps in the security protection method as described in any one of claims 6 to 13 are implemented.
25. An electronic device, the electronic device being a second device, comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the steps in the security protection method as described in any one of claims 14 to 19 are implemented.
26. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by the processor, it implements the steps in the security protection method as described in any one of claims 1 to 5, or implements the steps in the security protection method as described in any one of claims 6 to 13, or implements the steps in the security protection method as described in any one of claims 14 to 19.
Citation Information
Patent Citations
Method and device for obtaining data packet in network
CN104184659A
Flood attack defense method, device and system and storage medium
CN111355686A
Virtual machine security reinforcement method and device and storage medium
CN113961910A
Virtual machine data transmission method and device based on eBPF, equipment and storage medium
CN115589383A
Secure control of packet filter programs by user space processes in virtual machines
US20230140827A1
