Detection rules › Splunk

Windows Access Token Winlogon Duplicate Handle In Uncommon Path

Status
production
Severity
low
Group by
CallTrace, GrantedAccess, Guid, Opcode, SecurityID, SourceProcessGUID, TargetProcessGUID, dest, parent_process_guid, parent_process_id, parent_process_name, process_guid, process_id, process_name, signature, signature_id, source_process_name, target_process_name, user, user_id, vendor_product
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

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.

Known false positives

  • It is possible legitimate applications will request access to winlogon, filter as needed.

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 10: ProcessAccess

Rule body

name: Windows Access Token Winlogon Duplicate Handle In Uncommon Path
id: b8f7ed6b-0556-4c84-bffd-839c262b0278
version: 12
creation_date: '2022-09-01'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: 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.
data_source:
    - Sysmon EventID 10
search: '`sysmon` EventCode=10  TargetImage IN("*\\system32\\winlogon.exe*", "*\\SysWOW64\\winlogon.exe*") AND GrantedAccess = 0x1040 AND NOT (SourceImage IN("C:\\Windows\\*", "C:\\Program File*", "%systemroot%\\*")) | stats count min(_time) as firstTime max(_time) as lastTime 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 | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_access_token_winlogon_duplicate_handle_in_uncommon_path_filter`'
how_to_implement: To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.
known_false_positives: It is possible legitimate applications will request access to winlogon, filter as needed.
references:
    - https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-duplicatehandle
    - https://attack.mitre.org/techniques/T1134/001/
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: A process $SourceImage$ is duplicating the handle token of winlogon.exe on $dest$
threat_objects:
    - field: SourceImage
      type: process_name
analytic_story:
    - Brute Ratel C4
    - PathWiper
asset_type: Endpoint
mitre_attack_id:
    - T1134.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

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

Stage 2: stats

| stats count min(_time) as firstTime max(_time) as lastTime 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

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `windows_access_token_winlogon_duplicate_handle_in_uncommon_path_filter`

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
SourceImagein"%systemroot%\\*", "C:\\Program File*", "C:\\Windows\\*"excludes:SourceImage

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 10 corpus 23 (splunk 16, elastic 6, kusto 1)
field:"EventID" kind:eq value:"10"
GrantedAccesseq
  • 0x1040 corpus 2 (splunk 2)
field:"GrantedAccess" kind:eq value:"0x1040"
TargetImagein
  • "*\\SysWOW64\\winlogon.exe*"
  • "*\\system32\\winlogon.exe*"
field:"TargetImage" kind:in