Thanks to all of our ATT&CKcon participants. All sessions are here, and individual presentations will be posted soon.

Windows Management Instrumentation Event Subscription

Windows Management Instrumentation (WMI) can be used to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. 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. Adversaries may attempt to evade detection of this technique by compiling WMI scripts. [1] Examples of events that may be subscribed to are the wall clock time or the computer's uptime. [2] Several threat groups have reportedly used this technique to maintain persistence. [3]

ID: T1084

Tactic: Persistence

Platform:  Windows

Permissions Required:  Administrator, SYSTEM

Data Sources:  WMI Objects

Version: 1.0

Examples

NameDescription
adbupd

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

APT29

APT29 has used WMI event filters to establish persistence.[5]

Leviathan

Leviathan has used WMI for persistence.[6]

POSHSPY

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

SeaDuke

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

Mitigation

Disabling WMI services may cause system instability and should be evaluated to assess the impact to a network. 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. Prevent credential overlap across systems of administrator and privileged accounts. [8]

Detection

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. [9]

References