T1548.002

Bypass User Account Control

Adversaries bypass Windows User Account Control (UAC) to execute code with elevated privileges without triggering user prompts. Common methods include: eventvwr.exe hijacking (ZeroT, Koadic), fodhelper.exe Registry key abuse (Saint Bot), sdclt.exe App Paths abuse (WarzoneRAT), CMSTPLUA COM interface (Avaddon), and DLL hijacking via auto-elevated applications (ShimRat via migwiz.exe). Used by BlackCat, LockBit 2.0/3.0, Cobalt Strike, DarkGate, Evilnum, APT37, APT38, BRONZE BUTLER, and many others. UACME documents 70+ bypass methods.

Microsoft Sentinel / Defender
kusto
// T1548.002 — UAC Bypass detection
// Multiple sub-techniques: eventvwr, fodhelper, sdclt, CMSTPLUA, DLL hijacking
let UACBypassBinaries = dynamic([
  "eventvwr.exe", "fodhelper.exe", "sdclt.exe", "cmstp.exe",
  "migwiz.exe", "wsreset.exe", "computerdefaults.exe",
  "slui.exe", "pkgmgr.exe", "sysprep.exe", "osk.exe",
  "msconfig.exe", "mmc.exe", "eudcedit.exe", "charmap.exe",
  "colorcpl.exe", "windowsanytimeupgrade.exe"
]);
// Part 1: Detect auto-elevating binaries spawning unexpected child processes
let UACBypassSpawn = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName has_any (UACBypassBinaries)
| where FileName !in~ ("conhost.exe", "WerFault.exe", "dwm.exe")
| where ProcessTokenElevationType =~ "TokenElevationTypeDefault"
    or InitiatingProcessTokenElevationType =~ "TokenElevationTypeDefault"
| extend DetectionType = "UAC_Auto_Elevate_Bypass"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
// Part 2: Detect registry modifications at known UAC bypass paths
let UACBypassReg = DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has_any (
    "ms-settings",
    "mscfile",
    "Classes\\exefile\\shell\\runas",
    "Software\\Classes\\ms-settings",
    "Software\\Classes\\mscfile",
    "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\control.exe"
  )
| where ActionType in ("RegistryValueSet", "RegistryKeyCreated")
| extend DetectionType = "UAC_Bypass_Registry"
| project Timestamp, DeviceName, AccountName, RegistryKey, RegistryValueName, RegistryValueData,
          InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
// Part 3: Detect CMSTPLUA COM elevation pattern
let UACBypassCOM = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName =~ "cmstp.exe"
    or (InitiatingProcessFileName =~ "dllhost.exe" and
        InitiatingProcessCommandLine has "{3E5FC7F9-9A51-4367-9063-A120244FBEC7}")
| extend DetectionType = "UAC_CMSTPLUA_COM"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
union UACBypassSpawn, UACBypassReg, UACBypassCOM
| sort by Timestamp desc
high severity high confidence

Data Sources

Process: Process Creation Windows Registry: Registry Value Modification Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents DeviceRegistryEvents

False Positives

  • Legitimate administrative tools that invoke auto-elevating binaries (some vendor software uses eventvwr.exe legitimately)
  • IT management software that uses CMSTP/COM elevation for authorized software deployment
  • Pentest tools performing authorized UAC bypass testing on test endpoints
  • Application compatibility shims that may trigger auto-elevation paths

Unlock Pro Content

Get the full detection package for T1548.002 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections