Runuser Executed via Suspicious Parent
Description
Identifies the execution of the runuser command via a suspicious parent process. This may be used by malicious actors to gain access to a user's account without requiring the user to enter their password, after collecting the user's password, potentially via a social engineering attack.
Query · eql
process where event.type == "start" and event.action == "exec" and process.name == "runuser" and
process.parent.executable like ("/tmp/*", "/var/tmp/*", "/dev/shm/*", "/run/user/*", "/var/run/user/*", "/home/*/*", "/root/*") and
not (
process.parent.executable like (
"/home/*/.local/share/uv/python/cpython-*-linux-x86_64-gnu/bin/python3*", "/tmp/newroot/var/lib/dpkg/info/*.postinst",
"/root/.codex/packages/standalone/releases/*-x86_64-unknown-linux-musl/bin/codex", "/tmp/newroot/usr/sbin/akmods",
"/root/.gxsetup/cvpkgadd/install"
) or
process.parent.command_line == "/bin/bash /root/startup.sh"
)