Detection rules › Splunk

Windows Access Token Winlogon Duplicate Handle In Uncommon Path

Author
Teoderick Contreras, Splunk
Source
upstream

The following analytic detects a process attempting to duplicate the handle of winlogon.exe from an uncommon or public source path. This is identified using Sysmon EventCode 10, focusing on processes targeting winlogon.exe with specific access rights and excluding common system paths. This activity is significant because it may indicate an adversary trying to escalate privileges by leveraging the high-privilege tokens associated with winlogon.exe. If confirmed malicious, this could allow the attacker to gain elevated access, potentially leading to full system compromise and persistent control over the affected host.

MITRE ATT&CK coverage

TacticTechniques
Privilege EscalationT1134.001 Access Token Manipulation: Token Impersonation/Theft
Defense EvasionT1134.001 Access Token Manipulation: Token Impersonation/Theft

Event coverage

ProviderEvent IDTitle
Sysmon10ProcessAccess

Stages and Predicates

Stage 1: search

search NOT SourceImage IN ("%systemroot%\\*", "C:\\Program File*", "C:\\Windows\\*") EventCode=10 GrantedAccess=0x1040 TargetImage IN ("*\\SysWOW64\\winlogon.exe*", "*\\system32\\winlogon.exe*")

Stage 2: stats

stats BY CallTrace, EventID, GrantedAccess, Guid, Opcode, ProcessID, SecurityID, SourceImage, SourceProcessGUID, SourceProcessId, TargetImage, TargetProcessGUID, TargetProcessId, UserID, dest, granted_access, parent_process_exec, parent_process_guid, parent_process_id, parent_process_name, parent_process_path, process_exec, process_guid, process_id, process_name, process_path, signature, signature_id, user_id, vendor_product

Stage 3: search

search

Stage 4: search

search

Stage 5: search

search `macro`

Exclusions

Top-level NOT(...) conjuncts — predicates this rule actively suppresses.

StageFieldKindExcluded values
1Imagein"%systemroot%\\*", "C:\\Program File*", "C:\\Windows\\*"

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
EventCodeeq
  • 10 corpus 14 (splunk 14)
GrantedAccesseq
  • 0x1040 corpus 2 (splunk 2)
TargetImagein
  • "*\\SysWOW64\\winlogon.exe*" corpus 2 (splunk 2)
  • "*\\system32\\winlogon.exe*" corpus 2 (splunk 2)

Neighbors

Broader alternatives (more inclusive than this rule)

These rules match a superset of what this rule catches. They cover the same events plus more. Use them if you want wider coverage and can absorb more false positives.