Privilege Escalation (TA0004)(external, opens in a new tab or window)
text code block:host.os.type:linux and event.category:process and event.action:(exec or executed) and user.id:(* and not 0) and process.executable:(* and not (/bin/* or /nix/store/*/bin/sudo or /run/wrappers/wrappers*/sudo or /sbin/* or /usr/bin/* or /usr/sbin/*)) and user.effective.id:0 and process.args:-p
Install detection rules in Elastic Security
Detect Potential Root Effective Shell from Non-Standard Path via Auditd 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).