Defense Evasion (TA0005)(external, opens in a new tab or window)
text code block:sequence by process.entity_id, host.id with maxspan=30s [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and process.executable like ( "/tmp/*", "/var/tmp/*", "/dev/shm/*", "/run/*", "/var/run/*", "/var/www/*", "/proc/*/fd/*", "?memfd:*", "memfd:*" )] by process.executable [file where host.os.type == "linux" and event.action == "deletion"] by file.path
Install detection rules in Elastic Security
Detect Process Execution Followed by Self-Deletion 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).