endpoint(opens in a new tab or window)
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
process.name == "dracut" and process.parent.executable != null and not (
process.parent.executable like~ (
"/usr/lib/kernel/*", "/etc/kernel/install.d/*", "/var/lib/dpkg/info/dracut.postinst",
"/tmp/newroot/*", "/usr/lib/module-init-tools/*"
) or
process.parent.name in (
"dracut-install", "dracut", "run-parts", "weak-modules", "mkdumprd", "new-kernel-pkg", "sudo"
) or
process.parent.args like~ ("/usr/bin/dracut-rebuild", "/var/tmp/rpm-tmp.*") or
process.parent.command_line like~ "/bin/sh -c if command -v mkinitcpio*"
)
Install detection rules in Elastic Security
Detect Manual Dracut Execution 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(opens in a new tab or window).