Privilege Escalation (TA0004)(external, opens in a new tab or window)
text code block:authentication where host.os.type : "windows" and winlog.event_data.LogonProcessName : "Advapi*" and winlog.logon.type == "Interactive" and winlog.event_data.SubjectUserSid : ("S-1-5-21*", "S-1-12-*") and winlog.event_data.TargetUserSid : ("S-1-5-21*", "S-1-12-*") and process.executable : "C:\\*" and not startswith~(winlog.event_data.SubjectUserSid, winlog.event_data.TargetUserSid) and not process.executable : ("?:\\Windows\\System32\\winlogon.exe", "?:\\Windows\\System32\\wininit.exe", "?:\\Program Files\\*.exe", "?:\\Program Files (x86)\\*.exe", "?:\\Windows\\SysWOW64\\inetsrv\\w3wp.exe", "?:\\Windows\\System32\\inetsrv\\w3wp.exe", "?:\\Windows\\SysWOW64\\msiexec.exe")
Install detection rules in Elastic Security
Detect Interactive Logon by an Unusual Process 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).