Detection rules › Elastic
UAC Bypass Attempt via Windows Directory Masquerading
Identifies an attempt to bypass User Account Control (UAC) by masquerading as a Microsoft trusted Windows directory. Attackers may bypass UAC to stealthily execute code with elevated permissions.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Rule body
[rule]
description = """
Identifies an attempt to bypass User Account Control (UAC) by masquerading as a Microsoft trusted Windows directory.
Attackers may bypass UAC to stealthily execute code with elevated permissions.
"""
id = "adaf95d2-28ce-4880-af16-f3041b624440"
license = "Elastic License v2"
name = "UAC Bypass Attempt via Windows Directory Masquerading"
os_list = ["windows"]
reference = ["https://medium.com/tenable-techblog/uac-bypass-by-mocking-trusted-directories-24a96675f6e"]
version = "1.0.31"
query = '''
process where event.action == "start" and
process.Ext.token.integrity_level_name == "high" and
process.args :
("?:\\Windows \\System32\\*.exe",
"?:\\Windows \\SysWOW64\\*.exe",
"?:\\ Windows*\\System32\\*.exe",
"?:\\ Windows*\\SysWOW64\\*.exe")
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[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: process
process where event.action == "start" and
process.Ext.token.integrity_level_name == "high" and
process.args :
("?:\\Windows \\System32\\*.exe",
"?:\\Windows \\SysWOW64\\*.exe",
"?:\\ Windows*\\System32\\*.exe",
"?:\\ Windows*\\SysWOW64\\*.exe")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.Ext.token.integrity_level_name | eq |
| field:"process.Ext.token.integrity_level_name" kind:eq value:"high" |
process.args | wildcard |
| field:"process.args" kind:wildcard |