Trusted Design

T1047 - Windows Management Instrumentation

概要

Adversaries may abuse Windows Management Instrumentation (WMI) to execute malicious commands and payloads. WMI is designed for programmers and is the infrastructure for management data and operations on Windows systems.(Citation: WMI 1-3) WMI is an administration feature that provides a uniform environment to access Windows system components.

The WMI service enables both local and remote access, though the latter is facilitated by Remote Services such as Distributed Component Object Model and Windows Remote Management.(Citation: WMI 1-3) Remote WMI over DCOM operates using port 135, whereas WMI over WinRM operates over port 5985 when using HTTP and 5986 for HTTPS.(Citation: WMI 1-3) (Citation: Mandiant WMI)

An adversary can use WMI to interact with local and remote systems and use it as a means to execute various behaviors, such as gathering information for Discovery as well as Execution of commands and payloads.(Citation: Mandiant WMI) For example, wmic.exe can be abused by an adversary to delete shadow copies with the command wmic.exe Shadowcopy Delete (i.e., Inhibit System Recovery).(Citation: WMI 6)

Note: wmic.exe is deprecated as of January of 2024, with the WMIC feature being “disabled by default” on Windows 11+. WMIC will be removed from subsequent Windows releases and replaced by PowerShell as the primary WMI interface.(Citation: WMI 7,8) In addition to PowerShell and tools like wbemtool.exe, COM APIs can also be used to programmatically interact with WMI via C++, .NET, VBScript, etc.(Citation: WMI 7,8)

管理者によるコメント

T1047「Windows Management Instrumentation」(WMI) は、Windowsの管理や運用に欠かせないインフラ機能であるWMIを悪用して、情報の収集、コードの実行、さらには永続化や横展開を行う手法です。

攻撃者にとって、WMIは「OSに組み込まれた極めて強力な万能ツール」として機能します。

1. 概要

この攻撃手法で攻撃者は、「正規の管理機能を隠れ蓑にした、痕跡の残りにくい広範な操作」を実現します。

何を実現できるのか

2. 攻撃の流れ

WMIは、コマンドラインツールの wmic.exe や PowerShell、あるいはプログラムAPIから利用されます。

  1. 偵察 (Discovery): 侵入後、WMIを使用してシステムの詳細情報を照会します。
    • 例: wmic process list brief (プロセス一覧の取得)
  2. 横展開 (Lateral Movement): 奪取した認証情報を用いて、リモートプロセスの作成を命じます。
    • 例: wmic /node:"リモートPC名" process call create "C:\malware.exe"
  3. イベント購読による永続化: WMIデータベース内に「フィルター」「コンシューマー」「バインディング」という3つの要素を作成し、ファイルレスでマルウェアが再起動するように仕込みます。
  4. 検知回避: 命令はWMIサービス(wmiprvse.exe)経由で実行されるため、セキュリティ製品には「正規のWindowsシステムがプロセスを起動した」ように見えます。

3. 防御・対策

WMIの利便性を維持しつつ、異常な呼び出しを制限することが重要です。

4. 重要ポイント

5. 関連する主なCWE

6. 関連する代表的なCVE

WMIは「機能」の悪用が主ですが、WMI自体をバイパスする脆弱性も存在します。

調査のアドバイス

EDRなどのログで、親プロセスが wmiprvse.exe であり、その子が cmd.exepowershell.exe である場合、それはWMIを介した攻撃が行われた可能性を示唆する強いシグナルです。

分析

この攻撃手法を利用する脅威アクター

関連する CVE

攻撃手法 – 脅威アクター Graph


← Technique一覧に戻る ← Tactics一覧に戻る