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.[1] 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.[1] Remote WMI over DCOM operates using port 135, whereas WMI over WinRM operates over port 5985 when using HTTP and 5986 for HTTPS.[1] [2]
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.[2] 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).[3]
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.[4] 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.[4]
ID | Name | Description |
---|---|---|
C0025 | 2016 Ukraine Electric Power Attack |
During the 2016 Ukraine Electric Power Attack, WMI in scripts were used for remote execution and system surveys. [5] |
S1028 | Action RAT |
Action RAT can use WMI to gather AV products installed on an infected host.[6] |
S0331 | Agent Tesla |
Agent Tesla has used wmi queries to gather information from the system.[7] |
S1129 | Akira |
Akira will leverage COM objects accessed through WMI during execution to evade detection.[8] |
G0016 | APT29 |
APT29 used WMI to steal credentials and execute backdoors at a future time.[9] |
G0050 | APT32 |
APT32 used WMI to deploy their tools on remote machines and to gather information about the Outlook process.[10] |
G0096 | APT41 |
APT41 used WMI in several ways, including for execution of commands via WMIEXEC as well as for persistence via PowerSploit.[11][12] APT41 has executed files through Windows Management Instrumentation (WMI).[13] |
G0143 | Aquatic Panda |
Aquatic Panda used WMI for lateral movement in victim environments.[14] |
S0373 | Astaroth | |
S0640 | Avaddon | |
S1081 | BADHATCH |
BADHATCH can utilize WMI to collect system information, create new processes, and run malicious PowerShell scripts on a compromised machine.[17][18] |
S0534 | Bazar |
Bazar can execute a WMI query to gather information about the installed antivirus engine.[19][20] |
S1070 | Black Basta |
Black Basta has used WMI to execute files over the network.[21] |
S1068 | BlackCat |
BlackCat can use |
S0089 | BlackEnergy |
A BlackEnergy 2 plug-in uses WMI to gather victim host details.[23] |
G0108 | Blue Mockingbird |
Blue Mockingbird has used wmic.exe to set environment variables.[24] |
S1063 | Brute Ratel C4 |
Brute Ratel C4 can use WMI to move laterally.[25] |
S1039 | Bumblebee |
Bumblebee can use WMI to gather system information and to spawn processes for code injection.[26][27][28] |
C0015 | C0015 |
During C0015, the threat actors used |
C0018 | C0018 |
During C0018, the threat actors used WMIC to modify administrative settings on both a local and a remote host, likely as part of the first stages for their lateral movement; they also used WMI Provider Host ( |
C0027 | C0027 |
During C0027, Scattered Spider used Windows Management Instrumentation (WMI) to move laterally via Impacket.[32] |
S0674 | CharmPower |
CharmPower can use |
G0114 | Chimera | |
G1021 | Cinnamon Tempest |
Cinnamon Tempest has used Impacket for lateral movement via WMI.[36][37] |
S0154 | Cobalt Strike |
Cobalt Strike can use WMI to deliver a payload to a remote host.[38][39][29] |
S1155 | Covenant |
Covenant can utilize WMI to install new Grunt listeners through XSL files or command one-liners.[40] |
S0488 | CrackMapExec |
CrackMapExec can execute remote commands using Windows Management Instrumentation.[41] |
S1066 | DarkTortilla |
DarkTortilla can use WMI queries to obtain system information.[42] |
S0673 | DarkWatchman |
DarkWatchman can use WMI to execute commands.[43] |
S0616 | DEATHRANSOM |
DEATHRANSOM has the ability to use WMI to delete volume shadow copies.[44] |
G0009 | Deep Panda |
The Deep Panda group is known to utilize WMI for lateral movement.[45] |
S0062 | DustySky |
The DustySky dropper uses Windows Management Instrumentation to extract information about the operating system and whether an anti-virus is active.[46] |
G1006 | Earth Lusca |
Earth Lusca used a VBA script to execute WMI.[47] |
S0605 | EKANS |
EKANS can use Windows Mangement Instrumentation (WMI) calls to execute operations.[48] |
G1003 | Ember Bear |
Ember Bear has used WMI execution with password hashes for command execution and lateral movement.[49] |
S0367 | Emotet | |
S0363 | Empire |
Empire can use WMI to deliver a payload to a remote host.[51] |
S0396 | EvilBunny |
EvilBunny has used WMI to gather information about the system.[52] |
S0568 | EVILNUM |
EVILNUM has used the Windows Management Instrumentation (WMI) tool to enumerate infected machines.[53] |
S0267 | FELIXROOT | |
G1016 | FIN13 |
FIN13 has utilized |
G0037 | FIN6 |
FIN6 has used WMI to automate the remote execution of PowerShell scripts.[57] |
G0046 | FIN7 |
FIN7 has used WMI to install malware on targeted systems.[58] |
G0061 | FIN8 |
FIN8's malicious spearphishing payloads use WMI to launch malware and spawn |
S0618 | FIVEHANDS |
FIVEHANDS can use WMI to delete files on a target machine.[44][63] |
S0381 | FlawedAmmyy |
FlawedAmmyy leverages WMI to enumerate anti-virus on the victim.[64] |
C0001 | Frankenstein |
During Frankenstein, the threat actors used WMI queries to check if various security applications were running as well as to determine the operating system version.[65] |
S1044 | FunnyDream |
FunnyDream can use WMI to open a Windows command shell on a remote machine.[66] |
C0007 | FunnyDream |
During FunnyDream, the threat actors used |
G0093 | GALLIUM |
GALLIUM used WMI for execution to assist in lateral movement as well as for installing tools across multiple assets.[67] |
G0047 | Gamaredon Group |
Gamaredon Group has used WMI to execute scripts used for discovery and for determining the C2 IP address.[68][69] |
S0237 | GravityRAT |
GravityRAT collects various information via WMI requests, including CPU information in the Win32_Processor entry (Processor ID, Name, Manufacturer and the clock speed).[70] |
S0151 | HALFBAKED |
HALFBAKED can use WMI queries to gather system information.[71] |
S0617 | HELLOKITTY |
HELLOKITTY can use WMI to delete volume shadow copies.[44] |
S0698 | HermeticWizard |
HermeticWizard can use WMI to create a new process on a remote machine via |
C0038 | HomeLand Justice |
During HomeLand Justice, threat actors used WMI to modify Windows Defender settings.[73] |
S0376 | HOPLIGHT |
HOPLIGHT has used WMI to recompile the Managed Object Format (MOF) files in the WMI repository.[74] |
S0483 | IcedID | |
S1152 | IMAPLoader |
IMAPLoader uses WMI queries to query system information on victim hosts.[77] |
S0357 | Impacket |
Impacket's wmiexec module can be used to execute commands through WMI.[78] |
G1032 | INC Ransom |
INC Ransom has used WMIC to deploy ransomware.[79][80][81] |
S1139 | INC Ransomware |
INC Ransomware has the ability to use wmic.exe to spread to multiple endpoints within a compromised environment.[80][82] |
G0119 | Indrik Spider |
Indrik Spider has used WMIC to execute commands on remote computers.[83] |
S0283 | jRAT |
jRAT uses WMIC to identify anti-virus products installed on the victim’s machine and to obtain firewall details.[84] |
S0265 | Kazuar |
Kazuar obtains a list of running processes through WMI querying.[85] |
S0250 | Koadic | |
S0156 | KOMPROGO | |
S1160 | Latrodectus |
Latrodectus has used WMI in malicious email infection chains to facilitate the installation of remotely-hosted files.[88][89] |
G0032 | Lazarus Group |
Lazarus Group has used WMIC for discovery as well as to execute payloads for persistence and lateral movement.[90][91][92][93] |
G0065 | Leviathan | |
S0532 | Lucifer |
Lucifer can use WMI to log into remote machines for propagation.[95] |
S1141 | LunarWeb |
LunarWeb can use WMI queries for discovery on the victim host.[96] |
G0059 | Magic Hound |
Magic Hound has used a tool to run |
S0449 | Maze |
Maze has used WMI to attempt to delete the shadow volumes on a machine, and to connect a virtual machine to the network domain of the victim organization's network.[98][99] |
G0045 | menuPass |
menuPass has used a modified version of pentesting script wmiexec.vbs, which logs into a remote machine using WMI.[100][101][102] |
S0688 | Meteor |
Meteor can use |
S0339 | Micropsia |
Micropsia searches for anti-virus software and firewall products installed on the victim’s machine using WMI.[104][105] |
S0553 | MoleNet | |
S0256 | Mosquito |
Mosquito's installer uses WMI to search for antivirus display names.[107] |
G0069 | MuddyWater |
MuddyWater has used malware that leveraged WMI for execution and querying host information.[108][109][110][111] |
G0129 | Mustang Panda |
Mustang Panda has executed PowerShell scripts via WMI.[112][113] |
G0019 | Naikon | |
S0457 | Netwalker | |
S0368 | NotPetya |
NotPetya can use |
S0340 | Octopus |
Octopus has used wmic.exe for local discovery information.[118] |
G0049 | OilRig | |
S0365 | Olympic Destroyer |
Olympic Destroyer uses WMI to help propagate itself across a network.[120] |
S0264 | OopsIE | |
C0022 | Operation Dream Job |
During Operation Dream Job, Lazarus Group used WMIC to executed a remote XSL script.[122] |
C0014 | Operation Wocao |
During Operation Wocao, threat actors has used WMI to execute commands.[123] |
S0378 | PoshC2 |
PoshC2 has a number of modules that use WMI to execute tasks.[124] |
S0194 | PowerSploit |
PowerSploit's |
S0223 | POWERSTATS |
POWERSTATS can use WMI queries to retrieve data from compromised hosts.[127][109] |
S0184 | POWRUNER |
POWRUNER may use WMI when collecting information about a victim.[128] |
S0654 | ProLock |
ProLock can use WMIC to execute scripts on targeted hosts.[129] |
S1032 | PyDCrypt | |
S0650 | QakBot | |
S1130 | Raspberry Robin |
Raspberry Robin can execute via LNK containing a command to run a legitimate executable, such as wmic.exe, to download a malicious Windows Installer (MSI) package.[132] |
S0241 | RATANKBA | |
S0375 | Remexi |
Remexi executes received commands with wmic.exe (for WMI commands). [135] |
S0496 | REvil |
REvil can use WMI to monitor for and kill specific processes listed in its configuration file.[136][137] |
S0270 | RogueRobin |
RogueRobin uses various WMI queries to check if the sample is running in a sandbox.[138][139] |
G0034 | Sandworm Team |
Sandworm Team has used Impacket’s WMIexec module for remote code execution and VBScript to run WMI queries.[5][140] |
S1085 | Sardonic |
Sardonic can use WMI to execute PowerShell commands on a compromised machine.[141] |
S0546 | SharpStage |
SharpStage can use WMI for execution.[106][142] |
S0589 | Sibot |
Sibot has used WMI to discover network connections and configurations. Sibot has also used the Win32_Process class to execute a malicious DLL.[143] |
S0692 | SILENTTRINITY |
SILENTTRINITY can use WMI for lateral movement.[144] |
S1086 | Snip3 |
Snip3 can query the WMI class |
S1124 | SocGholish |
SocGholish has used WMI calls for script execution and system profiling.[146] |
C0024 | SolarWinds Compromise |
During the SolarWinds Compromise, APT29 used WMI for the remote execution of files for lateral movement.[147][148] |
G0038 | Stealth Falcon |
Stealth Falcon malware gathers system information via Windows Management Instrumentation (WMI).[149] |
S0380 | StoneDrill |
StoneDrill has used the WMI command-line (WMIC) utility to run tasks.[150] |
S0603 | Stuxnet |
Stuxnet used WMI with an |
S0559 | SUNBURST |
SUNBURST used the WMI query |
S1064 | SVCReady |
SVCReady can use |
S0663 | SysUpdate |
SysUpdate can use WMI for execution on a compromised host.[154] |
G1018 | TA2541 |
TA2541 has used WMI to query targeted systems for security products.[155] |
G0027 | Threat Group-3390 |
A Threat Group-3390 tool can use WMI to execute a binary.[156] |
G1022 | ToddyCat |
ToddyCat has used WMI to execute scripts for post exploit document collection.[157] |
S0386 | Ursnif |
Ursnif droppers have used WMI classes to execute PowerShell commands.[158] |
S0476 | Valak |
Valak can use |
G1017 | Volt Typhoon |
Volt Typhoon has leveraged WMIC for execution, remote system discovery, and to create and use temporary directories.[160][161][162][163] |
S0366 | WannaCry |
WannaCry utilizes |
G0112 | Windshift |
Windshift has used WMI to collect information about target machines.[167] |
G0102 | Wizard Spider |
Wizard Spider has used WMI and LDAP queries for network discovery and to move laterally. Wizard Spider has also used batch scripts to leverage WMIC to deploy ransomware.[168][169][170][171][172] |
S0251 | Zebrocy |
One variant of Zebrocy uses WMI queries to gather information.[173] |
ID | Mitigation | Description |
---|---|---|
M1040 | Behavior Prevention on Endpoint |
On Windows 10, enable Attack Surface Reduction (ASR) rules to block processes created by WMI commands from running. Note: many legitimate tools and applications utilize WMI for command execution. [174] |
M1038 | Execution Prevention |
Use application control configured to block execution of |
M1026 | Privileged Account Management |
Prevent credential overlap across systems of administrator and privileged accounts. [176] |
M1018 | User Account Management |
By default, only administrators are allowed to connect remotely using WMI. Restrict other users who are allowed to connect, or disallow all users to connect remotely to WMI. |
ID | Data Source | Data Component | Detects |
---|---|---|---|
DS0017 | Command | Command Execution |
Monitor executed commands and arguments for actions that are used to perform remote behavior. Analytic 1 - Look for wmic.exeexecution with arguments indicative of remote process creation.
|
DS0029 | Network Traffic | Network Connection Creation |
Monitor network traffic for WMI connections for potential use to remotely edit configuration, start services, or query files. When remote WMI requests are over RPC it connects to a DCOM interface within the RPC group Look for instances of the WMI querying in network traffic, and find the cases where a process is launched immediately after a connection is seen. This essentially merges the request to start a remote process via WMI with the process execution. If other processes are spawned from wmiprvse.exe in this time frame, it is possible for race conditions to occur, and the wrong process may be merged. If this is the case, it may be useful to look deeper into the network traffic to see if the desired command can be extracted. After the WMI connection has been initialized, a process can be remotely launched using the command: This leaves artifacts at both a network (RPC) and process (command line) level. When After RPC authenticates, the RPC endpoint mapper opens a high port connection, through which the schtasks Remote Procedure Call is actually implemented. With the right packet decoders, or by looking for certain byte streams in raw data, these functions can be identified. When the command line is executed, it has the parent process of Certain strings can be identifiers of the WMI by looking up the interface UUID for This identifier is present three times during the RPC request phase. Any sensor that has access to the byte code as raw, decoded, or ASCII could implement this analytic. The transfer syntax is- UUID Thus, a great ASCII based signature is- Note: To detect WMI over RPC (using DCOM), a sensor needs to exist that has the insight into individual connections and can actually decode and make sense of RPC traffic. Specifically, WMI can be detected by looking at RPC traffic where the target interface matches that of WMI, which is IRemUnknown2. Look for instances of the WMI querying in network traffic, and find the cases where a process is launched immediately after a connection is seen. This essentially merges the request to start a remote process via WMI with the process execution. If other processes are spawned from wmiprvse.exe in this time frame, it is possible for race conditions to occur, and the wrong process may be merged. If this is the case, it may be useful to look deeper into the network traffic to see if the desired command can be extracted. Analytic 1 - Monitor for WMI over RPC (DCOM) connections. Look for the string RPCSS within the initial RPC connection on port 135/tcp.
|
DS0009 | Process | Process Creation |
Monitor for newly constructed processes and/or command-lines of "wmic". If the command line utility Note: Event IDs are for Sysmon (Event ID 10 - process access) and Windows Security Log (Event ID 4688 - a new process has been created). Besides executing arbitrary processes, wmic.exe can also be used to executed data stored in NTFS alternate data streams NTFS File Attributes.Looks for instances of wmic.exe as well as the substrings in the command line:- process call create- /node: Analytic 1 - Detect wmic.exeprocess creation with command lines containing process call create or /node:.
|
DS0005 | WMI | WMI Creation |
Monitor for newly constructed WMI objects that will execute malicious commands and payloads. Analytic 1 - WMI object creation events
|