T1546.012

Image File Execution Options Injection

Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by Image File Execution Options (IFEO) debugger values. IFEO enables developers to attach debuggers to applications. Registry keys in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\{binary}.exe can be set with a Debugger value that allows a debugger to be launched automatically when the specified binary is executed. Adversaries abuse this by setting the Debugger value to their malicious payload — whenever the target binary executes, Windows launches the adversary's payload instead (with the target binary name as an argument). This can be used to replace legitimate processes, persist on reboot, or escalate privileges.

Microsoft Sentinel / Defender
kusto
DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has "Image File Execution Options"
| where RegistryValueName in~ ("Debugger", "GlobalFlag", "MitigationOptions")
| where ActionType in ("RegistryValueSet", "RegistryKeyCreated")
| extend TargetBinary = extract(@"Image File Execution Options\\([^\\]+)", 1, RegistryKey)
| extend DebuggerPayload = RegistryValueData
| extend IsHighValueTarget = TargetBinary in~ (
    "sethc.exe", "utilman.exe", "osk.exe", "Magnify.exe", "Narrator.exe",
    "DisplaySwitch.exe", "AtBroker.exe", "taskmgr.exe", "regedit.exe",
    "msconfig.exe", "mmc.exe", "cmd.exe", "powershell.exe"
  )
| extend SuspiciousDebugger = DebuggerPayload has_any (
    "cmd.exe", "powershell", "mshta", "wscript", "cscript",
    "rundll32", "regsvr32", "AppData", "Temp", "ProgramData"
  )
| extend IsSilentExit = RegistryValueName =~ "GlobalFlag" and RegistryValueData == "512"
| project Timestamp, DeviceName, AccountName, ActionType, RegistryKey,
         TargetBinary, RegistryValueName, DebuggerPayload,
         IsHighValueTarget, SuspiciousDebugger, IsSilentExit,
         InitiatingProcessFileName, InitiatingProcessCommandLine
| sort by Timestamp desc
high severity high confidence

Data Sources

Windows Registry: Registry Key Modification Microsoft Defender for Endpoint

Required Tables

DeviceRegistryEvents

False Positives

  • Developers legitimately attaching debuggers (Visual Studio, WinDbg) to specific applications during development and testing — these should set Debugger to a known debugger path like vsjitdebugger.exe
  • Just-In-Time (JIT) debugging configured by Visual Studio or Windbg installation which sets a global IFEO Debugger entry for all processes
  • Application error reporting tools that register themselves as debuggers to capture crash dumps
  • Security products that use IFEO to inject their monitoring DLLs or intercept specific process launches

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections