Potential Direct Kubelet API Access via Process Arguments
This rule detects potential direct Kubelet API access attempts on Linux by identifying process executions whose arguments contain URLs targeting Kubelet ports (10250/10255) enabling discovery and lateral movement in Kubernetes environments.
This detection identifies potential direct Kubelet API access attempts on Linux systems. The Kubelet, acting as the primary node agent, exposes an API accessible via ports 10250 and 10255. Attackers may exploit this API to enumerate pods, fetch logs, or even attempt remote execution. This access can lead to significant breaches in Kubernetes environments, facilitating discovery, lateral movement, and ultimately, compromise of sensitive data or control over cluster resources. The detection focuses on identifying process executions where the command-line arguments contain URLs targeting these Kubelet ports, indicating a potential attempt to interact with the Kubelet API directly.
Attack Chain
- An attacker gains initial access to a compromised host within the Kubernetes cluster or a host with network access to the Kubelet ports.
- The attacker uses a utility like
curl,wget,python, or similar tools to craft an HTTP request targeting the Kubelet API on ports 10250 or 10255. - The request includes a path like
/pods,/runningpods,/metrics,/exec, or/containerLogsto gather information about the cluster’s state and configuration. - The attacker examines the response to identify potential targets for lateral movement, such as specific pods or containers of interest.
- The attacker attempts to execute commands within a container using the
/execendpoint, potentially leveraging exposed service account tokens or other credentials. - The attacker uses gathered information to move laterally to other pods or nodes within the cluster, escalating privileges as they go.
- The attacker compromises sensitive data or critical applications running within the Kubernetes cluster.
Impact
Successful exploitation can lead to full cluster compromise. Attackers can gain unauthorized access to sensitive data, disrupt critical applications, and move laterally to other resources within the Kubernetes environment. This could lead to significant financial losses, reputational damage, and legal liabilities. The potential impact includes data breaches, denial of service, and complete control over the Kubernetes infrastructure.
Recommendation
- Deploy the Sigma rule
Kubelet API Access via Process Argumentsto your SIEM to detect suspicious process executions. - Restrict access to Kubelet ports 10250/10255 at the network layer to limit pod-to-node or host-to-node traffic as recommended in the overview section.
- Harden Kubelet configuration by disabling anonymous authentication and enforcing webhook authentication/authorization as described in the overview section.
Detection coverage 2
Kubelet API Access via Process Arguments
highDetects potential direct Kubelet API access attempts by identifying process executions with arguments containing URLs targeting Kubelet ports.
Suspicious Kubelet Access via Scripting Interpreter
highDetects potential direct Kubelet API access attempts via scripting interpreters using process arguments with URLs targeting Kubelet ports.
Detection queries are kept inside the platform. Get full rules →