wmi
Thewmi command provides Windows Management Instrumentation (WMI) operations for remote system querying and command execution via DCOM/RPC.
Usage
Overview
WMI enables operators to interact with remote Windows hosts using the WMI protocol over DCOM (port 135 + dynamic RPC ports). It provides capabilities for remote process execution, system enumeration, and arbitrary WQL queries — all without requiring SMB file transfers or WinRM to be enabled. WMI is a powerful lateral movement and execution vector because it is natively available on all Windows systems and often permitted through firewalls in enterprise environments.Planned Capabilities
| Capability | Description |
|---|---|
| Process Execution | Execute commands on remote hosts via Win32_Process.Create |
| WQL Queries | Run arbitrary WQL queries against remote WMI namespaces |
| System Enumeration | Query installed software, services, OS details, and hardware |
| Event Subscription | Create WMI event subscriptions for persistence |
Authentication
WMI uses the same global authentication flags as all other R4t commands. The following authentication methods are supported:| Method | Flag | Description |
|---|---|---|
| Password | -u / -p | Domain username and password |
| NTLM Hash | --hash | Pass-the-hash via NT hash |
| Kerberos | --aes / --ccache | Kerberos authentication via AES key or ccache |
| Certificate (PFX) | --pfx | PFX certificate authentication |
| Certificate (PEM) | --cert / --key | PEM certificate and key authentication |
| Anonymous | --anonymous | Unauthenticated access (rarely useful for WMI) |
Connection Details
| Property | Value |
|---|---|
| Protocol | DCOM / DCE/RPC |
| Initial Port | 135 (RPC Endpoint Mapper) |
| Data Ports | Dynamic high ports (49152–65535) |
| Namespace | root\cimv2 (default) |
| Library | github.com/microsoft/wmi via go-ole |
Payload Execution via WMI
WMI process creation (Win32_Process.Create) is a common execution primitive for lateral movement. The payload factory can generate artifacts suited for WMI-based delivery:
Payload Factory Integration
When the payload factory is operational, WMI execution modules will request artifacts by capability rather than filename:| Capability Request | Use Case |
|---|---|
execution=self-exec, os=windows | Standard EXE dropped to disk then executed |
execution=script, type=ps1 | PowerShell stager executed inline |
inmemory=true, execution=script | Fileless execution via encoded PowerShell |
execution=service | Service binary for persistence via WMI event subscription |

