Event triggered execution lets an intruder hand their code to the operating system and wait for something ordinary, a logon, a key press, a program start, to run it again, often as SYSTEM. MITRE ATT&CK T1546 Event Triggered Execution covers system mechanisms that "trigger execution based on specific events", used for persistence (TA0003) and privilege escalation (TA0004). In ATT&CK v20 it has 18 sub-techniques across Windows, Linux and macOS, and the parent also covers cloud and SaaS event automation. This guide concentrates on the variants defenders meet most on Windows estates, WMI event subscriptions, Image File Execution Options (IFEO) and accessibility feature hijacks, then covers COM hijacking, AppInit and AppCert DLLs, PowerShell profiles and the Unix and Python hooks. It is for detection engineers, incident responders and endpoint owners, and it describes detection and hardening only. For the wider persistence picture see the Persistence Techniques Guide; for boot and logon autostarts see T1547 Boot or Logon Autostart Execution.
Key takeaways
- The trigger is the persistence. Nothing new starts at boot: code runs when a defined event fires, so autostart-only baselines miss it.
- WMI subscriptions need three objects. An event filter, a consumer and a binding; Sysmon events 19, 20 and 21 log each one, and they should be close to zero on most hosts.
- IFEO and accessibility hijacks give SYSTEM at the logon screen. A Debugger value on sethc.exe or utilman.exe, or a replaced binary, opens a shell before anyone authenticates, including over RDP.
- Several variants are already disabled if you let them be. Secure Boot disables AppInit_DLLs, the Defender ASR rule blocks WMI persistence, and Network Level Authentication removes the RDP logon screen route.
- Privilege decides the blast radius. Most machine-wide triggers need administrator rights, so removing standing local admin and watching service accounts limits who can plant them.
How the attack works
ATT&CK describes the technique as creating or modifying event triggers "to point to malicious content that will be executed whenever the event trigger is invoked". Because the execution is often proxied by a more privileged account such as SYSTEM or a service account, the same change can deliver privilege escalation as well as persistence. The table lists every active v20 sub-technique with the location defenders watch and the ATT&CK detection strategy ID.
| Sub-technique (v20) | Trigger and location defenders watch | Typical context | Detection strategy |
|---|---|---|---|
| .003 WMI Event Subscription | __EventFilter, consumer (for example CommandLineEventConsumer, ActiveScriptEventConsumer) and __FilterToConsumerBinding in the WMI repository; MOF files compiled with mofcomp.exe | Proxied by WmiPrvSE.exe, often SYSTEM | DET0086 |
| .012 IFEO Injection | Debugger values under HKLM\SOFTWARE{\Wow6432Node}\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<exe>; monitor programs under ...\CurrentVersion\SilentProcessExit\ | Context of the launching process; SYSTEM for logon screen binaries | DET0422 |
| .008 Accessibility Features | sethc.exe, utilman.exe, osk.exe, Magnify.exe, Narrator.exe, DisplaySwitch.exe in System32, replaced or redirected | SYSTEM at the logon screen, locally or over RDP | DET0033 |
| .015 COM Hijacking | CLSID registrations, especially per-user keys under HKCU that override HKLM, and TypeLib keys (including the script: moniker variant) | The process that loads the COM object | DET0481 |
| .010 AppInit DLLs | AppInit_DLLs under HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows and the Wow6432Node equivalent | Every process that loads user32.dll | DET0557 |
| .009 AppCert DLLs | AppCertDLLs under HKLM\System\CurrentControlSet\Control\Session Manager\ | Processes calling CreateProcess and related APIs | DET0362 |
| .011 Application Shimming | Custom shim databases installed with sdbinst.exe and their registry entries | The shimmed application | DET0017 |
| .007 Netsh Helper DLL | HKLM\SOFTWARE\Microsoft\Netsh | Whenever netsh.exe runs | DET0575 |
| .001 Default File Association; .002 Screensaver | File handler registry keys; SCRNSAVE.exe and related values under HKCU\Control Panel\Desktop\ | User | DET0061, DET0154 |
| .013 PowerShell Profile | profile.ps1 files for all users ($PSHOME) and per user (Documents\PowerShell, Documents\WindowsPowerShell) | Whoever starts PowerShell, including administrators | DET0451 |
| .004 Unix Shell Configuration; .005 Trap | /etc/profile, /etc/profile.d/, ~/.bashrc, ~/.bash_profile, ~/.zshrc; trap statements in those files | User or root at shell start or signal | DET0020, DET0369 |
| .017 Udev Rules | Rule files in /etc/udev/rules.d/, /run/udev/rules.d/, /usr/lib/udev/rules.d/ | root, on device events | DET0375 |
| .018 Python Startup Hooks | .pth files in site-packages or dist-packages; sitecustomize.py, usercustomize.py | Every Python invocation | DET0258 |
| .006 LC_LOAD_DYLIB; .014 Emond | Modified Mach-O load commands; rule plists in /etc/emond.d/rules/ | macOS user or root | DET0216, DET0555 |
| .016 Installer Packages | Pre- and post-install scripts in installer packages on all three platforms | Often root or SYSTEM during installation | DET0330 |
The parent technique also covers cloud functions and SaaS automation that run in response to cloud events. Those variants are best handled with the controls for function and workflow identities; see the Serverless Security Guide.
Where it shows up
- WMI subscriptions in long-running intrusions: ATT&CK lists ten groups using T1546.003, including APT29, Turla, FIN8, Leviathan, APT33 and Mustang Panda. Because the code lives in the WMI repository, it survives file-based clean-up. See the T1047 Windows Management Instrumentation Defensive Guide.
- Logon screen backdoors: ATT&CK records APT41, APT3, APT29, Fox Kitten, Deep Panda and Axiom using accessibility feature abuse. On internet-facing or poorly segmented RDP hosts, a sticky keys backdoor gives unauthenticated SYSTEM access. See the Remote Desktop (RDP) Security Guide.
- COM hijacking by malware families: nine malware families and APT28 are recorded for T1546.015, attractive because per-user CLSID keys need no admin rights.
- PowerShell profiles: recorded for Turla; the escalation risk is an administrator opening a shell on a host where an attacker has written to a profile path.
- Software supply chain: installer scripts (T1546.016, recorded for TeamPCP and APT38) and Python
.pthstartup hooks run whenever a package is installed or Python starts, which matters on build agents and developer machines. See the TeamPCP Threat Actor Profile Guide and the Python Packaging and pip Security Guide.
Impact
Event triggered persistence is quiet: there is no new service, no Run key and often no new file in a startup location. WMI subscriptions and IFEO entries can deliver SYSTEM execution, AppInit and AppCert DLLs load into a large share of processes, and accessibility hijacks bypass authentication at the logon screen. In incident response these entries are a common reason an attacker regains access after a declared clean-up, because standard autostart reviews do not enumerate them.
Detection
| Variant | Telemetry | What to alert on |
|---|---|---|
| WMI subscriptions | Sysmon 19 (WmiEventFilter), 20 (WmiEventConsumer), 21 (WmiEventConsumerToFilter); Microsoft-Windows-WMI-Activity/Operational (event 5861 for permanent subscriptions); process creation | Any new permanent filter, consumer or binding outside approved management tools; mofcomp.exe runs; WmiPrvSE.exe or scrcons.exe spawning cmd.exe, PowerShell or script hosts (DET0086) |
| IFEO | Sysmon 12, 13, 14 or EDR registry events | New Debugger or GlobalFlag values under Image File Execution Options; any change under SilentProcessExit (DET0422) |
| Accessibility features | File integrity events on System32 accessibility binaries; process creation with parent winlogon.exe | Hash change on sethc.exe, utilman.exe, osk.exe and the others; cmd.exe, PowerShell or an unsigned binary started by winlogon.exe or as a child of an accessibility binary (DET0033) |
| COM hijacking | Registry events on HKCU\Software\Classes\CLSID and TypeLib keys; Sysmon 7 image loads | New per-user CLSID InprocServer32 or LocalServer32 entries pointing to user-writable paths; TypeLib entries using a script moniker (DET0481) |
| AppInit, AppCert, Netsh, shims | Registry events; process creation for sdbinst.exe and netsh.exe | Any non-empty AppInit_DLLs or AppCertDLLs value; new Netsh helper; new custom shim database (DET0557, DET0362, DET0575, DET0017) |
| PowerShell profiles | File create and modify events on profile paths; PowerShell script block logging (event 4104) | Writes to all-users profiles in $PSHOME; profile content that downloads or decodes code (DET0451) |
| Linux and macOS | auditd write watches; Endpoint Security events on macOS | Changes to /etc/profile.d/, shell rc files of root and service accounts, udev rule directories, new .pth files with import lines, /etc/emond.d/rules/ (DET0020, DET0375, DET0258, DET0555) |
Hunting for what already exists
Telemetry catches new entries; a sweep finds old ones. Sysinternals Autoruns has dedicated WMI, Image Hijacks, AppInit and Winsock tabs, and EDR platforms expose similar inventories. Enumerate permanent WMI subscriptions in the root\subscription namespace on a sample of hosts per role, review every IFEO key that carries a Debugger value, and hash the accessibility binaries against a known-good build. Legitimate entries exist (some management agents use WMI subscriptions, some security tools use IFEO), so record approved ones in a baseline and alert on the difference. For query patterns see the KQL for Threat Hunting Guide and the Sigma Rules Guide.
Prevention and hardening
| Control | Setting or approach | Variants addressed |
|---|---|---|
| Defender attack surface reduction | Rule "Block persistence through WMI event subscription" (GUID e6db77e5-3df2-4cf1-b95a-636979351e5b), supported on Windows 10 1903 and later, Windows 11 and Windows Server 2019 and later. It has limited exclusion support, and Microsoft advises extensive audit-mode testing where Configuration Manager is used because its client relies heavily on WMI | .003 (M1040) |
| Secure Boot | Microsoft states that from Windows 8 the AppInit_DLLs infrastructure is disabled when Secure Boot is enabled; confirm Secure Boot is on across the fleet | .010 (M1038) |
| Network Level Authentication and RDP exposure | Require NLA so the logon screen is not reachable before authentication, and keep RDP behind a gateway or VPN | .008, .012 (M1035) |
| Application control | WDAC or AppLocker policies that block unsigned DLLs and execution from user-writable paths stop most COM, AppCert, IFEO and profile payloads. See the Application Allowlisting Guide | .008, .009, .010, .015 (M1038) |
| Least privilege | No standing local admin; WMI permanent subscriptions, HKLM IFEO and AppCert keys and System32 binaries then need administrator rights. Rotate local admin passwords with LAPS. See the Local Administrator Password Solution (LAPS) Guide | .003, .008, .009, .012 (M1026, M1018) |
| PowerShell configuration | Signed-script execution policy (AllSigned) where practical, restrictive ACLs on $PSHOME, and -NoProfile for automation and privileged sessions. See the PowerShell Security Guide | .013 (M1045, M1022, M1054) |
| File permissions on Unix | Root-owned, non-writable /etc/profile.d/, udev rule directories and site-packages; read-only images for servers and containers | .004, .017, .018 (M1022) |
| Disable unneeded features | Remove emond rules on macOS where not used; avoid screensaver executables via policy | .014, .002 (M1042) |
Rollout and eviction
- Inventory first: sweep WMI subscriptions, IFEO keys, COM per-user registrations and accessibility binary hashes on gold images and a sample of each host role; record approved entries.
- Turn on telemetry: add Sysmon 19, 20 and 21 and registry rules for the keys above; enable script block logging.
- Audit, then block: run the WMI persistence ASR rule in audit mode for two to four weeks, review events against management tools, then move rings to block. Roll back by returning the rule to audit if a management agent breaks.
- Harden: confirm Secure Boot and NLA, deploy application control in audit mode before enforcement, and remove local admin rights.
- Evict completely: during incidents remove the filter, consumer and binding together, delete IFEO values and restore accessibility binaries from a trusted source (for example with
sfc /scannow), then re-sweep after reboot.
Where identity fits
The highest-impact variants run as SYSTEM or as whichever account triggers them, which makes the accounts that can plant them the real control point. Local administrator accounts, management service accounts that legitimately write WMI subscriptions, and administrators who open PowerShell on shared servers are all part of the attack path. Keep an owner and purpose for every service account that touches WMI or registry configuration, and alert when one writes outside its normal pattern. See the Service Account Security Guide.
Common failure patterns
- Baselines that stop at Run keys and services: WMI repository entries and IFEO values never appear in the review, so the intruder survives clean-up.
- Removing only the consumer: leaving the filter or binding behind keeps evidence confusing and sometimes lets a second consumer be re-bound.
- RDP without NLA on internal servers: the logon screen backdoor is reachable by anyone who can reach port 3389.
- Ignoring per-user COM keys: HKCU CLSID registrations need no admin rights and are rarely monitored.
- Trusting build agents: install scripts and
.pthfiles run with the agent's credentials; a poisoned dependency on a CI runner turns event triggered execution into secret theft.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| MITRE ATT&CK v20 | T1546 and 18 sub-techniques (TA0003, TA0004); related T1547, T1543, T1047, T1574, T1112 | The technique and neighbouring persistence techniques |
| ATT&CK mitigations | M1026, M1018, M1038, M1040, M1035, M1028, M1022, M1045, M1042, M1051 | Official mitigations across sub-techniques |
| NIST SP 800-53 Rev. 5 | AC-6 Least Privilege; CM-7(5) Authorized Software; CM-3 Configuration Change Control | Who can plant triggers; what code may run; change control on configuration |
| NIST SP 800-53 Rev. 5 | SI-4 System Monitoring; SI-7 Software, Firmware, and Information Integrity | Registry and WMI monitoring; integrity of accessibility binaries |
| NIST CSF 2.0 | PR.PS-01; PR.PS-05; DE.CM-09 | Configuration management; preventing unauthorised software; monitoring |
Metrics
- Coverage: percentage of Windows endpoints sending Sysmon 19 to 21 and IFEO registry events.
- Enforcement: percentage of eligible devices with the WMI persistence ASR rule in block mode.
- Baseline drift: unapproved WMI subscriptions or IFEO Debugger values found per sweep (target zero).
- Exposure: RDP hosts without NLA; devices without Secure Boot.
- Eviction quality: reinfections within 30 days of an incident closure traced to event triggered persistence.
Practitioner checklist
- Collect Sysmon events 19, 20 and 21 and alert on every new permanent WMI subscription outside approved tools.
- Monitor Image File Execution Options and SilentProcessExit keys for Debugger and monitor values.
- Hash-check System32 accessibility binaries and alert on processes spawned from winlogon.exe that are not expected.
- Enable the "Block persistence through WMI event subscription" ASR rule, audit first, then block.
- Confirm Secure Boot fleet-wide and require NLA on every RDP host.
- Watch per-user COM registrations, PowerShell profile paths and Unix shell and udev configuration.
- Remove standing local admin rights and review service accounts that write WMI or registry configuration.
- Include WMI, IFEO, COM and accessibility checks in every incident eviction and re-sweep after reboot.
Standards and references
- MITRE ATT&CK: Event Triggered Execution (T1546)
- MITRE ATT&CK: Windows Management Instrumentation Event Subscription (T1546.003)
- MITRE ATT&CK: Image File Execution Options Injection (T1546.012)
- Microsoft: Attack surface reduction rules reference
- Microsoft Sysinternals: Sysmon
- Microsoft: AppInit DLLs and Secure Boot
- Microsoft: about_Profiles
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
Related NHI Mgmt Group resources: Persistence Techniques Guide · T1047 Windows Management Instrumentation Defensive Guide · T1547 Boot or Logon Autostart Execution Defensive Guide · Sysmon Guide