Chroot Execution Detected via Defend for Containers

Last updated a day ago on 2026-03-26
Created a day ago on 2026-03-26

About

This rule detects when chroot is executed inside a container. Chroot is a Linux utility that allows a user to run a command in a different directory. This can be used to escape a container and gain access to the host system.
Tags
Data Source: Elastic Defend for ContainersDomain: ContainerOS: LinuxUse Case: Threat DetectionTactic: Privilege EscalationLanguage: eql
Severity
low
Risk Score
21
MITRE ATT&CK™

Privilege Escalation (TA0004)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-cloud_defend.process*
Related Integrations

cloud_defend(external, opens in a new tab or window)

Query
text code block:
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and ( process.name == "chroot" or ( /* account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg */ process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "busybox") and process.args in ( "chroot", "/bin/chroot", "/usr/bin/chroot", "/usr/local/bin/chroot" ) and /* default exclusion list to not FP on default multi-process commands */ not process.args in ( "which", "/bin/which", "/usr/bin/which", "/usr/local/bin/which", "man", "/bin/man", "/usr/bin/man", "/usr/local/bin/man", "chmod", "/bin/chmod", "/usr/bin/chmod", "/usr/local/bin/chmod", "chown", "/bin/chown", "/usr/bin/chown", "/usr/local/bin/chown" ) ) ) and container.id like "?*"

Install detection rules in Elastic Security

Detect Chroot Execution Detected via Defend for Containers in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).