Detection rules › Elastic
UAC Bypass via Windows Firewall Snap-In Hijack
Identifies attempts to bypass User Account Control (UAC) by hijacking the Microsoft Management Console (MMC) Windows Firewall snap-in. Attackers bypass UAC to stealthily execute code with elevated permissions.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth |
Rule body
[rule]
description = """
Identifies attempts to bypass User Account Control (UAC) by hijacking the Microsoft Management Console (MMC) Windows
Firewall snap-in. Attackers bypass UAC to stealthily execute code with elevated permissions.
"""
id = "65f52068-4d08-41af-9fd7-0c1a4f732494"
license = "Elastic License v2"
name = "UAC Bypass via Windows Firewall Snap-In Hijack"
os_list = ["windows"]
reference = ["https://github.com/AzAgarampur/byeintegrity-uac"]
version = "1.0.32"
query = '''
sequence with maxspan=60s
[file where event.action == "rename" and process.name : "dllhost.exe" and
file.path : "?:\\Windows\\assembly\\*\\Accessibility.ni.dll"]
[process where event.action == "start" and
process.Ext.token.integrity_level_name == "high" and
process.parent.name : "mmc.exe" and
process.parent.args : ("WF.msc", "?:\\WINDOWS\\system32\\WF.msc", "?:\\WINDOWS\\SysWOW64\\WF.msc") and
not process.executable :
("?:\\Windows\\System32\\WerFault.exe",
"?:\\Windows\\SysWOW64\\WerFault.exe",
"?:\\Windows\\System32\\wermgr.exe",
"?:\\Windows\\SysWOW64\\wermgr.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/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"
[[threat.technique.subtechnique]]
id = "T1574.001"
name = "DLL"
reference = "https://attack.mitre.org/techniques/T1574/001/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: file
[file where event.action == "rename" and process.name : "dllhost.exe" and
file.path : "?:\\Windows\\assembly\\*\\Accessibility.ni.dll"]
Stage 2: process
[process where event.action == "start" and
process.Ext.token.integrity_level_name == "high" and
process.parent.name : "mmc.exe" and
process.parent.args : ("WF.msc", "?:\\WINDOWS\\system32\\WF.msc", "?:\\WINDOWS\\SysWOW64\\WF.msc") and
not process.executable :
("?:\\Windows\\System32\\WerFault.exe",
"?:\\Windows\\SysWOW64\\WerFault.exe",
"?:\\Windows\\System32\\wermgr.exe",
"?:\\Windows\\SysWOW64\\wermgr.exe")]
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | eq | ?:\Windows\System32\WerFault.exe, ?:\Windows\SysWOW64\WerFault.exe, ?:\Windows\System32\wermgr.exe, ?:\Windows\SysWOW64\wermgr.exe | excludes:process.executable |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard value:"?:\Windows\assembly\*\Accessibility.ni.dll" |
process.Ext.token.integrity_level_name | eq |
| field:"process.Ext.token.integrity_level_name" kind:eq value:"high" |
process.name | wildcard |
| field:"process_name" kind:wildcard value:"dllhost.exe" |
process.parent.args | wildcard |
| field:"process.parent.args" kind:wildcard |
process.parent.name | wildcard |
| field:"parent_process_name" kind:wildcard value:"mmc.exe" |