Event Triggered Execution: Windows Management Instrumentation Event Subscription

Adversaries may establish persistence and elevate privileges by executing malicious content triggered by a Windows Management Instrumentation (WMI) event subscription. WMI can be used to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. Examples of events that may be subscribed to are the wall clock time, user loging, or the computer's uptime. [1]

Adversaries may use the capabilities of WMI to subscribe to an event and execute arbitrary code when that event occurs, providing persistence on a system. [2] [3] Adversaries may also compile WMI scripts into Windows Management Object (MOF) files (.mof extension) that can be used to create a malicious subscription. [4] [5]

WMI subscription execution is proxied by the WMI Provider Host process (WmiPrvSe.exe) and thus may result in elevated SYSTEM privileges.

ID: T1546.003
Sub-technique of:  T1546
Tactics: Privilege Escalation, Persistence
Platforms: Windows
Permissions Required: Administrator, SYSTEM
Data Sources: Process command-line parameters, Process monitoring, WMI Objects
Version: 1.0
Created: 24 January 2020
Last Modified: 05 May 2020

Procedure Examples

Name Description

adbupd can use a WMI script to achieve persistence.[6]


APT29 has used WMI to establish persistence.[7][8]


APT33 has attempted to use WMI event subscriptions to establish persistence on compromised hosts.[9]

Blue Mockingbird

Blue Mockingbird has used mofcomp.exe to establish WMI Event Subscription persistence mechanisms configured from a *.mof file.[10]


Leviathan has used WMI for persistence.[11]


PoshC2 has the ability to persist on a system using WMI events.[12]


POSHSPY uses a WMI event subscription to establish persistence.[13]


POWERTON can use WMI for persistence.[14]


RegDuke can persist using a WMI consumer that is launched every time a process named WINWORD.EXE is started.[8]


SeaDuke uses an event filter in WMI code to execute a previously dropped executable shortly after system startup.[3]


Turla has used WMI event filters and consumers to establish persistence.[15]


UNC2452 used WMI event subscriptions for persistence.[16][17]


Mitigation Description
Privileged Account Management

Prevent credential overlap across systems of administrator and privileged accounts. [3]

User Account Management

By default, only administrators are allowed to connect remotely using WMI; restrict other users that are allowed to connect, or disallow all users from connecting remotely to WMI.


Monitor WMI event subscription entries, comparing current WMI event subscriptions to known good subscriptions for each host. Tools such as Sysinternals Autoruns may also be used to detect WMI changes that could be attempts at persistence. [18] [19]

Monitor processes and command-line arguments that can be used to register WMI persistence, such as the Register-WmiEvent PowerShell cmdlet [20], as well as those that result from the execution of subscriptions (i.e. spawning from the WmiPrvSe.exe WMI Provider Host process).