Privilege Escalation (TA0004)(external, opens in a new tab or window)
Persistence (TA0003)(external, opens in a new tab or window)
Defense Evasion (TA0005)(external, opens in a new tab or window)
text code block:process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and ( (process.user.id == "0" and process.real_user.id != "0") or (process.group.id == "0" and process.real_group.id != "0") ) and process.args in ( "/bin/su", "/usr/bin/su", "/usr/bin/sudo", "/bin/mount", "/usr/bin/mount", "/bin/umount", "/usr/bin/umount", "/usr/bin/fusermount3", "/bin/passwd", "/usr/bin/passwd", "/bin/chfn", "/usr/bin/chfn", "/bin/chsh", "/usr/bin/chsh", "/bin/gpasswd", "/usr/bin/gpasswd", "/bin/newgrp", "/usr/bin/newgrp", "/sbin/unix_chkpwd", "/usr/sbin/unix_chkpwd", "/usr/bin/newuidmap", "/usr/bin/newgidmap", "/usr/lib/dbus-1.0/dbus-daemon-launch-helper", "/usr/libexec/dbus-daemon-launch-helper", "/usr/lib/openssh/ssh-keysign", "/usr/libexec/openssh/ssh-keysign", "/usr/bin/pkexec", "/usr/libexec/pkexec", "/usr/lib/polkit-1/pkexec", "/usr/lib/polkit-1/polkit-agent-helper-1", "/usr/libexec/polkit-agent-helper-1", "/usr/lib/snapd/snap-confine" ) and process.parent.args_count == 1
Install detection rules in Elastic Security
Detect Potential Privilege Escalation via SUID/SGID Proxy 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(external, opens in a new tab or window).