Try in Splunk Security Cloud

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.

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

  • Last Updated: 2024-05-27
  • Author: Teoderick Contreras, Splunk
  • ID: b8f7ed6b-0556-4c84-bffd-839c262b0278

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1134.001 Token Impersonation/Theft 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
6
`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 Computer SourceImage TargetImage SourceProcessGUID TargetProcessGUID SourceProcessId TargetProcessId GrantedAccess CallTrace 
| rename Computer as dest
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `windows_access_token_winlogon_duplicate_handle_in_uncommon_path_filter`

Macros

The SPL above uses the following Macros:

:information_source: windows_access_token_winlogon_duplicate_handle_in_uncommon_path_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
  • SourceImage
  • TargetImage
  • SourceProcessGUID
  • TargetProcessGUID
  • SourceProcessId
  • TargetProcessId
  • GrantedAccess
  • CallTrace
  • dest
  • user_id

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.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
49.0 70 70 A process $SourceImage$ is duplicating the handle token of winlogon.exe on $dest$

: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