Try in Splunk Security Cloud

Description

The following analytic detects a process enabling the "SeDebugPrivilege" privilege token. It leverages Windows Security Event Logs with EventCode 4703, filtering out common legitimate processes. This activity is significant because SeDebugPrivilege allows a process to inspect and modify the memory of other processes, potentially leading to credential dumping or code injection. If confirmed malicious, an attacker could gain extensive control over system processes, enabling them to escalate privileges, persist in the environment, or access sensitive information.

  • Type: Anomaly
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-05-20
  • Author: Teoderick Contreras, Splunk
  • ID: 6ece9ed0-5f92-4315-889d-48560472b188

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1134.002 Create Process with Token Defense Evasion, Privilege Escalation
T1134 Access Token Manipulation Defense Evasion, Privilege Escalation
Kill Chain Phase
  • Exploitation
NIST
  • DE.AE
CIS20
  • CIS 10
CVE
1
2
3
4
5
`wineventlog_security` EventCode=4703 EnabledPrivilegeList = "*SeDebugPrivilege*" AND NOT(ProcessName IN ("*\\Program File*", "*\\System32\\lsass.exe*", "*\\SysWOW64\\lsass.exe*", "*\\SysWOW64\\svchost.exe*", "*\\System32\\svchost.exe*")) 
| stats count min(_time) as firstTime max(_time) as lastTime by Computer ProcessName ProcessId SubjectDomainName SubjectUserName SubjectUserSid TargetUserName TargetLogonId TargetDomainName EnabledPrivilegeList action 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `windows_access_token_manipulation_sedebugprivilege_filter`

Macros

The SPL above uses the following Macros:

:information_source: windows_access_token_manipulation_sedebugprivilege_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • ProcessName
  • Security_ID
  • action
  • result
  • Process_ID
  • Message
  • member_dn
  • ComputerName
  • user

How To Implement

To successfully implement this search, you need to be ingesting Windows Security Event Logs with 4703 EventCode enabled. The Windows TA is also required.

Known False Positives

Some native binaries and browser applications may request SeDebugPrivilege. Filter as needed.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
36.0 60 60 A process $ProcessName$ adjust its privileges with SeDebugPrivilege on $Computer$.

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 2