Detection rules › Elastic

UAC Bypass via Windows Firewall Snap-In Hijack

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

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

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.

FieldKindExcluded valuesSearch
process.executableeq?:\Windows\System32\WerFault.exe, ?:\Windows\SysWOW64\WerFault.exe, ?:\Windows\System32\wermgr.exe, ?:\Windows\SysWOW64\wermgr.exeexcludes:process.executable

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • rename corpus 22 (elastic 21, sigma 1)
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq
file.pathwildcard
  • ?:\Windows\assembly\*\Accessibility.ni.dll
field:"TargetFilename" kind:wildcard value:"?:\Windows\assembly\*\Accessibility.ni.dll"
process.Ext.token.integrity_level_nameeq
  • high corpus 22 (elastic 22)
field:"process.Ext.token.integrity_level_name" kind:eq value:"high"
process.namewildcard
  • dllhost.exe corpus 19 (elastic 17, splunk 2)
field:"process_name" kind:wildcard value:"dllhost.exe"
process.parent.argswildcard
  • ?:\WINDOWS\SysWOW64\WF.msc
  • ?:\WINDOWS\system32\WF.msc
  • WF.msc
field:"process.parent.args" kind:wildcard
process.parent.namewildcard
  • mmc.exe corpus 9 (elastic 7, splunk 1, kusto 1)
field:"parent_process_name" kind:wildcard value:"mmc.exe"