Execution (TA0002)(external, opens in a new tab or window)
Command and Control (TA0011)(external, opens in a new tab or window)
text code block:sequence by container.id, user.id with maxspan=3s [file where host.os.type == "linux" and event.type == "creation" and process.interactive == true and container.id like "?*" and file.path like ("/tmp/*", "/var/tmp/*", "/dev/shm/*", "/root/*", "/home/*") and not process.name in ("apt", "apt-get", "dnf", "microdnf", "yum", "zypper", "tdnf", "apk", "pacman", "rpm", "dpkg")] by file.path [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and process.interactive == true and container.id like "?*"] by process.executable
Install detection rules in Elastic Security
Detect File Creation and 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).