Detection rules › Splunk
Windows Access Token Manipulation SeDebugPrivilege
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.
Known false positives
- Some native binaries and browser applications may request SeDebugPrivilege. Filter as needed.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4703: A user right was adjusted. |
Rule body
name: Windows Access Token Manipulation SeDebugPrivilege
id: 6ece9ed0-5f92-4315-889d-48560472b188
version: 23
creation_date: '2022-09-05'
modification_date: '2026-06-08'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
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.
data_source:
- Windows Event Log Security 4703
search: '`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 dest | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_access_token_manipulation_sedebugprivilege_filter`'
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.
references:
- 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
intermediate_findings:
entities:
- field: Computer
type: system
score: 20
message: A process $ProcessName$ adjust its privileges with SeDebugPrivilege on $Computer$.
analytic_story:
- Meduza Stealer
- PlugX
- CISA AA23-347A
- China-Nexus Threat Activity
- AsyncRAT
- SnappyBee
- Derusbi
- WinDealer RAT
- Salt Typhoon
- DarkGate Malware
- ValleyRAT
- Brute Ratel C4
- PathWiper
- GhostRedirector IIS Module and Rungan Backdoor
- Lokibot
- Scattered Lapsus$ Hunters
- Tuoni
- Gh0st RAT
- Salat Stealer
asset_type: Endpoint
mitre_attack_id:
- T1134.002
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`wineventlog_security` EventCode=4703 EnabledPrivilegeList = "*SeDebugPrivilege*" AND NOT(ProcessName IN ("*\\Program File*", "*\\System32\\lsass.exe*", "*\\SysWOW64\\lsass.exe*", "*\\SysWOW64\\svchost.exe*", "*\\System32\\svchost.exe*"))
Stage 2: stats
| stats count min(_time) as firstTime max(_time) as lastTime by Computer ProcessName ProcessId SubjectDomainName SubjectUserName SubjectUserSid TargetUserName TargetLogonId TargetDomainName EnabledPrivilegeList action dest
Stage 3: search
| `security_content_ctime(firstTime)`
Stage 4: search
| `security_content_ctime(lastTime)`
Stage 5: search
| `windows_access_token_manipulation_sedebugprivilege_filter`
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
ProcessName | in | "*\\Program File*", "*\\SysWOW64\\lsass.exe*", "*\\SysWOW64\\svchost.exe*", "*\\System32\\lsass.exe*", "*\\System32\\svchost.exe*" | excludes:ProcessName |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EnabledPrivilegeList | eq |
| field:"EnabledPrivilegeList" kind:eq |
EventCode | eq |
| field:"EventID" kind:eq value:"4703" |