Persistence (TA0003)(external, opens in a new tab or window)
text code block:iam where host.os.type == "linux" and event.type in ("creation", "change") and auditd.result == "success" and event.action in ("changed-password", "added-user-account", "added-group-account-to") and process.name != null
Install detection rules in Elastic Security
Detect User or Group Creation/Modification 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).