Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is WMI Persistence?

WMI persistence uses permanent event subscriptions to run attacker code as SYSTEM whenever a chosen condition occurs, leaving nothing in the registry, the file system, or the startup folder.

Illustration for the cybersecurity term WMI Persistence
Home / Blog / Cybersecurity Terms / What Is WMI Persistence?
17 November 2026

What Is WMI Persistence?

What Is WMI Persistence?

Windows Management Instrumentation is the administrative plumbing of Windows. It can report hardware details, enumerate processes, start services, and, most usefully for an attacker, run a command whenever a condition it is watching becomes true. That last capability, the permanent event subscription, is the basis of WMI persistence.

Matt Graeber brought the technique to wide attention at Black Hat USA in 2015, describing WMI as “the sharpest tool in the shed” for offensive work on Windows. Nine years on it remains a favourite of both state-sponsored operators and commodity malware, catalogued by MITRE ATT&CK as T1546.003.

Three Objects and a Binding

A permanent subscription has three parts, all stored in the root\subscription namespace:

Registering all three takes a few lines of PowerShell and local administrator rights. Once bound, the consumer runs as SYSTEM under the WMI provider host, WmiPrvSE.exe, and survives reboots.

Why It Is Hard to Find

Persistence mechanisms are usually easy to enumerate because they live in well-known places: Run keys, services, scheduled tasks, startup folders. WMI subscriptions live in none of them. They are stored in the WMI repository, a binary file at C:\Windows\System32\wbem\Repository\OBJECTS.DATA, which no ordinary inventory tool reads.

Several other properties help the attacker. An ActiveScriptEventConsumer holds its payload inside the subscription itself, so there is no file on disk to detect. Execution happens under a signed Microsoft binary, which defeats naive allowlisting. WMI is used constantly by legitimate management software, so its activity blends in. And subscriptions can be created on a remote machine over WMI, giving an attacker both lateral movement and persistence in a single action.

Real-world use spans the spectrum. Stuxnet used WMI for propagation; APT29 and Turla have used subscriptions for persistence; and the technique appears in cryptomining and ransomware loaders because tooling made it easy.

Hunting for Subscriptions

Enumeration is straightforward once you know to look. On a single host:

Get-WmiObject -Namespace root\subscription -Class __EventFilter
Get-WmiObject -Namespace root\subscription -Class __EventConsumer
Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding

Most workstations have a small, consistent set of entries created by Windows itself and by management agents such as SCCM. Anything outside that baseline deserves attention, particularly a consumer whose command line contains an encoded PowerShell string, a reference to mshta or rundll32, or a path under a user profile or ProgramData.

For continuous detection:

Removal and Prevention

Removing a subscription means deleting all three objects, not just the binding, because a filter and consumer left behind can be rebound later. Use Remove-WmiObject or Remove-CimInstance against each, then verify. Subscriptions are frequently paired with a second mechanism such as a scheduled task, so treat finding one as the start of an investigation rather than the end of it.

To reduce the opportunity: restrict local administrator rights, since creating a permanent subscription requires them; block or restrict remote WMI (DCOM on TCP 135 and the dynamic port range) between workstations, where it is almost never legitimate; apply application control so that the scripting engines a consumer calls are constrained; and enable PowerShell script block logging, which captures the content of subscription-creating scripts even when they are obfuscated.

Baselining the subscriptions on your standard build, then alerting on deviation, is the most practical long-term control. Our SOC Maturation Services include building exactly this kind of hunting content so that quiet persistence does not wait for the next incident to be noticed.

FAQ – Frequently Asked Questions

Does WMI Persistence Require Administrator Rights?

Yes. Creating a permanent event subscription in the root\subscription namespace requires local administrator privileges, so it is a post-compromise technique rather than an initial access one. That is also a useful control point: removing standing local administrator rights from ordinary user accounts prevents most malware from establishing this form of persistence in the first place.

Where Are WMI Subscriptions Actually Stored?

In the WMI repository, a binary database at C:\Windows\System32\wbem\Repository\OBJECTS.DATA. They do not appear in the registry, the startup folder, or the task scheduler, which is why conventional autorun inventories miss them. Forensic tools can parse the repository file directly from a disk image and sometimes recover subscriptions that were deleted.

How Do I Remove a Malicious WMI Subscription?

Delete all three objects: the __EventFilter, the __EventConsumer, and the __FilterToConsumerBinding that joins them. Removing only the binding leaves the components in place to be rebound later. Use Remove-CimInstance against each, then re-enumerate to confirm. Investigate the host fully afterwards, since attackers rarely rely on a single persistence mechanism.

Which Logs Should I Collect to Detect This?

Sysmon events 19, 20, and 21 cover WMI filter, consumer, and binding creation and are low volume, so enable them everywhere. Add the Microsoft-Windows-WMI-Activity/Operational log, where events 5859 to 5861 record subscription registration. Complement both with process creation events showing WmiPrvSE.exe launching a command interpreter or scripting engine.

Related Terms

You May Be Interested In These

What Is Frida?

Cybersecurity Terms

17 November 2026

What Is Frida?

Read More
What Is DNSSEC?

Cybersecurity Terms

17 November 2026

What Is DNSSEC?

Read More
What Is Hydroelectric Control System Security?

Cybersecurity Terms

17 November 2026

What Is Hydroelectric Control System Security?

Read More