WMI Remote Execution for Lateral Movement
Windows Management Instrumentation is built into every Windows version and can execute commands, create processes, and query system state on remote hosts. WMI-based lateral movement does not require SMB shares or service creation — it runs entirely over DCOM (port 135 and ephemeral high ports), making it harder to block than PsExec-style techniques.
wmic — built-in command line
The wmic utility is available on all Windows systems and can execute commands remotely without any additional tools.
wmic runs the command asynchronously — it returns immediately and the command runs in the background. Output is not returned directly, so redirect it to a file and read it via SMB. For interactive sessions use impacket-wmiexec instead.
PowerShell WMI remoting
Impacket wmiexec — interactive shell
impacket-wmiexec gives you an interactive shell over WMI from Linux. Commands run as the authenticated user. Each command creates a new process on the remote host rather than persisting a service, which makes it cleaner than psexec.
C:\>whoami domain\user C:\>
WMI event subscription for execution
WMI event subscriptions run commands when a specific system event occurs — on startup, at a time interval, or when a process starts. This technique leaves no scheduled task or service visible in standard tools and is commonly used for both execution and persistence.
WMI event subscriptions that are not cleaned up become a persistence mechanism. Always remove them after the engagement unless persistence is the goal. For using WMI subscriptions as deliberate persistence see Windows Registry Persistence. For lateral movement using WinRM instead of WMI see WinRM and PowerShell Remoting.
Was this helpful?
Your feedback helps improve this page.