Defense Evasion (TA0005)(external, opens in a new tab or window)
text code block:from logs-cloud_defend.process* metadata _id, _index, _version | where host.os.type == "linux" and event.type == "start" and event.action == "exec" and container.id like "*" and process.name in ("docker", "docker-buildx", "buildah", "buildctl", "img", "nerdctl") and kql("""process.args: ("build" or "bud")""") | keep @timestamp, host.id, container.id, process.name, process.args, process.parent.name, process.parent.executable, user.id, _id, _index, _version
Install detection rules in Elastic Security
Detect Container Image Built Inside a Container 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).