CN119442282B - Cluster detection method, device, equipment, medium and product - Google Patents
Cluster detection method, device, equipment, medium and product Download PDFInfo
- Publication number
- CN119442282B CN119442282B CN202411546406.XA CN202411546406A CN119442282B CN 119442282 B CN119442282 B CN 119442282B CN 202411546406 A CN202411546406 A CN 202411546406A CN 119442282 B CN119442282 B CN 119442282B
- Authority
- CN
- China
- Prior art keywords
- cluster
- container
- container group
- service account
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/604—Tools and structures for managing or administering access control systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/71—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
- G06F21/74—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/105—Multiple levels of security
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Automation & Control Theory (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Storage Device Security (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及计算机技术领域,尤其涉及一种集群检测方法、装置、电子设备、计算机可读存储介质以及计算机程序产品。The present application relates to the field of computer technology, and in particular to a cluster detection method, device, electronic device, computer-readable storage medium, and computer program product.
背景技术Background Art
随着计算机技术的不断发展,计算集群应运而生。计算集群通常由多个计算节点组成,多个计算节点协同工作,提供高性能的计算能力。With the continuous development of computer technology, computing clusters have emerged. Computing clusters are usually composed of multiple computing nodes, which work together to provide high-performance computing capabilities.
通常情况下,对于计算集群资源的访问和操作依赖于账号实现。例如,计算集群中的账号可以分为代表真实用户的用户账号、代表非真实用户的服务账号(serviceaccount,SA)、集群内部使用的系统账号等。Generally, access and operation of computing cluster resources depend on accounts. For example, accounts in a computing cluster can be divided into user accounts representing real users, service accounts (SA) representing non-real users, and system accounts used within the cluster.
在一些类型的计算集群中,可以基于角色访问控制(role-based accesscontrol,RBAC)机制对计算集群中的账号进行权限管理。具体地,在RBAC机制中,通过定义具有不同权限的角色或集群角色,并将角色或集群角色与账号绑定,为不同的账号分配不同权限。In some types of computing clusters, the permissions of accounts in the computing cluster can be managed based on the role-based access control (RBAC) mechanism. Specifically, in the RBAC mechanism, different permissions are assigned to different accounts by defining roles or cluster roles with different permissions and binding the roles or cluster roles to the accounts.
若具有较高权限的服务账号的相关信息被他人获得,他人可以通过该服务账号对计算集群资源进行访问和操作,由于该服务账号具有较高权限,上述访问和操作行为对于计算集群安全的影响范围较大,可能导致计算集群失陷。因此,以集群维度进行全面的安全检测尤为重要。If the relevant information of a service account with higher permissions is obtained by others, they can access and operate the computing cluster resources through the service account. Since the service account has higher permissions, the above access and operation behaviors have a greater impact on the security of the computing cluster and may cause the computing cluster to be compromised. Therefore, it is particularly important to conduct comprehensive security testing from the cluster dimension.
发明内容Summary of the invention
本申请提供了一种集群检测方法。该方法能够在计算集群运行的过程中,实现集群维度的安全检测。本申请还提供了上述方法对应的装置、电子设备、计算机可读存储介质以及计算机程序产品。The present application provides a cluster detection method. The method can realize cluster-dimensional security detection during the operation of a computing cluster. The present application also provides a device, an electronic device, a computer-readable storage medium, and a computer program product corresponding to the above method.
第一方面,本申请提供了一种集群检测方法,该方法包括:In a first aspect, the present application provides a cluster detection method, the method comprising:
从第一计算集群部署的多个容器组中,确定目标容器组;其中,所述目标容器组基于容器组信息和角色访问控制信息中的至少一种确定;Determine a target container group from multiple container groups deployed in the first computing cluster; wherein the target container group is determined based on at least one of container group information and role access control information;
响应于检测到以下至少一种事件:针对第一容器组中容器的目标文件读取事件和第二容器组中容器触发的关键事件,将与所述第一容器组和所述第二容器组中的至少一种关联的服务账号确定为目标服务账号;其中,所述第一容器组、所述第二容器组为所述目标容器组中的至少一个容器组;In response to detecting at least one of the following events: a target file read event for a container in a first container group and a key event triggered by a container in a second container group, determining a service account associated with at least one of the first container group and the second container group as a target service account; wherein the first container group and the second container group are at least one container group in the target container group;
响应于检测到与所述目标服务账号相关的集群审计事件,确定与所述目标服务账号相关的集群审计事件的安全识别结果;In response to detecting a cluster audit event associated with the target service account, determining a security identification result of the cluster audit event associated with the target service account;
根据所述安全识别结果,生成所述第一计算集群的检测结果。A detection result of the first computing cluster is generated according to the security identification result.
第二方面,本申请提供了一种集群检测装置,该装置包括:In a second aspect, the present application provides a cluster detection device, the device comprising:
第一确定模块,用于从第一计算集群部署的多个容器组中,确定目标容器组;其中,所述目标容器组基于容器组信息和角色访问控制信息中的至少一种确定;A first determination module, configured to determine a target container group from a plurality of container groups deployed in the first computing cluster; wherein the target container group is determined based on at least one of container group information and role access control information;
第二确定模块,用于响应于检测到以下至少一种事件:针对第一容器组中容器的目标文件读取事件和第二容器组中容器触发的关键事件,将与所述第一容器组和所述第二容器组中的至少一种关联的服务账号确定为目标服务账号;其中,所述第一容器组、所述第二容器组为所述目标容器组中的至少一个容器组;a second determination module, configured to, in response to detecting at least one of the following events: a target file read event for a container in the first container group and a key event triggered by a container in the second container group, determine a service account associated with at least one of the first container group and the second container group as a target service account; wherein the first container group and the second container group are at least one container group in the target container group;
识别模块,用于响应于检测到与所述目标服务账号相关的集群审计事件,确定与所述目标服务账号相关的集群审计事件的安全识别结果;an identification module, configured to, in response to detecting a cluster audit event associated with the target service account, determine a security identification result of the cluster audit event associated with the target service account;
检测模块,用于根据所述安全识别结果,生成所述第一计算集群的检测结果。A detection module is used to generate a detection result of the first computing cluster according to the security identification result.
第三方面,本申请提供了一种电子设备,所述电子设备包括处理器和存储器。所述处理器、所述存储器进行相互的通信。所述处理器用于执行所述存储器中存储的指令,以使得电子设备执行如第一方面或第一方面的任一种实现方式中的集群检测方法。In a third aspect, the present application provides an electronic device, the electronic device comprising a processor and a memory. The processor and the memory communicate with each other. The processor is used to execute instructions stored in the memory, so that the electronic device performs the cluster detection method in the first aspect or any implementation of the first aspect.
第四方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,所述指令指示电子设备执行上述第一方面或第一方面的任一种实现方式所述的集群检测方法。In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, wherein the instructions instruct an electronic device to execute the cluster detection method described in the first aspect or any implementation manner of the first aspect.
第五方面,本申请提供了一种包含指令的计算机程序产品,当其在电子设备上运行时,使得电子设备执行上述第一方面或第一方面的任一种实现方式所述的集群检测方法。In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the cluster detection method described in the first aspect or any one of the implementations of the first aspect.
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations.
从以上技术方案可以看出,本申请具有以下优点:It can be seen from the above technical solutions that this application has the following advantages:
本申请提供了一种集群检测方法,该方法首先从第一计算集群的多个容器组中,确定目标容器组,其中,目标容器组基于容器组信息和角色访问控制信息中的至少一种确定,响应于检测到以下至少一种事件:针对第一容器组中容器的目标文件读取事件和第二容器组中容器触发的关键事件,将与第一容器组和第二容器组中的至少一种关联的服务账号确定为目标服务账号,其中,第一容器组、第二容器组为目标容器组中的至少一个容器组,响应于检测到与目标服务账号相关的集群审计事件,确定与目标服务账号相关的集群审计事件的安全识别结果,接着,根据安全识别结果,生成第一计算集群的检测结果。The present application provides a cluster detection method. The method first determines a target container group from multiple container groups of a first computing cluster, wherein the target container group is determined based on at least one of container group information and role access control information. In response to detecting at least one of the following events: a target file read event for a container in the first container group and a key event triggered by a container in the second container group, a service account associated with at least one of the first container group and the second container group is determined as a target service account, wherein the first container group and the second container group are at least one container group in the target container group. In response to detecting a cluster audit event related to the target service account, a security identification result of the cluster audit event related to the target service account is determined. Then, a detection result of the first computing cluster is generated according to the security identification result.
在该方法中,通过识别出计算集群中的目标容器组,结合针对与目标容器组相关的事件,确定出需要关注的目标服务账号。通过检测与目标服务账号相关的集群审计事件,判断目标服务账号是否针对计算集群存在不安全访问或操作行为。如此,在计算集群运行的过程中,实现集群维度的安全检测。In this method, by identifying the target container group in the computing cluster and combining it with events related to the target container group, the target service account that needs attention is determined. By detecting cluster audit events related to the target service account, it is determined whether the target service account has unsafe access or operation behavior against the computing cluster. In this way, cluster-level security detection is achieved during the operation of the computing cluster.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例的技术方法,下面将对实施例中所需使用的附图作以简单地介绍。In order to more clearly illustrate the technical method of the embodiments of the present application, the drawings required for use in the embodiments are briefly introduced below.
图1为本申请实施例提供的一种集群检测系统的架构示意图;FIG1 is a schematic diagram of the architecture of a cluster detection system provided in an embodiment of the present application;
图2为本申请实施例提供的一种集群检测方法的流程示意图;FIG2 is a schematic diagram of a flow chart of a cluster detection method provided in an embodiment of the present application;
图3为本申请实施例提供的一种确定目标容器组的流程示意图;FIG3 is a schematic diagram of a process for determining a target container group provided in an embodiment of the present application;
图4为本申请实施例提供的一种集群检测装置的结构示意图;FIG4 is a schematic diagram of the structure of a cluster detection device provided in an embodiment of the present application;
图5为本申请实施例提供的一种电子设备的结构示意图。FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
本申请实施例中的术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
首先对本申请实施例中所涉及到的一些技术术语和应用场景进行介绍。First, some technical terms and application scenarios involved in the embodiments of this application are introduced.
计算集群通常由多个计算节点组成,多个计算节点协同工作,提供高性能的计算能力。其中,计算节点可以是物理机,也可以是虚拟机。通常情况下,计算集群用于执行数据分析、机器学习、图形渲染等需要大量计算资源和存储资源的复杂计算任务。A computing cluster is usually composed of multiple computing nodes, which work together to provide high-performance computing capabilities. Among them, computing nodes can be physical machines or virtual machines. Usually, computing clusters are used to perform complex computing tasks that require a large amount of computing resources and storage resources, such as data analysis, machine learning, and graphics rendering.
在计算集群中,容器组(POD)是可以被创建和管理的最小单元,换言之,容器组可以理解为计算集群中的基本部署单元。一个容器组中通常封装一个或多个容器,在同一容器组中运行的容器共享网络资源和存储资源。In a computing cluster, a container group (POD) is the smallest unit that can be created and managed. In other words, a container group can be understood as the basic deployment unit in a computing cluster. A container group usually encapsulates one or more containers, and containers running in the same container group share network resources and storage resources.
随着云计算技术的不断发展,越来越多的用户(例如是组织、企业等)采用微服务(micro services)架构进行业务应用程序的部署。在微服务架构中,业务应用程序被分解为多个小型、独立的服务,每个服务实现特定的业务功能。With the continuous development of cloud computing technology, more and more users (such as organizations, enterprises, etc.) are adopting micro services architecture to deploy business applications. In the micro services architecture, business applications are decomposed into multiple small, independent services, each of which implements a specific business function.
微服务架构的业务应用程序可以部署在计算集群中。具体地,业务应用程序的各个服务可以分别打包进计算集群的不同容器中,容器内包括运行各个服务所需的依赖和配置,容器化提供了隔离性,确保不同服务之间的环境一致性,进而提供业务应用程序的可维护性、可扩展性和可靠性。Business applications with microservice architecture can be deployed in computing clusters. Specifically, each service of a business application can be packaged into different containers in the computing cluster. The containers include the dependencies and configurations required to run each service. Containerization provides isolation, ensures environmental consistency between different services, and thus improves the maintainability, scalability, and reliability of business applications.
上述将微服务架构的业务应用程序部署在计算集群中的过程可以由容器编排系统实现。其中,容器编排系统,也可以称作容器编排平台、容器编排引擎,是一种用于在计算集群中自动部署、扩展和管理业务应用程序的软件系统,例如,容器编排系统可以为Kubernetes(K8s)系统。The above process of deploying a microservice architecture business application in a computing cluster can be implemented by a container orchestration system. Among them, the container orchestration system, which can also be called a container orchestration platform or a container orchestration engine, is a software system for automatically deploying, expanding, and managing business applications in a computing cluster. For example, the container orchestration system can be a Kubernetes (K8s) system.
通常情况下,对于计算集群资源的访问和操作依赖于账号实现。例如,计算集群中的账号可以分为代表真实用户的用户账号、代表非真实用户的服务账号(serviceaccount,SA)、集群内部使用的系统账号等。Generally, access and operation of computing cluster resources depend on accounts. For example, accounts in a computing cluster can be divided into user accounts representing real users, service accounts (SA) representing non-real users, and system accounts used within the cluster.
在一些类型的计算集群(例如是K8s集群)中,可以基于角色访问控制(role-basedaccess control,RBAC)机制对计算集群中的账号进行权限管理。具体地,在RBAC机制中,通过定义具有不同权限的角色(role)或集群角色(cluster role),并将角色或集群角色与账号绑定,为不同的账号分配不同权限。例如,在RBAC机制中,创建角色A,允许角色A在计算集群中访问和操作集群资源B,通过将角色A与服务账号C绑定,服务账号C能够在计算集群中访问和操作集群资源B。In some types of computing clusters (such as K8s clusters), the permissions of accounts in the computing cluster can be managed based on the role-based access control (RBAC) mechanism. Specifically, in the RBAC mechanism, different permissions are assigned to different accounts by defining roles or cluster roles with different permissions and binding the roles or cluster roles to accounts. For example, in the RBAC mechanism, role A is created, allowing role A to access and operate cluster resource B in the computing cluster. By binding role A to service account C, service account C can access and operate cluster resource B in the computing cluster.
若具有较高权限的服务账号的相关信息被他人获得,他人可以通过该服务账号对计算集群资源进行访问和操作,由于该服务账号具有较高权限,上述访问和操作行为对于计算集群安全的影响范围较大,可能导致计算集群失陷。换言之,若具有较高权限的服务账号的相关信息被他人获得,可能导致他人通过该服务账号发起集群维度的逃逸与横向渗透攻击,影响范围较大。If the relevant information of a service account with higher permissions is obtained by others, they can access and operate the computing cluster resources through the service account. Since the service account has higher permissions, the above access and operation behaviors have a greater impact on the security of the computing cluster and may lead to the collapse of the computing cluster. In other words, if the relevant information of a service account with higher permissions is obtained by others, it may lead to the escape and lateral penetration attacks of the cluster dimension through the service account, which has a greater impact.
具体地,以容器编排系统为K8s系统为例进行说明,在容器启动时,K8s系统会为容器挂载与服务账号相关的信息,例如是令牌(token)和证书,同时,K8s系统会为容器创建一个名为kubernetes.default的服务,用于容器与K8s系统进行通信。如此,若该服务账号的相关信息被他人获得,他人可以利用容器中与服务账号相关token和证书,通过kubernetes.default的服务与K8s系统进行通讯,访问和操作计算集群资源。Specifically, taking the container orchestration system as the K8s system as an example, when the container is started, the K8s system will mount information related to the service account, such as tokens and certificates, to the container. At the same time, the K8s system will create a service named kubernetes.default for the container, which is used for the container to communicate with the K8s system. In this way, if the relevant information of the service account is obtained by others, they can use the token and certificate related to the service account in the container to communicate with the K8s system through the kubernetes.default service, and access and operate computing cluster resources.
相关技术中,通常采用镜像漏洞分析、集群配置检测等方式针对计算集群进行检测,然而,上述方式通常基于静态文件或配置进行检测,仅能针对计算集群进行事前检测,无法在计算集群运行过程中进行检测。而在计算集群运行过程中,检测维度仅局限于独立的容器,无法关联至整个计算集群的安全检测。In related technologies, image vulnerability analysis, cluster configuration detection, and other methods are usually used to detect computing clusters. However, the above methods are usually based on static files or configurations, and can only detect computing clusters in advance, but cannot be detected during the operation of computing clusters. During the operation of computing clusters, the detection dimension is limited to independent containers and cannot be associated with the security detection of the entire computing cluster.
有鉴于此,本申请提供了一种集群检测方法,该方法首先从第一计算集群的多个容器组中,确定目标容器组,其中,目标容器组基于容器组信息和角色访问控制信息中的至少一种确定,响应于检测到以下至少一种事件:针对第一容器组中容器的目标文件读取事件和第二容器组中容器触发的关键事件,将与第一容器组和第二容器组中的至少一种关联的服务账号确定为目标服务账号,其中,第一容器组、第二容器组为目标容器组中的至少一个容器组,响应于检测到与目标服务账号相关的集群审计事件,确定与目标服务账号相关的集群审计事件的安全识别结果,接着,根据安全识别结果,生成第一计算集群的检测结果。In view of this, the present application provides a cluster detection method, which first determines a target container group from multiple container groups of a first computing cluster, wherein the target container group is determined based on at least one of container group information and role access control information, in response to detecting at least one of the following events: a target file read event for a container in the first container group and a key event triggered by a container in the second container group, determining a service account associated with at least one of the first container group and the second container group as a target service account, wherein the first container group and the second container group are at least one container group in the target container group, in response to detecting a cluster audit event related to the target service account, determining a security identification result of the cluster audit event related to the target service account, and then generating a detection result of the first computing cluster based on the security identification result.
在该方法中,通过识别出计算集群中的目标容器组,结合针对与目标容器组相关的事件,确定出需要关注的目标服务账号。通过检测与目标服务账号相关的集群审计事件,判断目标服务账号是否针对计算集群存在不安全访问或操作行为。如此,在计算集群运行的过程中,实现集群维度的安全检测。In this method, by identifying the target container group in the computing cluster and combining it with events related to the target container group, the target service account that needs attention is determined. By detecting cluster audit events related to the target service account, it is determined whether the target service account has unsafe access or operation behavior against the computing cluster. In this way, cluster-level security detection is achieved during the operation of the computing cluster.
为便于理解本申请实施例提供的技术方案,下面将结合附图进行说明。To facilitate understanding of the technical solution provided by the embodiments of the present application, it will be described below with reference to the accompanying drawings.
参见图1所示的一种集群检测系统的架构示意图,集群检测系统10包括资产识别器101、行为检测器102和集群检测器103。Referring to the schematic diagram of the architecture of a cluster detection system shown in FIG. 1 , the cluster detection system 10 includes an asset identifier 101 , a behavior detector 102 , and a cluster detector 103 .
资产识别器101用于从第一计算集群部署的多个容器组中,确定目标容器组。具体地,资产识别器101可以基于容器组信息和角色访问控制信息中的至少一种信息,从第一计算集群部署的多个容器组中,确定目标容器组。The asset identifier 101 is used to determine a target container group from multiple container groups deployed in the first computing cluster. Specifically, the asset identifier 101 can determine the target container group from multiple container groups deployed in the first computing cluster based on at least one of container group information and role access control information.
行为检测器102用于针对与目标容器组相关的行为进行检测,确定目标服务账号。具体地,行为检测器102可以响应于检测到以下至少一种事件:针对第一容器组中容器的目标文件读取事件和第二容器组中容器触发的关键事件,将与第一容器组和第二容器组中的至少一种关联的服务账号确定为目标服务账号,其中,第一容器组、第二容器组为目标容器组中的至少一个容器组。The behavior detector 102 is used to detect behaviors related to the target container group and determine the target service account. Specifically, the behavior detector 102 can determine the service account associated with at least one of the first container group and the second container group as the target service account in response to detecting at least one of the following events: a target file read event for a container in the first container group and a key event triggered by a container in the second container group, wherein the first container group and the second container group are at least one container group in the target container group.
集群检测器103用于生成计算集群的检测结果。具体地,集群检测器102可以响应于检测到与目标服务账号相关的集群审计事件,确定与目标服务账号相关的集群审计事件的安全识别结果,并根据安全识别结果,生成第一计算集群的检测结果。The cluster detector 103 is used to generate a detection result of the computing cluster. Specifically, the cluster detector 102 can determine the security identification result of the cluster audit event related to the target service account in response to detecting the cluster audit event related to the target service account, and generate a detection result of the first computing cluster according to the security identification result.
如此,通过与计算集群资产相关的信息,识别出需要关注的目标容器组,通过检测与目标容器组相关的行为,识别出需要关注的目标服务账号。在计算集群运行过程中,从集群审计事件的角度检测计算集群的实时行为,聚焦于与计算集群相关的特性,结合目标服务账号被利用时的特性,判断计算集群实时行为的安全性,进而实现针对计算集群的安全检测。In this way, the target container group that needs attention is identified through information related to the computing cluster assets, and the target service account that needs attention is identified by detecting behaviors related to the target container group. During the operation of the computing cluster, the real-time behavior of the computing cluster is detected from the perspective of cluster audit events, focusing on the characteristics related to the computing cluster, and combining the characteristics when the target service account is used to determine the security of the real-time behavior of the computing cluster, thereby achieving security detection for the computing cluster.
基于前文提供的集群检测系统的架构示意图,本申请实施例还提供了一种集群检测方法。参见图2所示的本申请实施例提供的一种集群检测方法的流程示意图,该方法具体包括:Based on the schematic diagram of the cluster detection system architecture provided above, the present application embodiment further provides a cluster detection method. Referring to FIG. 2 , a schematic diagram of a cluster detection method provided in the present application embodiment, the method specifically includes:
S201:从第一计算集群部署的多个容器组中,确定目标容器组。S201: Determine a target container group from multiple container groups deployed in a first computing cluster.
其中,第一计算集群可理解为存在集群检测需求的计算集群,例如,第一计算集群可以为由容器编排系统进行业务应用程序部署后的计算集群,当容器编排系统为K8s系统时,第一计算集群可以为K8s计算集群。Among them, the first computing cluster can be understood as a computing cluster with cluster detection requirements. For example, the first computing cluster can be a computing cluster after the business application is deployed by the container orchestration system. When the container orchestration system is a K8s system, the first computing cluster can be a K8s computing cluster.
在第一计算集群中,部署有多个容器组。各个容器组中封装有至少一个容器,业务应用程序的各个服务可以运行在各个容器组的容器中。In the first computing cluster, multiple container groups are deployed. Each container group encapsulates at least one container, and each service of the business application can run in the container of each container group.
目标容器组可理解为在集群检测过程中需要关注的至少一个容器组。在本申请实施例中,目标容器组基于容器组信息和角色访问控制信息中的至少一种确定。换言之,考虑到第一计算集群中的容器组数量较多,基于集群资产信息对容器组进行识别,从中识别出需要关注的目标容器组,一方面,基于集群资产信息判断容器组的安全程度,识别出安全程度较低的目标容器组,另一方面,减少后续需要关注的容器组数量,提升集群检测效率。The target container group can be understood as at least one container group that needs to be paid attention to during the cluster detection process. In an embodiment of the present application, the target container group is determined based on at least one of the container group information and the role access control information. In other words, considering that there are a large number of container groups in the first computing cluster, the container groups are identified based on the cluster asset information, and the target container groups that need to be paid attention to are identified therefrom. On the one hand, the security level of the container group is judged based on the cluster asset information, and the target container group with a lower security level is identified. On the other hand, the number of container groups that need to be paid attention to in the future is reduced, and the cluster detection efficiency is improved.
其中,容器组信息可理解为与容器组相关的资产信息,例如,容器组信息可以包括容器组名称、容器组的命名空间、与容器组关联的服务账号、容器组的运行状态信息、容器组中容器的信息等。Among them, container group information can be understood as asset information related to the container group. For example, the container group information can include the container group name, the namespace of the container group, the service account associated with the container group, the running status information of the container group, the information of the containers in the container group, etc.
角色访问控制信息可理解为与角色访问控制相关的资产信息,例如,角色访问控制信息可以包括角色信息、集群角色信息、角色具有的权限信息、集群角色具有的权限信息、账号信息、角色与账号之间的关联信息、集群角色与账号之间的关联信息等。Role access control information can be understood as asset information related to role access control. For example, role access control information can include role information, cluster role information, role permission information, cluster role permission information, account information, association information between roles and accounts, association information between cluster roles and accounts, etc.
参见图3所示的一种确定目标容器组的流程示意图,具体实现时,可以首先获取第一计算集群部署的多个容器组的以下至少一种信息:容器组信息和角色访问控制信息,接着,将以下至少一种确定为目标容器组:容器组信息满足第一设定条件的容器组和与角色访问控制信息满足第二设定条件的服务账号关联的容器组。Referring to a flow chart of determining a target container group shown in FIG3 , in a specific implementation, at least one of the following information of multiple container groups deployed by the first computing cluster can be first obtained: container group information and role access control information, and then at least one of the following is determined as the target container group: a container group whose container group information meets a first set condition and a container group associated with a service account whose role access control information meets a second set condition.
也就是说,在本申请实施例中,通过获取容器组信息和/或角色访问控制信息,基于与容器组信息和/或角色访问控制信息对应的设定条件,从第一计算集群的多个容器组中,确定出安全程度较低、需要关注的目标容器组。That is, in an embodiment of the present application, by obtaining container group information and/or role access control information, based on set conditions corresponding to the container group information and/or role access control information, a target container group with a lower security level and requiring attention is determined from multiple container groups of the first computing cluster.
本申请实施例支持通过不同方式获取第一计算集群的多个容器组的容器组信息和/或角色访问控制信息。继续如图3所示,在一些实施例中,响应于检测到第一计算集群的集群审计事件,从第一计算集群的集群审计事件中,提取以下至少一种信息:容器组信息和角色访问控制信息。Embodiments of the present application support obtaining container group information and/or role access control information of multiple container groups of the first computing cluster in different ways. Continuing with FIG3 , in some embodiments, in response to detecting a cluster audit event of the first computing cluster, at least one of the following information is extracted from the cluster audit event of the first computing cluster: container group information and role access control information.
其中,集群审计事件可理解为针对计算集群资源进行访问或操作后生成的事件。换言之,当触发针对计算集群资源进行访问或操作,可以检测到集群审计事件。The cluster audit event can be understood as an event generated after accessing or operating a computing cluster resource. In other words, when accessing or operating a computing cluster resource is triggered, a cluster audit event can be detected.
在一些可能的实现方式中,可以基于扩展伯克利数据包过滤器(extendedBerkeley packet filter)技术,检测第一计算集群中的集群审计事件。In some possible implementations, cluster audit events in the first computing cluster may be detected based on an extended Berkeley packet filter technique.
集群审计事件携带有容器组信息和角色访问控制信息,通过分析集群审计事件,可以从集群审计事件中提取容器组信息和角色访问控制信息中的至少一种。The cluster audit event carries container group information and role access control information. By analyzing the cluster audit event, at least one of the container group information and the role access control information can be extracted from the cluster audit event.
结合实例说明,集群审计事件可以有如下格式:Combined with the example explanation, cluster audit events can have the following format:
通过提取user中的内容,获取角色访问控制信息,通过提取objectRef中的内容,获取容器组信息。如此,通过检测集群审计事件的方式,被动获取容器组信息和角色访问控制信息中的至少一种,实时更新集群资产信息。By extracting the content in user, role access control information is obtained, and by extracting the content in objectRef, container group information is obtained. In this way, by detecting cluster audit events, at least one of container group information and role access control information is passively obtained, and cluster asset information is updated in real time.
在另一些实施例中,调用容器编排系统的信息获取接口,获取第一计算集群的多个容器组的以下至少一种信息:容器组信息和角色访问控制信息。其中,容器编排系统用于管理第一计算集群的多个容器组。In some other embodiments, an information acquisition interface of a container orchestration system is called to acquire at least one of the following information of multiple container groups of the first computing cluster: container group information and role access control information. The container orchestration system is used to manage multiple container groups of the first computing cluster.
容器编排系统,例如是K8s系统,通常提供用于获取集群资产信息的应用程序编程接口(application programming interface,API),通过调用容器编排系统提供的信息获取接口,主动获取容器组信息和角色访问控制信息中的至少一种,更新集群资产信息。A container orchestration system, such as a K8s system, typically provides an application programming interface (API) for obtaining cluster asset information. By calling the information acquisition interface provided by the container orchestration system, at least one of the container group information and role access control information is actively obtained to update the cluster asset information.
在获取第一计算集群的多个容器组的容器组信息和/或角色访问控制信息后,基于第一设定条件对容器组信息进行判断,或者基于第二设定条件对角色访问控制信息进行判断,进而根据判断结果,确定目标容器组。其中,第一设定条件可以为用于描述目标容器组的容器组信息的条件,也就是说,第一设定条件可以描述用于判断安全程度较低、存在安全风险、需要关注的容器组的条件。After obtaining container group information and/or role access control information of multiple container groups of the first computing cluster, the container group information is judged based on the first setting condition, or the role access control information is judged based on the second setting condition, and then the target container group is determined according to the judgment result. The first setting condition may be a condition for describing the container group information of the target container group, that is, the first setting condition may describe a condition for judging a container group with a low security level, a security risk, or a container group that needs attention.
下面针对一些可能的第一设定条件进行说明:The following describes some possible first setting conditions:
1.宿主命名空间:禁止共享宿主机上的命名空间。判断容器组信息中的spec.hostNet work字段、spec.hostPID字段和spec.hostIPC字段,若上述字段的字段值不为Undefined、nil或false,则满足第一设定条件。1. Host namespace: Sharing the namespace on the host is prohibited. The spec.hostNetwork field, spec.hostPID field, and spec.hostIPC field in the container group information are judged. If the field values of the above fields are not Undefined, nil, or false, the first setting condition is met.
2.AppArmor:禁止覆盖或者禁用默认策略(RuntimeDefault AppArmor配置)以及禁止覆盖一些配置集合的权限。判断容器组信息中的spec.securityContext.appArmorProfile.typ e字段、spec.containers[*].securityContext.appArmorProfile.type字段、spec.initContainers[*].securityContext.appArmorProfile.type字段、spec.ephemeralContainers[*].securityContext.app ArmorProfile.type字段和metadata.annotations["container.apparmor.security.beta.kubernetes.io/*"]字段,若上述字段的字段值不为Undefined、nil、Runtime、Default或Localhost,则满足第一设定条件。2. AppArmor: It is forbidden to overwrite or disable the default policy (RuntimeDefault AppArmor configuration) and to overwrite permissions for some configuration sets. Determine the spec.securityContext.appArmorProfile.type field, spec.containers[*].securityContext.appArmorProfile.type field, spec.initContainers[*].securityContext.appArmorProfile.type field, spec.ephemeralContainers[*].securityContext.app ArmorProfile.type field, and metadata.annotations["container.apparmor.security.beta.kubernetes.io/*"] field in the container group information. If the field values of the above fields are not Undefined, nil, Runtime, Default, or Localhost, the first setting condition is met.
3.SELinux:禁止设置SELinux类型的操作,禁止设置自定义的SELinux用户或角色。判断容器组信息中的spec.securityContext.seLinuxOptions.type字段、spec.containers[*].secur ityContext.seLinuxOptions.type字段、spec.initContainers[*].securityContext.seLinuxOptions.type字段和spec.ephemeralContainers[*].securityContext.seLinuxOptions.type字段,若上述字段的字段值不为Undefined、container_t、container_kvm_t或container_engine_t,则满足第一设定条件。判断容器组信息中的spec.securityContext.seLinuxOptions.user字段、spec.cont ainers[*].securityContext.seLinuxOptions.user字段、spec.initContainers[*].securityContext.seL inuxOptions.user字段、spec.ephemeralContainers[*].securityContext.seLinuxOptions.user字段、spec.securityContext.seLinuxOptions.role字段、spec.containers[*].securityContext.seLinuxOpt ions.role字段、spec.initContainers[*].securityContext.seLinuxOptions.role字段和spec.epheme ralContainers[*].securityContext.seLinuxOptions.role字段,若上述字段的字段值不为Undefi ned,则满足第一设定条件。3.SELinux: It is forbidden to set SELinux type operations, and it is forbidden to set custom SELinux users or roles. Determine the spec.securityContext.seLinuxOptions.type field, spec.containers[*].securityContext.seLinuxOptions.type field, spec.initContainers[*].securityContext.seLinuxOptions.type field, and spec.ephemeralContainers[*].securityContext.seLinuxOptions.type field in the container group information. If the field values of the above fields are not Undefined, container_t, container_kvm_t, or container_engine_t, the first setting condition is met. The spec.securityContext.seLinuxOptions.user field, spec.containers[*].securityContext.seLinuxOptions.user field, spec.initContainers[*].securityContext.seL inuxOptions.user field, spec.ephemeralContainers[*].securityContext.seLinuxOptions.user field, spec.securityContext.seLinuxOptions.role field, spec.containers[*].securityContext.seLinuxOptions.role field, spec.initContainers[*].securityContext.seLinuxOptions.role field, and spec.ephemeralContainers[*].securityContext.seLinuxOptions.role field in the container group information are judged. If the field values of the above fields are not Undefined, the first setting condition is met.
4./proc挂载类型:要求使用默认的/proc掩码。判断容器组信息中的spec.containers[*].securityContext.procMount字段、spec.initContainers[*].securityContext.procMount字段和spec.ephemeralContainers[*].securityContext.procMount字段,若上述字段的字段值不为Undef ined、nil或Default,则满足第一设定条件。4. /proc mount type: requires the use of the default /proc mask. Determine the spec.containers[*].securityContext.procMount field, spec.initContainers[*].securityContext.procMount field, and spec.ephemeralContainers[*].securityContext.procMount field in the container group information. If the field values of the above fields are not Undefined, nil, or Default, the first setting condition is met.
5.Seccomp:禁止设置Seccomp配置为Unconfined。判断容器组信息中的spec.securi tyContext.seccompProfile.type字段、spec.containers[*].securityContext.seccompProfile.type字段、spec.initContainers[*].securityContext.seccompProfile.type字段和spec.ephemeralContaine rs[*].securityContext.seccompProfile.type字段,若上述字段的字段值不为Undefined、nil、Runtime、Default或Localhost,则满足第一设定条件。5.Seccomp: Do not set the Seccomp configuration to Unconfined. Determine the spec.securityContext.seccompProfile.type field, spec.containers[*].securityContext.seccompProfile.type field, spec.initContainers[*].securityContext.seccompProfile.type field, and spec.ephemeralContainers[*].securityContext.seccompProfile.type field in the container group information. If the field values of the above fields are not Undefined, nil, Runtime, Default, or Localhost, the first setting condition is met.
6.Sysctls:禁止除允许子集以外的配置。判断容器组信息中的spec.securityContext.sys ctls[*].name字段,若上述字段的字段值不为Undefined、nil、kernel.shm_rmid_forced、net.ipv4.ip_local_port_range、net.ipv4.ip_unprivileged_port_start、net.ipv4.tcp_syncookies、net.ipv4.ping_group_range、net.ipv4.ip_local_reserved_ports、net.ipv4.tcp_keepalive_time、net.ip v4.tcp_fin_timeout、net.ipv4.tcp_keepalive_intvl或net.ipv4.tcp_keepalive_probes,则满足第一设定条件。6. Sysctls: Prohibit configuration except for the allowed subset. Determine the spec.securityContext.sys ctls[*].name field in the container group information. If the field value of the above field is not Undefined, nil, kernel.shm_rmid_forced, net.ipv4.ip_local_port_range, net.ipv4.ip_unprivileged_port_start, net.ipv4.tcp_syncookies, net.ipv4.ping_group_range, net.ipv4.ip_local_reserved_ports, net.ipv4.tcp_keepalive_time, net.ip v4.tcp_fin_timeout, net.ipv4.tcp_keepalive_intvl or net.ipv4.tcp_keepalive_probes, then the first setting condition is met.
7.卷类型:禁止除允许卷类型以外的配置。判断容器组信息中的spec.volumes[*]字段,若上述字段中的spec.volumes[*].configMap、spec.volumes[*].csi、spec.volumes[*].downwar dAPI、spec.volumes[*].emptyDir、spec.volumes[*].ephemeral、spec.volumes[*].persistentVol umeClaim、spec.volumes[*].projected和spec.volumes[*].secret均为空值,则满足第一设定条件。7. Volume type: Configurations other than permitted volume types are prohibited. Determine the spec.volumes[*] field in the container group information. If spec.volumes[*].configMap, spec.volumes[*].csi, spec.volumes[*].downwar dAPI, spec.volumes[*].emptyDir, spec.volumes[*].ephemeral, spec.volumes[*].persistentVol umeClaim, spec.volumes[*].projected, and spec.volumes[*].secret in the above fields are all empty values, the first setting condition is met.
8.特权提升:禁止进行特权提升。判断容器组信息中的spec.containers[*].securityCont ext.allowPrivilegeEscalation字段、spec.initContainers[*].securityContext.allowPrivilegeEscalat ion字段和spec.ephemeralContainers[*].securityContext.allowPrivilegeEscalation字段,若上述字段的字段值不为false,则满足第一设定条件。8. Privilege escalation: Privilege escalation is prohibited. The spec.containers[*].securityContext.allowPrivilegeEscalation field, the spec.initContainers[*].securityContext.allowPrivilegeEscalation field, and the spec.ephemeralContainers[*].securityContext.allowPrivilegeEscalation field in the container group information are judged. If the field values of the above fields are not false, the first setting condition is met.
9.以非root账号运行:要求容器以非root账号运行。判断容器组信息中的spec.securi tyContext.runAsNonRoot字段、spec.containers[*].securityContext.runAsNonRoot字段、spec.initContainers[*].securityContext.runAsNonRoot字段和spec.ephemeralContainers[*].securityContext.runAsNonRoot字段,若上述字段的字段值不为true、Undefined或nil,则满足第一设定条件。9. Run as a non-root account: Requires the container to run as a non-root account. Determine the spec.securityContext.runAsNonRoot field, spec.containers[*].securityContext.runAsNonRoot field, spec.initContainers[*].securityContext.runAsNonRoot field, and spec.ephemeralContainers[*].securityContext.runAsNonRoot field in the container group information. If the field values of the above fields are not true, Undefined, or nil, the first setting condition is met.
10.非root用户:禁止将容器的runAsUser设置为0。判断容器组信息中的spec.securi tyContext.runAsUser字段、spec.containers[*].securityContext.runAsUser字段、spec.initCont ainers[*].securityContext.runAsUser字段和spec.ephemeralContainers[*].securityContext.runAs User字段,若上述字段的字段值不为非零值、Undefined或null,则满足第一设定条件。10. Non-root users: Do not set the runAsUser of a container to 0. Determine the spec.securityContext.runAsUser field, spec.containers[*].securityContext.runAsUser field, spec.initCont ainers[*].securityContext.runAsUser field, and spec.ephemeralContainers[*].securityContext.runAs User field in the container group information. If the field values of the above fields are not non-zero values, Undefined, or null, the first setting condition is met.
11.权能:要求容器弃用ALL权能,只允许添加NET_BIND_SERVICE权能。判断容器组信息中的spec.containers[*].securityContext.capabilities.add字段、spec.initContainers[*].securityContext.capabilities.add字段和spec.ephemeralContainers[*].securityContext.capabilitie s.add字段,若上述字段的字段值不为Undefined、nil或NET_BIND_SERVICE,则满足第一设定条件。11. Capabilities: Require the container to abandon ALL capabilities and only allow the addition of NET_BIND_SERVICE capabilities. Determine the spec.containers[*].securityContext.capabilities.add field, spec.initContainers[*].securityContext.capabilities.add field, and spec.ephemeralContainers[*].securityContext.capabilities.add field in the container group information. If the field values of the above fields are not Undefined, nil, or NET_BIND_SERVICE, the first setting condition is met.
如此,通过设置用于描述与存在安全风险的容器组(例如是特权容器组)相关的第一设定条件,从第一计算集群的多个容器组的容器组信息中,识别出容器组信息满足第一设定条件、需要关注的目标容器组。In this way, by setting a first setting condition for describing a container group with security risks (for example, a privileged container group), a target container group whose container group information meets the first setting condition and needs attention is identified from the container group information of multiple container groups of the first computing cluster.
第二设定条件可以为用于描述与目标容器组关联的服务账号的条件。其中,一个容器组关联一个服务账号,即,一个容器组与一个服务账号具有对应关系。也就是说,第二设定条件可以描述用于判断与安全程度较低、存在权限提权风险的服务账号关联的容器组的条件。The second setting condition may be a condition for describing a service account associated with the target container group. One container group is associated with one service account, that is, one container group has a corresponding relationship with one service account. In other words, the second setting condition may describe a condition for determining a container group associated with a service account with a low security level and a risk of privilege escalation.
下面针对一些可能的第二设定条件进行说明:Some possible second setting conditions are described below:
1.列举Secret:判断服务账号是否允许对Secrets执行get、list或watch访问,若是,满足第二设定条件。1. List Secrets: Determine whether the service account is allowed to perform get, list, or watch access to Secrets. If so, the second setting condition is met.
2.工作负载的创建:判断命名空间是否用于隔离不同的信任级别或不同租户所需的资源,若否,满足第二设定条件。2. Workload creation: Determine whether the namespace is used to isolate resources required by different trust levels or different tenants. If not, the second setting condition is met.
3.持久卷的创建:判断服务账号是否允许创建PersistentVolume,若是,满足第二设定条件。3. Creation of persistent volume: Determine whether the service account is allowed to create PersistentVolume. If so, the second setting condition is met.
4.访问Node的proxy子资源:判断有权访问Node对象的proxy子资源的服务账号是否有权访问kubelet API,若是,满足第二设定条件。4. Access the proxy sub-resource of Node: Determine whether the service account that has access to the proxy sub-resource of the Node object has access to the kubelet API. If so, the second setting condition is met.
5.esclate动作:判断服务账号是否涉及esclate动作,若是,满足第二设定条件。5. Esclate action: Determine whether the service account is involved in the esclate action. If so, the second setting condition is met.
6.bind动作:判断服务账号是否涉及bind动作,若是,满足第二设定条件。6. Bind action: Determine whether the service account involves a bind action. If so, the second setting condition is met.
7.impersonate动作:判断服务账号是否涉及impersonate动作,若是,满足第二设定条件。7. Impersonate action: Determine whether the service account involves an impersonate action. If so, the second setting condition is met.
8.CSR和证书颁发:判断服务账号是否有权访问CSR API,若是,满足第二设定条件。8. CSR and certificate issuance: Determine whether the service account has access to the CSR API. If so, the second setting condition is met.
9.令牌请求:判断服务账号是否拥有serviceaccounts/token的create权限,若是,满足第二设定条件。9. Token request: Determine whether the service account has the create permission for serviceaccounts/token. If so, the second setting condition is met.
10.控制准入Webhook:判断服务账号是否有权控制validatingwebhookconfigurations或mutatingwebhookconfigurations,若是,满足第二设定条件。10. Control access to Webhook: Determine whether the service account has the authority to control validatingwebhookconfigurations or mutatingwebhookconfigurations. If so, the second setting condition is met.
11.命名空间修改:判断服务账号是否有权对命名空间对象执行patch操作,若是,满足第二设定条件。11. Namespace modification: Determine whether the service account has the authority to perform patch operations on the namespace object. If so, the second setting condition is met.
如此,通过设置用于描述与安全程度较低、存在权限提权风险的服务账号相关的第二设定条件,从第一计算集群的多个容器组的角色访问控制信息中,识别出角色访问控制信息满足第二设定条件的服务账号,进而将满足第二设定条件的服务账号关联的容器组,确定为需要关注的目标容器组。In this way, by setting a second setting condition for describing service accounts with low security levels and risks of privilege escalation, service accounts whose role access control information meets the second setting condition are identified from the role access control information of multiple container groups in the first computing cluster, and then the container groups associated with the service accounts that meet the second setting condition are determined as target container groups that need attention.
S202:响应于检测到以下至少一种事件:针对第一容器组中容器的目标文件读取事件和第二容器组中容器触发的关键事件,将与第一容器组和第二容器组中的至少一种关联的服务账号确定为目标服务账号。S202: In response to detecting at least one of the following events: a target file read event for a container in the first container group and a key event triggered by a container in the second container group, determining a service account associated with at least one of the first container group and the second container group as a target service account.
在本申请实施例中,第一容器组、第二容器组为目标容器组中的至少一个容器组。也就是说,若检测到的集群审计事件中,存在针对目标容器组中某个或某些容器组中容器的目标文件读取事件,或者,存在目标容器组中某个或某些容器组中容器触发的关键事件,则将与目标文件读取事件相关的服务账号确定为目标服务账号,以及,将与关键事件相关的服务账号确定为目标服务账号。In the embodiment of the present application, the first container group and the second container group are at least one container group in the target container group. That is, if there is a target file read event for a container in one or some container groups in the target container group in the detected cluster audit event, or there is a key event triggered by a container in one or some container groups in the target container group, the service account related to the target file read event is determined as the target service account, and the service account related to the key event is determined as the target service account.
目标服务账号可理解为需要关注的服务账号。在本申请实施例的集群检测场景中,目标服务账号可理解为存在服务账号的相关信息泄露风险、服务账号的相关信息可能被他人获得的服务账号。The target service account may be understood as a service account that needs attention. In the cluster detection scenario of the embodiment of the present application, the target service account may be understood as a service account that has a risk of leakage of relevant information of the service account and whose relevant information may be obtained by others.
目标文件读取事件可以用于打开或读取第一容器组中容器的文件。在一些可能的实现方式中,针对第一容器组中容器的目标文件读取事件包括:除第一计算集群的主进程外的其他进程,读取第一容器组中容器的与服务账号相关的文件的事件。The target file read event can be used to open or read a file of a container in the first container group. In some possible implementations, the target file read event for a container in the first container group includes: an event in which a process other than the main process of the first computing cluster reads a file related to a service account of a container in the first container group.
也就是说,通过检测集群审计事件,从集群审计事件中筛选出文件读取事件,再从文件读取事件中,筛选出读取与服务账号相关的文件的文件读取事件,例如,读取与服务账号相关的文件的文件读取事件的文件路径可以为/var/run/secrets/kubernetes.io/serviceaccoun t,再筛选出除第一计算集群的主进程外的其他进程进行文件读取的文件读取事件,获得目标文件读取事件。That is to say, by detecting cluster audit events, file read events are filtered out from the cluster audit events, and then file read events for reading files related to the service account are filtered out from the file read events. For example, the file path of the file read event for reading files related to the service account may be /var/run/secrets/kubernetes.io/serviceaccount, and then file read events for file reading by processes other than the main process of the first computing cluster are filtered out to obtain the target file read event.
考虑到容器中挂载的与服务账号相关的文件(例如是token和证书)是为了更好地使用计算集群资源,正常运行过程中,其他进程通常不会涉及打开或读取与服务账号相关的文件,因此,通过检测目标文件读取事件,识别目标容器组中存在的不安全文件读取行为,进而将存在不安全文件读取行为的第一容器组关联的服务账号,确定为需要关注的目标服务账号。Considering that the files related to the service account (such as tokens and certificates) mounted in the container are for better use of computing cluster resources, other processes usually do not involve opening or reading files related to the service account during normal operation. Therefore, by detecting the target file read event, the unsafe file read behavior in the target container group is identified, and then the service account associated with the first container group with the unsafe file read behavior is determined as the target service account that needs attention.
关键事件可理解为涉及不安全容器行为的事件。也就是说,通过检测集群审计事件,判断集群审计事件是否属于关键事件,若是,则将执行不安全容器行为的第二容器组关联的服务账号,确定为需要关注的目标服务账号。A critical event can be understood as an event involving an unsafe container behavior. That is, by detecting cluster audit events, it is determined whether the cluster audit event is a critical event. If so, the service account associated with the second container group that performs the unsafe container behavior is determined as a target service account that needs attention.
本申请实施例对于判断集群审计事件是否属于关键事件的方式不作限制,例如,可以将涉及关键软件执行、反弹shell、内存木马、后门驻留、凭证窃取、容器逃逸、端口扫描、远程控制、数据转移等行为的集群审计事件,确定为关键事件。The embodiments of the present application do not limit the method for determining whether a cluster audit event is a critical event. For example, cluster audit events involving critical software execution, rebound shell, memory Trojans, backdoor residency, credential theft, container escape, port scanning, remote control, data transfer, etc. can be determined as critical events.
S203:响应于检测到与目标服务账号相关的集群审计事件,确定与目标服务账号相关的集群审计事件的安全识别结果。S203: In response to detecting a cluster audit event related to the target service account, determine a security identification result of the cluster audit event related to the target service account.
在确定需要关注的目标服务账号后,针对与目标服务账号相关的集群审计事件进行检测,确定与目标服务账号相关的集群审计事件是否安全。After determining the target service account that needs attention, the cluster audit events related to the target service account are detected to determine whether the cluster audit events related to the target service account are safe.
具体实现时,响应于检测到第一计算集群的集群审计事件,从第一计算集群的集群审计事件中,提取角色访问控制信息,响应于角色访问控制信息对应的服务账号为目标服务账号,确定集群审计事件的安全识别结果。In a specific implementation, in response to detecting a cluster audit event of the first computing cluster, role access control information is extracted from the cluster audit event of the first computing cluster, and in response to a service account corresponding to the role access control information being a target service account, a security identification result of the cluster audit event is determined.
也就是说,检测第一计算集群的集群审计事件,根据第一计算集群的集群审计事件携带的角色访问控制信息,判断集群审计事件是否与目标服务账号相关,进而从大量集群审计事件中,筛选出与目标服务账号相关的集群审计事件,在针对与目标服务账号相关的集群审计事件进行有针对性的安全识别。That is to say, the cluster audit events of the first computing cluster are detected, and based on the role access control information carried by the cluster audit events of the first computing cluster, it is determined whether the cluster audit events are related to the target service account, and then the cluster audit events related to the target service account are screened out from a large number of cluster audit events, and targeted security identification is performed on the cluster audit events related to the target service account.
在一些可能的实现方式中,响应于检测到与目标服务账号相关的集群审计事件,当与目标服务账号相关的集群审计事件满足第三设定条件,确定表征集群审计事件不安全的安全识别结果。In some possible implementations, in response to detecting a cluster audit event related to a target service account, when the cluster audit event related to the target service account satisfies a third set condition, a security identification result indicating that the cluster audit event is insecure is determined.
其中,第三设定条件可以用于描述不安全的集群审计事件。进一步地,在表征集群审计事件不安全的安全识别结果中,还可以进一步针对不安全等级进行划分,例如,将表征集群审计事件不安全的安全识别结果分为低危、高危等不同的不安全等级。The third setting condition can be used to describe an unsafe cluster audit event. Furthermore, in the security identification result that characterizes the unsafe cluster audit event, the unsafe level can be further divided, for example, the security identification result that characterizes the unsafe cluster audit event can be divided into different unsafe levels such as low risk and high risk.
下面针对一些可能的第三设定条件进行说明:Some possible third setting conditions are described below:
1.凭证滥用:判断与目标服务账号相关的集群审计事件中,是否存在利用curl滥用ServiceAccount token的行为、利用kubectl滥用ServiceAccount token的行为、利用渗透测试工具滥用ServiceAccount的行为、获取secrets列表的行为和获取secrets内容的行为,若是,满足第三设定条件。1. Credential abuse: Determine whether there is any abuse of the ServiceAccount token using curl, abuse of the ServiceAccount token using kubectl, abuse of the ServiceAccount using penetration testing tools, or acquisition of secrets lists and secrets contents in the cluster audit events related to the target service account. If so, the third set condition is met.
2.匿名访问:判断与目标服务账号相关的集群审计事件中,是否存在匿名访问的行为,若是,满足第三设定条件。2. Anonymous access: Determine whether there is any anonymous access behavior in the cluster audit events related to the target service account. If so, the third setting condition is met.
3.配置修改:判断与目标服务账号相关的集群审计事件中,是否存在修改DNS配置的行为,若是,满足第三设定条件。3. Configuration modification: Determine whether there is any behavior of modifying the DNS configuration in the cluster audit events related to the target service account. If so, the third setting condition is met.
4.Admission Webhook创建:判断与目标服务账号相关的集群审计事件中,是否存在创建准入控制器的行为,若是,满足第三设定条件。4. Admission Webhook creation: Determine whether there is any behavior of creating an admission controller in the cluster audit events related to the target service account. If so, the third setting condition is met.
5.授权失败:判断与目标服务账号相关的集群审计事件中,是否存在创建cronjob授权失败的行为、获取configmaps授权失败的行为、获取configmaps认证失败的行为、获取replicasets授权失败的行为、获取secrets授权失败的行为、获取secrets认证失败的行为、获取pods授权失败的行为、获取pods认证失败的行为、枚举workloads授权失败的行为、同一用户名访问不同的资源,多次授权失败的行为和不同的用户名访问同一的资源,多次授权失败的行为,若是,满足第三设定条件。5. Authorization failure: Determine whether the cluster audit events related to the target service account include the following: failure to create cronjob authorization, failure to obtain configmaps authorization, failure to obtain configmaps authentication, failure to obtain replicasets authorization, failure to obtain secrets authorization, failure to obtain secrets authentication, failure to obtain pods authorization, failure to obtain pods authentication, failure to enumerate workloads authorization, multiple authorization failures when the same user name accesses different resources, and multiple authorization failures when different user names access the same resource. If so, the third set condition is met.
6.异常命令执行:判断与目标服务账号相关的集群审计事件中,是否存在对pods执行attach命令、在pods内执行命令、在pods内执行curl命令、获取Pods列表,在容器内执行命令、与API Server交互,在pods内执行命令读取SAtoken、在pods内执行wget命令、在pods内执行whoami命令和对pods执行portforward命令,若是,满足第三设定条件。6. Abnormal command execution: Determine whether the cluster audit events related to the target service account include executing attach commands on pods, executing commands in pods, executing curl commands in pods, obtaining Pods list, executing commands in containers, interacting with API Server, executing commands in pods to read SAtoken, executing wget commands in pods, executing whoami commands in pods, and executing portforward commands on pods. If so, the third set condition is met.
7.信息搜集:判断与目标服务账号相关的集群审计事件中,是否存在利用渗透测试工具获取集群configmaps的行为、利用渗透测试工具获取集群PSP安全配置的行为和利用渗透测试工具获取ETCD信息的行为,若是,满足第三设定条件。7. Information collection: Determine whether there is any behavior of using penetration testing tools to obtain cluster configmaps, using penetration testing tools to obtain cluster PSP security configuration, and using penetration testing tools to obtain ETCD information in the cluster audit events related to the target service account. If so, the third setting condition is met.
8.权限探测:判断与目标服务账号相关的集群审计事件中,是否存在同一身份短时间内对其权限进行多次探测的行为,若是,满足第三设定条件。8. Permission detection: Determine whether there is any behavior of multiple permissions detection by the same identity in a short period of time in the cluster audit events related to the target service account. If so, the third setting condition is met.
9.关键角色创建:判断与目标服务账号相关的集群审计事件中,是否存在异常账户创建cronjob的行为、创建NodePort类型的Service的行为、创建绑定关键ClusterRole的ClusterRoleBinding的行为、创建绑定系统namespace中Role的RoleBinding的行为、创建绑定关键ClusterRole的RoleBinding的行为、创建绑定关键Role的RoleBinding的行为、创建挂载宿主机关键目录的容器的行为、创建特权容器的行为、创建具有关键capabilities的容器的行为和创建共享宿主机网络的容器的行为,若是,满足第三设定条件。9. Key role creation: Determine whether there are any abnormal accounts creating cronjobs, creating NodePort type Services, creating ClusterRoleBindings bound to key ClusterRole, creating RoleBindings bound to Roles in the system namespace, creating RoleBindings bound to key ClusterRole, creating RoleBindings bound to key Roles, creating containers that mount host key directories, creating privileged containers, creating containers with key capabilities, and creating containers that share host networks in cluster audit events related to the target service account. If so, the third setting condition is met.
10.密码盗用:判断与目标服务账号相关的集群审计事件中,是否存在利用渗透测试工具获取集群secrets的行为、滥用kubelet账户,枚举所有命名空间的secrets的行为、滥用ServiceAccount,枚举所有命名空间的secrets的行为、使用BOtB工具来枚举default命名空间的secrets的行为,若是,满足第三设定条件。10. Password theft: Determine whether there is any use of penetration testing tools to obtain cluster secrets, abuse of kubelet accounts to enumerate secrets in all namespaces, abuse of ServiceAccount to enumerate secrets in all namespaces, or use of BOtB tools to enumerate secrets in the default namespace in cluster audit events related to the target service account. If so, the third setting condition is met.
如此,通过将与目标服务账号相关的集群审计事件与第三设定条件比较,判断与目标服务账号相关的集群审计事件是否为不安全的集群审计事件,获得安全识别结果。In this way, by comparing the cluster audit event related to the target service account with the third set condition, it is determined whether the cluster audit event related to the target service account is an unsafe cluster audit event, and a security identification result is obtained.
在另一些可能的实现方式中,响应于检测到与目标服务账号相关的集群审计事件,且与目标服务账号相关的集群审计事件为用于创建或修改容器组的事件,获取创建或修改的容器组中容器的运行信息,根据创建或修改的容器组中容器的运行信息,确定与目标服务账号相关的集群审计事件的安全识别结果。In some other possible implementations, in response to detecting a cluster audit event related to a target service account, and the cluster audit event related to the target service account is an event for creating or modifying a container group, operation information of containers in the created or modified container group is obtained, and a security identification result of the cluster audit event related to the target service account is determined based on the operation information of the containers in the created or modified container group.
也就是说,当需要关注的服务账号创建或修改容器组,他人可能利用需要关注的服务账号,在创建或修改的容器组中容器执行不安全容器行为。因此,检测创建或修改的容器组中容器的运行信息,判断需要关注的服务账号创建或修改容器组的集群审计事件是否安全。That is, when a service account that needs attention creates or modifies a container group, others may use the service account that needs attention to perform unsafe container behaviors in the containers in the created or modified container group. Therefore, the running information of the containers in the created or modified container group is detected to determine whether the cluster audit event of the service account that needs attention creating or modifying the container group is safe.
本申请实施例对于根据创建或修改的容器组中容器的运行信息,确定与目标服务账号相关的集群审计事件的安全识别结果方式不作限制,例如,若创建或修改的容器组中容器的运行信息,涉及关键软件执行、反弹shell、内存木马、后门驻留、凭证窃取、容器逃逸、端口扫描、远程控制、数据转移等行为,确定表征集群审计事件不安全的安全识别结果。The embodiments of the present application do not limit the method of determining the security identification result of the cluster audit event related to the target service account based on the running information of the container in the created or modified container group. For example, if the running information of the container in the created or modified container group involves key software execution, rebound shell, memory Trojan, backdoor residence, credential theft, container escape, port scanning, remote control, data transfer and other behaviors, a security identification result representing that the cluster audit event is unsafe is determined.
如此,通过针对存在信息泄露风险的目标服务账号的集群操作行为进行检测,以及针对存在信息泄露风险的目标服务账号创建的容器资产的容器行为进行检测,实现与目标服务账号相关的集群审计事件的安全识别。In this way, by detecting the cluster operation behavior of the target service account with information leakage risk, and detecting the container behavior of the container assets created by the target service account with information leakage risk, the cluster audit events related to the target service account can be securely identified.
S204:根据安全识别结果,生成第一计算集群的检测结果。S204: Generate a detection result of the first computing cluster according to the security identification result.
通过针对存在信息泄露风险的目标服务账号的集群审计事件进行安全识别,能够实现第一计算集群的检测。By performing security identification on cluster audit events of target service accounts with information leakage risks, the first computing cluster can be detected.
在一些可能的实现方式中,获取设定时间段内的至少一个安全识别结果,根据设定时间段内的至少一个所述安全识别结果,生成第一计算集群的检测结果。也就是说,统计设定时间段内与目标服务账号相关的集群审计事件的安全情况,综合判定第一计算集群的检测结果。In some possible implementations, at least one security identification result within a set time period is obtained, and a detection result of the first computing cluster is generated based on at least one of the security identification results within the set time period. In other words, the security status of cluster audit events related to the target service account within the set time period is counted to comprehensively determine the detection result of the first computing cluster.
其中,设定时间段可以基于实际业务需求进行设置,例如,设定时间段可以为2小时。The set time period can be set based on actual business needs. For example, the set time period can be 2 hours.
在一些实施例中,当设定时间段内表征集群审计事件不安全的安全识别结果的数量达到设定阈值(例如是3个),则判定第一计算集群的检测结果为不安全,存在计算集群失陷的可能。In some embodiments, when the number of security identification results indicating that cluster audit events are unsafe reaches a set threshold (eg, 3) within a set time period, the detection result of the first computing cluster is determined to be unsafe, and there is a possibility that the computing cluster may be compromised.
在另一些实施例中,在表征集群审计事件不安全的安全识别结果中,进一步针对不安全等级进行划分。此时,当设定时间段内表征集群审计事件不安全的安全识别结果中,不同不安全等级的数量满足对应的设定阈值(例如是不安全等级为高危的数量达到2个,不安全等级为低危的数量达到1个),则判定第一计算集群的检测结果为不安全,存在计算集群失陷的可能。In other embodiments, in the security identification results that characterize the insecurity of cluster audit events, the insecurity levels are further divided. At this time, when the number of different insecurity levels in the security identification results that characterize the insecurity of cluster audit events within a set time period meets the corresponding set threshold (for example, the number of insecurity levels of high risk reaches 2, and the number of insecurity levels of low risk reaches 1), the detection result of the first computing cluster is determined to be insecure, and there is a possibility of computing cluster loss.
其中,设定阈值可以基于实际业务需求进行设置,本申请实施例对此不作限制。Among them, the threshold value can be set based on actual business needs, and the embodiments of the present application do not limit this.
进一步地,当第一计算集群的检测结果为不安全时,还可以产生告警信息,以告知用户(例如是安全运营人员)存在计算集群失陷的可能,以便进行快速处置。Furthermore, when the detection result of the first computing cluster is unsafe, an alarm message may be generated to inform the user (eg, a security operator) that there is a possibility of the computing cluster being compromised, so as to facilitate rapid disposal.
在该方法中,通过识别出计算集群中的目标容器组,结合针对与目标容器组相关的事件,确定出需要关注的目标服务账号。通过检测与目标服务账号相关的集群审计事件,判断目标服务账号是否针对计算集群存在不安全访问或操作行为。如此,在计算集群运行的过程中,实现集群维度的安全检测。In this method, by identifying the target container group in the computing cluster and combining it with events related to the target container group, the target service account that needs attention is determined. By detecting cluster audit events related to the target service account, it is determined whether the target service account has unsafe access or operation behavior against the computing cluster. In this way, cluster-level security detection is achieved during the operation of the computing cluster.
上文结合图1至图3对本申请实施例提供的集群检测方法进行了详细介绍,下面将结合附图对本申请实施例提供的装置、设备进行介绍。The above text has described in detail the cluster detection method provided in the embodiment of the present application in conjunction with Figures 1 to 3. The following text will describe the apparatus and device provided in the embodiment of the present application in conjunction with the accompanying drawings.
参见图4所示的集群检测装置的结构示意图,该装置40包括:Referring to the schematic structural diagram of a cluster detection device shown in FIG4 , the device 40 includes:
第一确定模块401,用于从第一计算集群部署的多个容器组中,确定目标容器组;其中,所述目标容器组基于容器组信息和角色访问控制信息中的至少一种确定;A first determination module 401 is used to determine a target container group from multiple container groups deployed in the first computing cluster; wherein the target container group is determined based on at least one of container group information and role access control information;
第二确定模块402,用于响应于检测到以下至少一种事件:针对第一容器组中容器的目标文件读取事件和第二容器组中容器触发的关键事件,将与所述第一容器组和所述第二容器组中的至少一种关联的服务账号确定为目标服务账号;其中,所述第一容器组、所述第二容器组为所述目标容器组中的至少一个容器组;The second determining module 402 is configured to determine, in response to detecting at least one of the following events: a target file read event for a container in the first container group and a key event triggered by a container in the second container group, a service account associated with at least one of the first container group and the second container group as a target service account; wherein the first container group and the second container group are at least one container group in the target container group;
识别模块403,用于响应于检测到与所述目标服务账号相关的集群审计事件,确定与所述目标服务账号相关的集群审计事件的安全识别结果;an identification module 403, configured to determine a security identification result of the cluster audit event related to the target service account in response to detecting the cluster audit event related to the target service account;
检测模块404,用于根据所述安全识别结果,生成所述第一计算集群的检测结果。The detection module 404 is configured to generate a detection result of the first computing cluster according to the security identification result.
在一些可能的实现方式中,所述第一确定模块401具体用于:In some possible implementations, the first determining module 401 is specifically configured to:
获取第一计算集群部署的多个容器组的以下至少一种信息:容器组信息和角色访问控制信息;Obtain at least one of the following information of multiple container groups deployed by the first computing cluster: container group information and role access control information;
将以下至少一种确定为目标容器组:所述容器组信息满足第一设定条件的容器组和与所述角色访问控制信息满足第二设定条件的服务账号关联的容器组。At least one of the following is determined as the target container group: a container group whose container group information satisfies a first set condition and a container group associated with a service account whose role access control information satisfies a second set condition.
在一些可能的实现方式中,所述第一确定模块401具体用于:In some possible implementations, the first determining module 401 is specifically configured to:
响应于检测到第一计算集群的集群审计事件,从所述第一计算集群的集群审计事件中,提取以下至少一种信息:容器组信息和角色访问控制信息。In response to detecting a cluster audit event of the first computing cluster, extracting at least one of the following information from the cluster audit event of the first computing cluster: container group information and role access control information.
在一些可能的实现方式中,所述第一确定模块401具体用于:In some possible implementations, the first determining module 401 is specifically configured to:
调用容器编排系统的信息获取接口,获取第一计算集群部署的多个容器组的以下至少一种信息:容器组信息和角色访问控制信息;其中,所述容器编排系统用于管理所述第一计算集群部署的多个容器组。Calling an information acquisition interface of a container orchestration system to obtain at least one of the following information of multiple container groups deployed by the first computing cluster: container group information and role access control information; wherein the container orchestration system is used to manage the multiple container groups deployed by the first computing cluster.
在一些可能的实现方式中,所述针对第一容器组中容器的目标文件读取事件包括:除所述第一计算集群的主进程外的其他进程,读取第一容器组中容器的与服务账号相关的文件的事件。In some possible implementations, the target file reading event for the container in the first container group includes: an event in which a process other than the main process of the first computing cluster reads a file related to a service account in a container in the first container group.
在一些可能的实现方式中,所述识别模块403具体用于:In some possible implementations, the identification module 403 is specifically configured to:
响应于检测到第一计算集群的集群审计事件,从所述第一计算集群的集群审计事件中,提取角色访问控制信息;In response to detecting a cluster audit event of a first computing cluster, extracting role access control information from the cluster audit event of the first computing cluster;
响应于所述角色访问控制信息对应的服务账号为所述目标服务账号,确定所述集群审计事件的安全识别结果。In response to the service account corresponding to the role access control information being the target service account, a security identification result of the cluster audit event is determined.
在一些可能的实现方式中,所述识别模块403具体用于:In some possible implementations, the identification module 403 is specifically configured to:
响应于检测到与所述目标服务账号相关的集群审计事件,当所述与所述目标服务账号相关的集群审计事件满足第三设定条件,确定表征集群审计事件不安全的安全识别结果。In response to detecting a cluster audit event related to the target service account, when the cluster audit event related to the target service account satisfies a third set condition, a security identification result indicating that the cluster audit event is unsafe is determined.
在一些可能的实现方式中,所述识别模块403具体用于:In some possible implementations, the identification module 403 is specifically configured to:
响应于检测到与所述目标服务账号相关的集群审计事件,且所述与所述目标服务账号相关的集群审计事件为用于创建容器组或修改容器组的事件,获取创建或修改的容器组中容器的运行信息;In response to detecting a cluster audit event related to the target service account, and the cluster audit event related to the target service account is an event for creating or modifying a container group, obtaining operation information of a container in the created or modified container group;
根据所述创建或修改的容器组中容器的运行信息,确定与所述目标服务账号相关的集群审计事件的安全识别结果。Determine a security identification result of a cluster audit event related to the target service account according to the running information of the container in the created or modified container group.
在一些可能的实现方式中,所述检测模块404具体用于:In some possible implementations, the detection module 404 is specifically configured to:
获取设定时间段内的至少一个所述安全识别结果;Obtaining at least one of the security identification results within a set time period;
根据所述设定时间段内的至少一个所述安全识别结果,生成所述第一计算集群的检测结果。A detection result of the first computing cluster is generated according to at least one of the security identification results within the set time period.
根据本申请实施例的集群检测装置40可对应于执行本申请实施例中描述的方法,并且集群检测装置40的各个模块/单元的上述和其它操作和/或功能分别为了实现图2所示实施例中的各个方法的相应流程,为了简洁,在此不再赘述。The cluster detection device 40 according to the embodiment of the present application may correspond to executing the method described in the embodiment of the present application, and the above and other operations and/or functions of each module/unit of the cluster detection device 40 are respectively for implementing the corresponding processes of each method in the embodiment shown in Figure 2, which will not be repeated here for the sake of brevity.
本申请实施例还提供了一种电子设备。该电子设备具体用于实现如图4所示实施例中集群检测装置40的功能。The embodiment of the present application also provides an electronic device, which is specifically used to implement the function of the cluster detection device 40 in the embodiment shown in FIG. 4 .
图5提供了一种电子设备500的结构示意图,如图5所示,电子设备500包括总线501、处理器502、通信接口503和存储器504。处理器502、存储器504和通信接口503之间通过总线501通信。FIG5 provides a schematic diagram of the structure of an electronic device 500. As shown in FIG5, the electronic device 500 includes a bus 501, a processor 502, a communication interface 503 and a memory 504. The processor 502, the memory 504 and the communication interface 503 communicate with each other via the bus 501.
总线501可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图5中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 501 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, FIG5 is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.
处理器502可以为中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、微处理器(micro processor,MP)或者数字信号处理器(digital signal processor,DSP)等处理器中的任意一种或多种。The processor 502 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
通信接口503用于和外部通信。例如,通信接口503可以用于和终端通信。The communication interface 503 is used for communicating with the outside. For example, the communication interface 503 can be used for communicating with a terminal.
存储器504可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器504还可以包括非易失性存储器(non-volatilememory),例如只读存储器(read-only memory,ROM),快闪存储器,硬盘驱动器(hard diskdrive,HDD)或固态驱动器(solid state drive,SSD)。The memory 504 may include a volatile memory, such as a random access memory (RAM). The memory 504 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
存储器504中存储有可执行代码,处理器502执行该可执行代码以执行前述集群检测方法。The memory 504 stores executable codes, and the processor 502 executes the executable codes to perform the aforementioned cluster detection method.
具体地,在实现图4所示实施例的情况下,且图4实施例中所描述的集群检测装置40的各模块或单元为通过软件实现的情况下,执行图4中的各模块/单元功能所需的软件或程序代码可以部分或全部存储在存储器504中。处理器502执行存储器504中存储的各单元对应的程序代码,执行前述集群检测方法。Specifically, in the case of implementing the embodiment shown in FIG4 , and in the case where each module or unit of the cluster detection device 40 described in the embodiment of FIG4 is implemented by software, the software or program code required to execute the functions of each module/unit in FIG4 may be partially or completely stored in the memory 504. The processor 502 executes the program code corresponding to each unit stored in the memory 504 to execute the aforementioned cluster detection method.
本申请实施例还提供了一种计算机可读存储介质。所述计算机可读存储介质可以是计算设备能够存储的任何可用介质或者是包含一个或多个可用介质的数据中心等数据存储设备。所述可用介质可以是磁性介质(例如软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。该计算机可读存储介质包括指令,所述指令指示计算设备执行上述应用于集群检测装置40的集群检测方法。The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned cluster detection method applied to the cluster detection device 40.
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括一个或多个计算机指令。在计算设备上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。The embodiment of the present application further provides a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机或数据中心进行传输。The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
所述计算机程序产品被计算机执行时,所述计算机执行前述集群检测方法的任一方法。该计算机程序产品可以为一个软件安装包,在需要使用前述集群检测方法的任一方法的情况下,可以下载该计算机程序产品并在计算机上执行该计算机程序产品。When the computer program product is executed by a computer, the computer executes any of the aforementioned cluster detection methods. The computer program product may be a software installation package, and when any of the aforementioned cluster detection methods is needed, the computer program product may be downloaded and executed on a computer.
附图中的流程图和框图,图示了按照本申请各个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to each embodiment of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元/模块的名称在某种情况下并不构成对该单元本身的限定。The units involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the unit/module does not, in some cases, constitute a limitation on the unit itself.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
在本申请实施例的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present application embodiment, machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
需要说明的是,本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统或装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And/or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and/or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character "/" generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411546406.XA CN119442282B (en) | 2024-10-31 | 2024-10-31 | Cluster detection method, device, equipment, medium and product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411546406.XA CN119442282B (en) | 2024-10-31 | 2024-10-31 | Cluster detection method, device, equipment, medium and product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN119442282A CN119442282A (en) | 2025-02-14 |
CN119442282B true CN119442282B (en) | 2025-05-30 |
Family
ID=94526637
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202411546406.XA Active CN119442282B (en) | 2024-10-31 | 2024-10-31 | Cluster detection method, device, equipment, medium and product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN119442282B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115086166A (en) * | 2022-05-19 | 2022-09-20 | 阿里巴巴(中国)有限公司 | Computing system, container network configuration method, and storage medium |
CN116170274A (en) * | 2023-02-02 | 2023-05-26 | 深圳华为云计算技术有限公司 | Web application access method, device, system and computing equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US12231449B2 (en) * | 2022-04-22 | 2025-02-18 | Netapp, Inc. | Proactively taking action responsive to events within a cluster based on a range of normal behavior learned for various user roles |
CN117997563A (en) * | 2022-11-02 | 2024-05-07 | 腾讯科技(深圳)有限公司 | Security access management method for container cluster, related equipment and storage medium |
CN118337437A (en) * | 2024-04-12 | 2024-07-12 | 中移(苏州)软件技术有限公司 | A Kubernetes cluster management method, device, equipment, medium and program product |
-
2024
- 2024-10-31 CN CN202411546406.XA patent/CN119442282B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115086166A (en) * | 2022-05-19 | 2022-09-20 | 阿里巴巴(中国)有限公司 | Computing system, container network configuration method, and storage medium |
CN116170274A (en) * | 2023-02-02 | 2023-05-26 | 深圳华为云计算技术有限公司 | Web application access method, device, system and computing equipment |
Also Published As
Publication number | Publication date |
---|---|
CN119442282A (en) | 2025-02-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11068585B2 (en) | Filesystem action profiling of containers and security enforcement | |
US11055411B2 (en) | System and method for protection against ransomware attacks | |
CN111819544B (en) | Pre-deployment security analyzer service for virtual computing resources | |
US10154066B1 (en) | Context-aware compromise assessment | |
US11102220B2 (en) | Detection of botnets in containerized environments | |
JP5736090B2 (en) | Method, system and computer program for memory protection of virtual guest | |
JP5396051B2 (en) | Method and system for creating and updating a database of authorized files and trusted domains | |
US8782351B2 (en) | Protecting memory of a virtual guest | |
US20230247042A1 (en) | Techniques for forensic tracing of suspicious activity from cloud computing logs | |
US9977896B2 (en) | Systems and methods for generating policies for an application using a virtualized environment | |
US20180026986A1 (en) | Data loss prevention system and data loss prevention method | |
CN115373798A (en) | A detection and defense method for intelligent IoT terminal container escape attack | |
CN114978697A (en) | Network information system endogenous security defense method, device, equipment and medium | |
CN114138590A (en) | Operation and maintenance processing method, device and electronic device of Kubernetes cluster | |
CN110659478B (en) | Method for detecting malicious files preventing analysis in isolated environment | |
US11983272B2 (en) | Method and system for detecting and preventing application privilege escalation attacks | |
US10262131B2 (en) | Systems and methods for obtaining information about security threats on endpoint devices | |
US20250184352A1 (en) | Detecting malware infection path in a cloud computing environment utilizing a security graph | |
CN114598500B (en) | Security service providing method, platform, electronic device, medium and program | |
CN119442282B (en) | Cluster detection method, device, equipment, medium and product | |
EP3588346A1 (en) | Method of detecting malicious files resisting analysis in an isolated environment | |
CN118627068A (en) | A method for detecting Windows memory Trojans | |
CN120729552A (en) | Method, system and medium for detecting cloud identity abuse in cloud computing environment | |
HK1248870B (en) | Data loss prevention system and data loss prevention method | |
HK1237470A1 (en) | Access control system and access control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |