Cloud native network strategy generation method and device based on threat matrix
Through the combination of CNI plug-in API and MITER ATT&CK threat matrix, cloud native network policies are automatically generated, which solves the problem of manual configuration complexity in cloud native environments and improves security and defense capabilities.
Patent Information
- Application Number
- CN202410568794.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-08-23
AI Technical Summary
In a cloud-native environment, manually configuring and maintaining network policies for microservices is complex and impractical, making it difficult to achieve automated network isolation and security assessment, especially in the face of multiple attack surfaces.
Collect data from the Kubernetes environment through the CNI plug-in API, use the MITER ATT&CK threat matrix for security assessment, automatically generate L3/L4/L7 level network policies, and combine automated scripts for security inspection and policy optimization.
It realizes automatic generation of network policies, improves the security of the cloud native environment, reduces the complexity and error rate of manual configuration, and enhances defense capabilities against multiple attack surfaces.
Smart Images

Figure CN118540108A
Abstract
Description
Technical Field
[0001] The present invention discloses a method and device for generating a cloud native network strategy based on a threat matrix, and relates to cloud native Kubernetes container platform technology and network security fields. Background Art
[0002] Cloud native technology is a set of methods and tools used to build and run applications that can be effectively expanded in a cloud environment. These technologies take advantage of the flexibility, scalability, and elasticity of cloud computing. The main features include: Containerization: Applications and their dependencies are packaged in lightweight containers, which improves the portability and efficiency of applications; Microservice architecture: Applications are decomposed into small, independent services, each of which performs a single business function; Dynamic management: Application deployment and expansion can be managed automatically, usually using container orchestration tools such as Kubernetes; Kubernetes is the mainstream container orchestration and scheduling tool for solving enterprise business cloud scenarios, providing computing, storage, and network resources for applications running on it.
[0003] Threat matrices, such as MITRE ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge), are a globally accessible knowledge base of adversary tactics and techniques based on real-world observations, with different versions for different scenarios. The knowledge base is used as a basis for the development of specific threat models and methods by governments, cybersecurity product and service communities. It provides a common classification system for offense and defense, and has become a useful conceptual tool in many areas of cybersecurity for communicating threat intelligence, testing through red team testing or adversary emulation, and improving the ability of networks and systems to resist intrusions.
[0004] CNI (Container Network Interface) assigns IP addresses to Pods and is the network interface of Pods. In the k8s environment, network policies can be implemented through the Cilium network plug-in that supports Network Policy, which can be used to implement 3-layer or 4-layer separation for applications deployed on the platform to make corresponding network security restrictions at 3-layer or 4-layer. The Cilium network plug-in also meets the 7-layer separation and can apply network isolation policies based on precise and fine-grained control of network policy templates. Network policies play a vital role in cloud-native environments. They define the communication rules between microservices and containers. These policies can: isolate and control traffic: ensure that only authorized services can communicate to prevent unauthorized access; implement security principles: such as the principle of least privilege, limit network access to services; adaptability and dynamism: as services are automatically expanded and reduced, network policies also need to be automatically updated to adapt to these changes.
[0005] Users have different requirements for network isolation, network resource control, etc. of containers. At the same time, the communication between microservices is exposed through the network, which may pose a potential attack surface. It is impractical to manually configure and maintain access control policies for thousands of microservices. Their frequent iterations also require policies to be updated accordingly in a timely manner, which is impractical for manual configuration.
[0006] As can be seen from the above, how to automatically identify and obtain cloud-native related components and configuration information, and correctly use the threat matrix to perform security assessments based on these contents, and ultimately obtain correct network policies at different levels to avoid the difficulty and complexity of manual configuration, is a problem to be solved in this field. Summary of the invention
[0007] In view of the above problems, the present invention provides a method and device for generating a cloud native network strategy based on a threat matrix.
[0008] The technical solution adopted by the present invention is as follows:
[0009] A method for generating a cloud native network policy based on a threat matrix includes the following steps:
[0010] Leverage the CNI plugin API to collect data from cloud-native Kubernetes environments;
[0011] Perform a security assessment of the collected data using the MITRE ATT&CK Threat Matrix as a guide;
[0012] Based on the results of security assessment, corresponding network policies are automatically generated.
[0013] Furthermore, the use of the CNI plug-in API to collect data from the cloud-native Kubernetes environment includes:
[0014] Collect endpoints and services information of microservices;
[0015] Analyze the CNI plug-in log and obtain the HTTP communication path and HTTP method of the microservice;
[0016] Extract key configuration information from the YAML configuration file of the microservice, including Deployment and Secrets.
[0017] Furthermore, the MITRE ATT&CK threat matrix is used as a guide to conduct a security assessment of the collected data, including:
[0018] Analyze various attack tactics described in the MITRE ATT&CK threat matrix and map them to possible security threats in the network environment;
[0019] Analyze multiple attack surfaces that may exist in the network environment based on the attack tactics described in the threat matrix;
[0020] Formulate security assessment rules corresponding to various attack surfaces to detect and defend against possible security threats;
[0021] After developing security assessment rules, use automated scripts to conduct security checks on the network environment to identify potential security risks;
[0022] Analyze and summarize the results of security checks, optimize security assessment rules, and regularly update security assessment rules based on the threat matrix to respond to emerging security threats and attack techniques.
[0023] Furthermore, the analysis of multiple attack surfaces that may exist in the network environment based on the attack tactics described in the threat matrix is to identify and evaluate various threat factors that may lead to security vulnerabilities by comprehensively considering the communication mode, configuration information and potential security risks of microservices, including: externally exposed port checks, kubectl exec command execution permission checks, bash execution checks in containers, sidecar injection checks, backdoor container checks, access to cloud resources checks, domain name hijacking checks, access to API Server checks, lateral movement checks within clusters, CoreDNS poisoning checks, etc. Furthermore, the use of automated scripts to perform security checks on the network environment includes: externally exposed port checks, container execution permission checks, network traffic analysis, etc.
[0024] Furthermore, the automatic generation of corresponding network policies based on the results of the security assessment includes: obtaining information about each component of the running cluster through the results of the security assessment, including the network configuration, access rights, security vulnerabilities, abnormal behaviors, and log and monitoring data of each component, and then comprehensively analyzing the interactions based on HTTP and non-HTTP to integrate and merge the network policies.
[0025] Furthermore, the integration and merging of network strategies includes:
[0026] a) Policy integration with the same source and purpose: For policies with the same source and purpose, they are integrated together to form a more comprehensive policy rule;
[0027] b) Append HTTP request policy: For policies with HTTP requests, append the corresponding HTTP request rules to the original policy rules to ensure that the network policy can cover the security requirements of HTTP requests;
[0028] c) Optimize and simplify policies: After the integration and appending operations are completed, the generated network policies are optimized and simplified to remove duplicate rules and unnecessary details to ensure the clarity and efficiency of the network policies.
[0029] Furthermore, the network policy is divided into L3 layer policy, L4 layer policy and L7 layer policy, covering different security requirements from the network layer to the application layer; the L3 layer policy includes access control rules for IP addresses and subnets; the L4 layer policy involves restrictions on ports and protocols at the transport layer; the L7 layer policy performs fine-grained control on specific HTTP requests and methods at the application layer.
[0030] Furthermore, for HTTP-based interactions, analyze HTTP requests and HTTP methods, consolidate and merge identical HTTP requests, check for potential malicious activities or insecure API calls, and generate L7 policies based on the principle of least privilege, where the principle of least privilege refers to granting users or entities the least privilege required to complete a task.
[0031] A cloud native network policy generation device based on a threat matrix, comprising:
[0032] Data collection module, which is used to collect data from cloud-native Kubernetes environments using the CNI plugin API;
[0033] A processing module for performing security assessments on the collected data using the MITRE ATT&CK threat matrix as a guide;
[0034] The policy generation module is used to automatically generate corresponding network policies based on the results of security assessment.
[0035] The beneficial effects of the present invention are as follows:
[0036] The present invention discloses a cloud-native network policy generation method and device based on a threat matrix, which relates to cloud-native Kubernetes container platform technology and network security fields. First, based on the cloud-native CNI plug-in API, the Endpoints and Services data of the running microservices are obtained, and based on the CNI plug-in log, the microservice HTTP call path, method, etc. are obtained, and finally, the Deployment, Secrets and other configuration information of the microservice are obtained according to the microservice YAML file. Then, using the ATT&CK threat matrix, according to the definition of K8s security in the matrix, it is divided into different attack surfaces such as initial access, execution, persistence, and privilege escalation, and the cloud-native microservice component information obtained above is security evaluated according to different attack surfaces. The threat matrix proposes different mitigation methods (here, mitigation methods refer to solutions or measures proposed for a certain technical field or problem, aiming to reduce or eliminate the negative impact or risks that may be brought about by the technical field or problem. In the context of the MITRE ATT&CK threat matrix of Kubernetes, mitigation methods refer to a series of response strategies or measures proposed for specific security threats that the Kubernetes platform may face, aiming to reduce potential security risks and ensure the security of the Kubernetes platform. Then, based on the results of the security assessment and in accordance with the mitigation methods of the threat matrix, corresponding L3 / L4 / L7 network policies are generated for cloud-native microservice components. The present invention provides a method for automatically generating network policies, which improves the security of cloud-native microservice components in operation and avoids errors that may be caused by complex manual configuration of microservice-related network policies. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flow chart of a cloud native network policy generation method based on threat matrix.
[0038] Figure 2 It is a specific structure diagram of a cloud native network policy generation method based on a threat matrix.
[0039] Figure 3 It is a specific workflow diagram of a data acquisition module.
[0040] Figure 4 It is a specific workflow diagram of a processing module and a strategy generation module. DETAILED DESCRIPTION
[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below through specific embodiments and drawings.
[0042] Figure 1 The overall process of a threat matrix-based cloud native network policy generation method is shown. The following is a detailed description based on the content of the flowchart:
[0043] 1. Data collection: The process starts with collecting data from the cloud-native Kubernetes environment using the CNI plugin API. This data includes the Endpoints and Services information of the microservices, which is critical for understanding the network interface and service discovery mechanism of each microservice. In addition, the process also involves analyzing the CNI plugin logs to obtain information such as the HTTP communication path and HTTP method of the microservices, which helps to identify the interaction patterns between microservices. At the same time, the process also includes extracting key configuration information such as Deployment and Secrets from the YAML configuration files of the microservices, which provides a detailed background for understanding the deployment structure and sensitive data management of the microservices.
[0044] Among them, Endpoints is the network endpoint of Kubernetes service, which is used to identify the access address and port of the service, indicating the location of the service on the virtual network and how to access the service. Services is a resource object in Kubernetes, which is used to define a set of logically related Pods and provide them with a stable access address and port, which can realize functions such as load balancing, service discovery and internal communication, and provide an abstract access method for applications, so that applications can communicate without caring about the specific implementation details of the underlying Pod. YAML is a lightweight data serialization language, mainly used for configuration files and data exchange formats, which represents data structures in the format of indentation, line units and key-value pairs. It has a concise and clear syntax structure, which is suitable for processing and parsing in multiple programming languages, and is often used to configure Kubernetes objects. Deployment is a resource object used to define and manage the deployment and upgrade of applications. It is responsible for managing the creation, update and expansion and contraction of Pods to ensure the stable operation of applications in the cluster. Secrets is a resource object used to store sensitive data. It can be used to store sensitive information such as passwords, keys, tokens, etc. for application use.
[0045] 2. Security Assessment: Next, use the ATT&CK threat matrix as a guide to conduct a security assessment on the collected data. This assessment focuses on identifying different attack surfaces that may affect Kubernetes security, such as initial access, execution, persistence, and privilege escalation. In this step, the communication patterns, configuration information, and potential security risks of microservices are comprehensively considered to identify and assess various threat factors that may lead to security vulnerabilities.
[0046] 3. Policy generation: Finally, based on the results of the security assessment, the system will automatically generate the corresponding network policies. These policies are divided into L3, L4, and L7 layers to cover different security requirements from the network layer to the application layer. L3 layer policies include access control rules for IP addresses and subnets; L4 layer policies involve port and protocol restrictions at the transport layer; and L7 layer policies provide fine-grained control over specific HTTP requests and methods at the application layer. This policy generation process not only takes into account the current network security environment, but also foresees potential threat developments, ensuring that as the cloud native environment evolves, the policies can adapt and provide continuous protection.
[0047] Combining the above steps, this method provides an automated and comprehensive way to enhance the network security of microservices in cloud native environments. By integrating real-time data collection, in-depth security assessments, and dynamic policy generation based on threat matrices, this technology can significantly improve the security protection capabilities of enterprise cloud environments, reduce complexity, and reduce the possibility of human configuration errors.
[0048] The architecture diagram of the entire method of the present invention is as follows Figure 2 As shown in the figure, the system architecture and structure of a cloud native network policy generation method based on threat matrix are shown in the figure. The system architecture is divided into data acquisition module, processing module and policy generation module.
[0049] The following is a description of the architecture diagram:
[0050] 1. Data collection module: This part is mainly composed of work nodes, which run kubelet and kube-proxy, which are important components responsible for managing containers and network proxies in the Kubernetes cluster. The CNI plug-in container works closely with these components to collect information about Endpoints and Services through the CNI plug-in API interface, which provides a basis for understanding the network connection and service discovery mechanism between microservices. At the same time, the CNI plug-in is also responsible for obtaining the HTTP method of the microservice, which is the key to understanding the HTTP communication behavior between microservices. In addition to collecting Endpoints and Services information and HTTP methods through the CNI plug-in API, it also includes the collection of CNI logs and YAML configuration files:
[0051] CNI log collection: The system collects log data generated by the CNI plug-in, which is critical for understanding the network status and behavior patterns of microservices at runtime. Log data can reveal abnormal or normal behavior at the network level and provide valuable information for subsequent security assessments.
[0052] YAML configuration file collection: The system also parses the YAML configuration files of specific microservices running in Kubernetes, especially Deployments related to microservice deployment and Secrets configurations containing sensitive data. These configuration files contain detailed deployment information of microservices, such as the number of replicas, resource requests and limits, and sensitive data required by the service, such as passwords or API keys.
[0053] 2. Processing module: The processing module receives data provided by the data collection module, including network information and HTTP methods provided by the CNI plug-in API on the working node, as well as Deployment and Secrets information in the YAML configuration file. This module is responsible for performing security assessments on the collected data, using the threat matrix as an assessment guide to identify possible security vulnerabilities and attack surfaces.
[0054] 3. Policy generation module: After the processing module analyzes and evaluates the data, the policy generation module will generate corresponding network security policies based on the evaluation results. These policies can be L3 network policies, which involve access control at the IP layer; L4 network policies, which deal with port and protocol access control at the transport layer; and L7 network policies, which are used for control of HTTP requests and methods at the application level.
[0055] In this architecture, each module plays a specific role and works together to improve the security of microservices in a cloud-native environment. The data acquisition module ensures that information about system status and communication patterns is obtained in real time and accurately; the processing module is responsible for using this data to conduct in-depth analysis of system security; and the policy generation module uses the analysis results to strengthen network defense measures to defend against known and potential network attacks.
[0056] Figure 3 It is a specific workflow of the data collection module, which is used to obtain necessary information from the cloud native Kubernetes environment for subsequent security assessment and network policy generation. The following is a detailed description of each step in the flowchart:
[0057] CNI plugin API data collection: The process starts with collecting Endpoints and Services data through the CNI plugin API. This step is to obtain network endpoint information of running microservices and related data of service discovery, which is crucial to understanding how microservices communicate with each other in a Kubernetes cluster. At the same time, for running microservices, a lot of information such as the internal IP under its endpoint may change with the migration and destruction of microservices. Therefore, unlike static configuration, this part of the data needs to be obtained in a dynamic way, and CNI plugin is a better way to achieve it.
[0058] K8s component configuration file collection: Next, the process includes collecting the configuration information of microservices, which involves various Kubernetes resource objects, such as Pod, Deployment, DaemonSet, ReplicaSet, Namespace, and Ingress. This information provides a deployment description of microservices and how they are exposed and routed in the cluster.
[0059] Sensitive information collection of K8s components: The process also includes collecting security-related configuration information, such as ServiceAccount, Role, ClusterRole, RoleBinding, ClusterRoleBinding, Secret, and PersistentVolume. This provides a basis for evaluating the security of microservices, because these configurations determine the service permissions, access control, and management of sensitive data.
[0060] CNI plugin log analysis: In this step, the system analyzes the logs generated by the CNI plugin to determine whether there are HTTP-based calls between microservices. If HTTP calls are detected, the system will further analyze the paths and methods of these calls.
[0061] Collection of HTTP paths and methods: When it is confirmed that the communication is based on HTTP, the system will extract the specific HTTP request path and method, as well as HTTP request headers, request bodies and other related information from the CNI plugin log. This provides detailed information for understanding how microservices interact with each other through the HTTP protocol.
[0062] In summary, the flowchart shows a complex data acquisition process that collects comprehensive information about the network communication and configuration of microservices from a cloud-native environment, which is then used for security assessment and network policy generation.
[0063] Figure 4 It shows a workflow of a processing module and a policy generation module that uses a threat matrix as a security guide. The main task of this module is to analyze and evaluate the microservice network interactions in a cloud-native Kubernetes environment and generate corresponding security policies accordingly. The following is a description of the specific steps of the flowchart:
[0064] Based on the data used for security assessment obtained in the previous step, first determine whether the data belongs to HTTP-based interaction or non-HTTP interaction.
[0065] If the interaction is based on HTTP, the policy generation module will analyze HTTP requests and methods, consolidate and merge identical HTTP requests, check for potential malicious activities or unsafe API calls, and generate L7 network policies based on the principle of least privilege. The principle of least privilege refers to a security strategy whose core idea is to give users or entities the least privileges they need to complete their tasks. This means that users or entities can only obtain the minimum permissions necessary to perform their work, rather than giving them full permissions or access to all resources. Formulating HTTP requests based on the principle of least privilege can effectively reduce the attack surface of the system, prevent misoperation and security vulnerabilities, improve the security and stability of the system, reduce potential risks and losses, and meet compliance requirements.
[0066] For non-HTTP interactions, the processing module uses a variety of methods to analyze and conduct security assessments. This assessment is guided by the threat matrix. The specific implementation process usually includes the following steps:
[0067] 1) Matrix analysis: First, analyze the MITRE ATT&CK threat matrix in detail, understand and input the various attack tactics and techniques described in it, and map them to the security threats that may exist in the network environment.
[0068] 2) Attack surface analysis: Based on the attack tactics described in the threat matrix, analyze multiple attack surfaces that may exist in the network environment, including but not limited to externally exposed port checks, kubectl exec command execution permission checks, bash execution checks in containers, sidecar injection checks, backdoor container checks, cloud resource access checks, domain name hijacking checks, API Server access checks, lateral movement checks within clusters, CoreDNS poisoning checks, etc. This step takes into account a variety of penetration methods that attackers may use, such as directly accessing the container to execute commands or attacks at the network level.
[0069] 3) Security assessment rule formulation: After understanding various attack surfaces, formulate corresponding security assessment rules to detect and defend against possible security threats. These rules are usually based on the attack techniques described in the threat matrix and the characteristics of the actual cluster environment.
[0070] 4) Implement security checks: After developing security assessment rules, use automated scripts to perform security checks on the network environment. These checks can include checking exposed ports, checking container execution permissions, and analyzing network traffic to identify potential security risks.
[0071] 5) Continuous improvement: Analyze and summarize the inspection results to further optimize the security assessment rules. At the same time, regularly update the security assessment rules based on the threat matrix to respond to emerging security threats and attack techniques.
[0072] Through the above steps, the team can use the security matrix to guide security assessment and defense work, timely discover and respond to potential security threats, and ensure the security and stability of the network environment.
[0073] Through the security assessment results, we can get the information of each component of the running cluster, including but not limited to the network configuration, access rights, security vulnerabilities, abnormal behavior, logs and monitoring data of each component. These component information provides a comprehensive understanding of the overall security status of the cluster and provides an important basis for the policy generation module. After comprehensive analysis of HTTP and non-HTTP interactions, the policy generation module will perform the integration and merging of duplicate policies, which can be carried out in the following steps:
[0074] a) Policy integration with the same source and destination: First, for policies with the same source and destination, such as communication or access rights between two components, they are integrated together and merged into a more comprehensive policy rule.
[0075] b) Append HTTP request policy: For policies that have HTTP requests, such as components that need to communicate with Web services, append the corresponding HTTP request rules to the original policy rules to ensure that the network policy can cover the security requirements of HTTP requests.
[0076] c) Optimize and simplify policies: After the integration and appending operations are completed, the generated network policies are optimized and simplified to remove duplicate rules and unnecessary details to ensure the clarity and efficiency of the network policies.
[0077] Through the above steps, the network policies can be integrated and merged to ensure that the generated network policies can fully cover the security requirements of each component in the cluster and effectively defend against various network attacks and security threats. Ultimately, the system will generate network policies at different levels. This includes:
[0078] L3 network policy: may involve access control at the IP layer.
[0079] L4 network policy: involves the transport layer, such as access control of TCP / UDP ports.
[0080] L7 network policy: application layer policy, such as HTTP request path, method, request body, request header, etc.
[0081] In summary, Figure 4The workflow shown shows how to combine real-time monitoring data and security knowledge of the threat matrix to dynamically generate fine-grained network security policies for microservices. This process not only enhances the security of microservices, but also improves the ability to fight against advanced persistent threats (APT) and other network attacks.
[0082] Another embodiment of the present invention provides a cloud native network policy generation device based on a threat matrix, comprising:
[0083] Data collection module, which is used to collect data from cloud-native Kubernetes environments using the CNI plugin API;
[0084] A processing module for performing security assessments on the collected data using the MITRE ATT&CK threat matrix as a guide;
[0085] The policy generation module is used to automatically generate corresponding network policies based on the results of security assessment.
[0086] The specific implementation process of each module refers to the above description of the method of the present invention.
[0087] Another embodiment of the present invention provides a computer device (computer, server, smart phone, etc.), which includes a memory and a processor, the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program includes instructions for executing each step in the method of the present invention.
[0088] Another embodiment of the present invention provides a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk), wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the steps of the method of the present invention are implemented.
[0089] The specific embodiments of the present invention disclosed above are intended to help understand the content of the present invention and implement it accordingly. It can be understood by those skilled in the art that various replacements, changes and modifications are possible without departing from the spirit and scope of the present invention. The present invention should not be limited to the contents disclosed in the embodiments of this specification, and the scope of protection of the present invention shall be subject to the scope defined in the claims.
Claims
1. A cloud native network policy generation method based on threat matrix, characterized in that: The following steps are involved: Leverage the CNI plugin API to collect data from cloud-native Kubernetes environments; Perform a security assessment of the collected data using the MITRE ATT&CK Threat Matrix as a guide; Based on the results of security assessment, corresponding network policies are automatically generated.
2. The method according to claim 1, characterized in that The CNI plugin API is used to collect data from the cloud-native Kubernetes environment, including: Collect endpoints and services information of microservices; Analyze the CNI plug-in log and obtain the HTTP communication path and HTTP method of the microservice; Extract key configuration information from the YAML configuration file of the microservice, including Deployment and Secrets.
3. The method according to claim 1, characterized in that The MITRE ATT&CK threat matrix is used as a guide to conduct a security assessment of the collected data, including: Analyze various attack tactics described in the MITRE ATT&CK threat matrix and map them to possible security threats in the network environment; Analyze multiple attack surfaces that may exist in the network environment based on the attack tactics described in the threat matrix; Formulate security assessment rules corresponding to various attack surfaces to detect and defend against possible security threats; After developing security assessment rules, use automated scripts to conduct security checks on the network environment to identify potential security risks; Analyze and summarize the results of security checks, optimize security assessment rules, and regularly update security assessment rules based on the threat matrix to respond to emerging security threats and attack techniques.
4. The method according to claim 3, characterized in that: The analysis of multiple attack surfaces that may exist in the network environment according to the attack tactics described in the threat matrix is to identify and evaluate various threat factors that may cause security vulnerabilities by comprehensively considering the communication mode, configuration information and potential security risks of microservices, including: externally exposed port check, kubectl exec command execution permission check, bash execution check in the container, sidecar injection check, backdoor container check, access to cloud resources check, domain name hijacking check, access to API Server check, lateral movement check within the cluster, CoreDNS poisoning check; the use of automated scripts to perform security checks on the network environment includes: externally exposed port checks, container execution permission checks, and network traffic analysis.
5. The method according to claim 1, characterized in that: The automatic generation of corresponding network policies based on the security assessment results includes: The security assessment results provide information about each component of the running cluster, including network configuration, access rights, security vulnerabilities, abnormal behaviors, and log and monitoring data of each component. Then, the interactions based on HTTP and non-HTTP are comprehensively analyzed to integrate and merge network policies. The integration and merging of network policies include: a) integration of policies with the same source and destination: integrating policies with the same source and destination into a more comprehensive policy rule; b) appending HTTP request policies: for policies with HTTP requests, appending corresponding HTTP request rules to the original policy rules to ensure that the network policy can cover the security requirements of HTTP requests; c) optimizing and simplifying policies: after the integration and appending operations are completed, optimizing and simplifying the generated network policies, removing duplicate rules and unnecessary details, and ensuring the clarity and efficiency of the network policies.
6. The method according to claim 1 or 5, characterized in that: The network policy is divided into L3 layer policy, L4 layer policy and L7 layer policy, covering different security requirements from the network layer to the application layer; the L3 layer policy includes access control rules for IP addresses and subnets; the L4 layer policy involves port and protocol restrictions at the transport layer; the L7 layer policy performs fine-grained control on specific HTTP requests and methods at the application layer.
7. The method according to claim 6, characterized in that For HTTP-based interactions, analyze HTTP requests and HTTP methods, consolidate and merge identical HTTP requests, check for potential malicious activities or insecure API calls, and generate L7 policies based on the principle of least privilege, which is to give users or entities the least privilege required to complete a task.
8. A cloud native network policy generation device based on threat matrix, characterized in that: include: Data collection module, which is used to collect data from cloud-native Kubernetes environments using the CNI plugin API; A processing module for performing security assessments on the collected data using the MITRE ATT&CK threat matrix as a guide; The policy generation module is used to automatically generate corresponding network policies based on the results of security assessment.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Anti-DDoS strategy automation method based on cloud native system
CN119210780A
An automated anti-DDoS strategy method based on cloud native systems
CN119210780B
Methods for application security testing
US20250310364A1
