UAC Bypass via Event Viewer


Description

Identifies attempts to bypass User Account Control (UAC) via eventvwr.exe. Attackers bypass UAC to stealthily execute code with elevated permissions.

Query · eql

process where event.action == "start" and
 process.Ext.token.integrity_level_name == "high" and
 (
  /* mscfile hijacking */
  process.parent.name : "eventvwr.exe" or

  /* Unsafe .Net Deserialization in Windows Event Viewer */
  (process.parent.name : "mmc.exe" and
   process.parent.args : ("?:\\WINDOWS\\system32\\eventvwr.msc", "?:\\WINDOWS\\SysWOW64\\eventvwr.msc", "eventvwr.msc"))
  ) and

 /* FPs */
 not process.executable :
           ("?:\\Windows\\SysWOW64\\mmc.exe",
            "?:\\Windows\\System32\\mmc.exe",
            "?:\\Windows\\System32\\WerFault.exe",
            "?:\\Windows\\SysWOW64\\WerFault.exe",
            "?:\\Windows\\System32\\wermgr.exe",
            "?:\\Windows\\SysWOW64\\wermgr.exe",
            "?:\\Program Files (x86)\\*.exe",
            "?:\\Program Files\\*.exe",
            "?:\\Windows\\System32\\DWWIN.EXE",
            "?:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
            "?:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
            "?:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe",
            "?:\\Program Files\\Mozilla Firefox\\firefox.exe",
            "?:\\Program Files\\Internet Explorer\\iexplore.exe",
            "?:\\Program Files (x86)\\Tencent\\QQPinyin\\*\\QQPYUserCenter.exe") and
 not (process.name : "rundll32.exe" and process.args : "cryptext.dll,CryptExtOpenCRL")
Raw source UAC Bypass via Event Viewer · Elastic TOML
Esc
Published by elastic/protections-artifacts ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[rule]
description = """
Identifies attempts to bypass User Account Control (UAC) via eventvwr.exe. Attackers bypass UAC to stealthily execute
code with elevated permissions.
"""
id = "ab29a79a-b3c2-4ae4-9670-70dd0ea68a4a"
license = "Elastic License v2"
name = "UAC Bypass via Event Viewer"
os_list = ["windows"]
reference = ["https://github.com/hfiref0x/UACME", "https://twitter.com/orange_8361/status/1518970259868626944"]
version = "1.0.32"

query = '''
process where event.action == "start" and
 process.Ext.token.integrity_level_name == "high" and
 (
  /* mscfile hijacking */
  process.parent.name : "eventvwr.exe" or

  /* Unsafe .Net Deserialization in Windows Event Viewer */
  (process.parent.name : "mmc.exe" and
   process.parent.args : ("?:\\WINDOWS\\system32\\eventvwr.msc", "?:\\WINDOWS\\SysWOW64\\eventvwr.msc", "eventvwr.msc"))
  ) and

 /* FPs */
 not process.executable :
           ("?:\\Windows\\SysWOW64\\mmc.exe",
            "?:\\Windows\\System32\\mmc.exe",
            "?:\\Windows\\System32\\WerFault.exe",
            "?:\\Windows\\SysWOW64\\WerFault.exe",
            "?:\\Windows\\System32\\wermgr.exe",
            "?:\\Windows\\SysWOW64\\wermgr.exe",
            "?:\\Program Files (x86)\\*.exe",
            "?:\\Program Files\\*.exe",
            "?:\\Windows\\System32\\DWWIN.EXE",
            "?:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
            "?:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
            "?:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe",
            "?:\\Program Files\\Mozilla Firefox\\firefox.exe",
            "?:\\Program Files\\Internet Explorer\\iexplore.exe",
            "?:\\Program Files (x86)\\Tencent\\QQPinyin\\*\\QQPYUserCenter.exe") and
 not (process.name : "rundll32.exe" and process.args : "cryptext.dll,CryptExtOpenCRL")
'''

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"

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.