Windows Access Token Manipulation SeDebugPrivilege
Description
The following analytic identifies a suspicious process enabling the "SeDebugPrivilege" privilege token. SeDebugPrivilege allows a process to inspect and adjust the memory of other processes, and has long been a security concern. SeDebugPrivilege allows the token bearer to access any process or thread, regardless of security descriptors, per Palantir. This technique is abused by adversaries to gain debug privileges with their malicious software to be able to access or debug a process to dump credentials or to inject malicious code.
- Type: Anomaly
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2022-08-24
- Author: Teoderick Contreras, Splunk
- ID: 6ece9ed0-5f92-4315-889d-48560472b188
Annotations
ATT&CK
Kill Chain Phase
- Exploitation
NIST
- DE.AE
CIS20
- CIS 10
CVE
Search
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:
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$. |
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
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4703
- https://devblogs.microsoft.com/oldnewthing/20080314-00/?p=23113
- https://blog.palantir.com/windows-privilege-abuse-auditing-detection-and-defense-3078a403d74e
- https://atomicredteam.io/privilege-escalation/T1134.001/#atomic-test-2—%60sedebugprivilege%60-token-duplication
- https://malpedia.caad.fkie.fraunhofer.de/details/win.asyncrat
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: 1