Detection rules › Elastic

UAC Bypass via Windows Activation Execution Hijack

Time window
1m
Source
github.com/elastic/protections-artifacts

Identifies attempts to bypass User Account Control (UAC) via Windows activation changepk.exe execution hijack. Attackers bypass UAC to stealthily execute code with elevated permissions.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies attempts to bypass User Account Control (UAC) via Windows activation changepk.exe execution hijack. Attackers
bypass UAC to stealthily execute code with elevated permissions.
"""
id = "71ad1420-ed83-46d0-835b-63d4b2008427"
license = "Elastic License v2"
name = "UAC Bypass via Windows Activation Execution Hijack"
os_list = ["windows"]
reference = [
    "https://github.com/hfiref0x/UACME",
    "https://medium.com/@mattharr0ey/privilege-escalation-uac-bypass-in-changepk-c40b92818d1b",
]
version = "1.0.33"

query = '''
sequence with maxspan=60s
 [registry where registry.hive == "HKEY_USERS" and
   registry.key :
          ("S-1-5-21-*Classes\\Launcher.SystemSettings\\shell\\open\\command",
           "S-1-5-21-*Classes\\exefile\\shell\\open\\command")]
 [process where event.action == "start" and
  process.parent.name : ("changepk.exe", "slui.exe") and
  process.Ext.token.integrity_level_name == "high" and
  not process.executable :
           ("?:\\Windows\\System32\\WerFault.exe",
            "?:\\Windows\\SysWOW64\\WerFault.exe",
            "?:\\Windows\\System32\\changepk.exe",
            "?:\\WINDOWS\\system32\\slui.exe")]
'''

min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1548"
name = "Abuse Elevation Control Mechanism"
reference = "https://attack.mitre.org/techniques/T1548/"
[[threat.technique.subtechnique]]
id = "T1548.002"
name = "Bypass User Account Control"
reference = "https://attack.mitre.org/techniques/T1548/002/"



[threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Stage 1: registry

[registry where registry.hive == "HKEY_USERS" and
   registry.key :
          ("S-1-5-21-*Classes\\Launcher.SystemSettings\\shell\\open\\command",
           "S-1-5-21-*Classes\\exefile\\shell\\open\\command")]

Stage 2: process

[process where event.action == "start" and
  process.parent.name : ("changepk.exe", "slui.exe") and
  process.Ext.token.integrity_level_name == "high" and
  not process.executable :
           ("?:\\Windows\\System32\\WerFault.exe",
            "?:\\Windows\\SysWOW64\\WerFault.exe",
            "?:\\Windows\\System32\\changepk.exe",
            "?:\\WINDOWS\\system32\\slui.exe")]

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.executableeq?:\Windows\System32\WerFault.exe, ?:\Windows\SysWOW64\WerFault.exe, ?:\Windows\System32\changepk.exe, ?:\WINDOWS\system32\slui.exeexcludes:process.executable

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.Ext.token.integrity_level_nameeq
  • high corpus 22 (elastic 22)
field:"process.Ext.token.integrity_level_name" kind:eq value:"high"
process.parent.namewildcard
  • changepk.exe corpus 2 (elastic 1, kusto 1)
  • slui.exe corpus 3 (elastic 2, splunk 1)
field:"parent_process_name" kind:wildcard
registry.hiveeq
  • HKEY_USERS corpus 4 (elastic 4)
field:"registry.hive" kind:eq value:"HKEY_USERS"
registry.keywildcard
  • S-1-5-21-*Classes\Launcher.SystemSettings\shell\open\command
  • S-1-5-21-*Classes\exefile\shell\open\command
field:"TargetObject" kind:wildcard