Skip to content
Threat Feed
high advisory

Potential Privilege Escalation in Container via Runc Init

Detection of runc init child processes with root effective user and non-root login user ID, indicating potential container privilege escalation.

This detection identifies a potential privilege escalation vulnerability within container environments utilizing runc, the low-level container runtime used by Docker and containerd. The rule focuses on audit events triggered by runc init child processes. Specifically, it flags instances where the effective user ID is root (0), while the login user ID is not root. This discrepancy can indicate malicious activity, such as exploiting credential separation or namespace transitions to gain unauthorized root privileges within the container or escape to the host. This is relevant for defenders because a compromised container can lead to host compromise, data exfiltration, or denial of service.

Attack Chain

  1. Attacker gains initial access to a container with limited privileges.
  2. The attacker exploits a vulnerability within the container to execute code as the runc init process.
  3. The runc init process spawns a child process while retaining a non-root user ID in audit telemetry.
  4. The child process is assigned an effective user ID of 0 (root), bypassing normal permission controls.
  5. The attacker leverages the elevated privileges to modify sensitive files or execute commands as root within the container’s namespace.
  6. The attacker may then attempt to escape the container by exploiting kernel vulnerabilities or misconfigurations to gain access to the host system.
  7. Upon gaining access to the host system, the attacker can install malware, steal sensitive data, or disrupt services.

Impact

A successful privilege escalation attack within a container environment can lead to complete compromise of the container and potentially the host system. This can result in data breaches, service disruptions, and unauthorized access to sensitive resources. The impact is significant because a single compromised container can become a launchpad for attacks against other containers or the underlying infrastructure.

Recommendation

  • Deploy the Sigma rule “Potential Privilege Escalation via Runc Init” to your SIEM to detect suspicious runc init process executions.
  • Enable Linux audit logging via the Auditd Manager integration, ensuring that execve and identity-related fields are captured.
  • Investigate any alerts generated by the Sigma rule by examining the full audit event details, including process ancestry, user IDs, and container metadata.
  • Review container configurations and security profiles to identify potential misconfigurations that could facilitate privilege escalation.
  • Implement network segmentation to limit the blast radius of a compromised container.

Detection coverage 2

Potential Privilege Escalation via Runc Init

high

Detects runc init child processes with root effective user and non-root login user ID, indicating potential container privilege escalation.

sigma tactics: privilege_escalation techniques: T1611 sources: process_creation, linux

Suspicious Runc Process with capabilities

medium

Detects runc processes spawning with specific capabilities that may lead to container escape.

sigma tactics: privilege_escalation techniques: T1611 sources: process_creation, linux

Detection queries are kept inside the platform. Get full rules →