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に組み込まれた極めて強力な万能ツール」として機能します。
この攻撃手法で攻撃者は、「正規の管理機能を隠れ蓑にした、痕跡の残りにくい広範な操作」を実現します。
WMIは、コマンドラインツールの wmic.exe や PowerShell、あるいはプログラムAPIから利用されます。
wmic process list brief (プロセス一覧の取得)wmic /node:"リモートPC名" process call create "C:\malware.exe"wmiprvse.exe)経由で実行されるため、セキュリティ製品には「正規のWindowsシステムがプロセスを起動した」ように見えます。WMIの利便性を維持しつつ、異常な呼び出しを制限することが重要です。
wmic.exe は非推奨となっており、使用を制限するか、実行ログを厳格に監視します。Get-WMIObject などを用いて、不審な「イベントフィルター」や「コンシューマー」が登録されていないか定期的にスキャンします。WMIは「機能」の悪用が主ですが、WMI自体をバイパスする脆弱性も存在します。
EDRなどのログで、親プロセスが wmiprvse.exe であり、その子が cmd.exe や powershell.exe である場合、それはWMIを介した攻撃が行われた可能性を示唆する強いシグナルです。