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]
攻撃者は、Windows Management Instrumentation (WMI) イベントをトリガーとして悪意のあるコンテンツを実行することにより、永続性の確立や 昇格を行うことがあります。WMIは、定義されたイベントが発生したときにコードを実行するイベントフィルタ、プロバイダ、コンシューマ、およびバインディングをインストールするために使用することができます。サブスクライブされるイベントの例としては、壁掛け時計の時刻、ユーザーのログ、コンピューターの稼働時間などがあります。([1]のP14,15)
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の機能を利用してイベントをサブスクライブし、そのイベントが発生したときに任意のコードを実行し、システム上で永続性を実現することができます[2][3]。また、攻撃者はWMIスクリプトをWindows Management Object (MOF) ファイル (.mof extension)
にコンパイルし、不正なサブスクリプションを作成するために使用することがあります[4][5]。
WMI subscription execution is proxied by the WMI Provider Host process (WmiPrvSe.exe) and thus may result in elevated SYSTEM privileges.
WMIサブスクリプションの実行は、WMI Provider Hostプロセス(WmiPrvSe.exe)によってプロキシされるため、SYSTEM権限に昇格される恐れがあります。
メモ:WMIを悪用したマルウェアの永続化、TurlaによるPowerShellの使用を徹底解説([21]の日本語)
ID | Name | Description |
---|---|---|
S0202 | adbupd | |
G0016 | APT29 |
APT29 has used WMI event subscriptions for persistence.[7][8][9][10] |
G0064 | APT33 |
APT33 has attempted to use WMI event subscriptions to establish persistence on compromised hosts.[11] |
G0108 | Blue Mockingbird |
Blue Mockingbird has used mofcomp.exe to establish WMI Event Subscription persistence mechanisms configured from a *.mof file.[12] |
G0061 | FIN8 | |
G0065 | Leviathan | |
G0129 | Mustang Panda |
Mustang Panda's custom ORat tool uses a WMI event consumer to maintain persistence.[15] |
S0378 | PoshC2 |
PoshC2 has the ability to persist on a system using WMI events.[16] |
S0150 | POSHSPY |
POSHSPY uses a WMI event subscription to establish persistence.[17] |
S0371 | POWERTON | |
S0511 | RegDuke |
RegDuke can persist using a WMI consumer that is launched every time a process named WINWORD.EXE is started.[8] |
S0053 | SeaDuke |
SeaDuke uses an event filter in WMI code to execute a previously dropped executable shortly after system startup.[3] |
S0692 | SILENTTRINITY |
SILENTTRINITY can create a WMI Event to execute a payload for persistence.[19] |
S0682 | TrailBlazer |
TrailBlazer has the ability to use WMI for persistence.[20] |
G0010 | Turla |
Turla has used WMI event filters and consumers to establish persistence.[21] |
ID | Mitigation | Description |
---|---|---|
M1040 | Behavior Prevention on Endpoint |
On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent malware from abusing WMI to attain persistence.[22] |
M1026 | Privileged Account Management |
Prevent credential overlap across systems of administrator and privileged accounts.[3] |
M1018 | 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. |
ID | Data Source | Data Component | Detects |
---|---|---|---|
DS0017 | Command | Command Execution |
Monitor executed commands and arguments that can be used to register WMI persistence, such as the |
DS0009 | Process | Process Creation |
Monitor newly executed processes that result from the execution of subscriptions (i.e. spawning from the WmiPrvSe.exe WMI Provider Host process). |
DS0005 | WMI | WMI Creation |
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. [24]
[25] Monitor
for the creation of new WMI |