MS-WMI (Windows Management Instrumentation Remote Protocol) for Lateral Movement
Requirements
- Credentials (password, NT hash, Kerberos TGT) of a member of the local Administrators group on the target machine.
- WMI allowed on firewall (by default: allowed on server, filtered on client machine).
WMI protocol is commonly used for remote machine administration tasks. WMI is accessed via negotiated TCP port (not a named pipe). It is separately handled by firewall rule. Logon via WMI is of the Network type (no reusable credentials).
Linux:
Windows:
IMPORTANT: Built-in
wmic
has not been available since Windows 11.
WMI is very powerful. It can manage processes, services and scheduled tasks. Here I will show only a very basic use to create a process on a remote host. Note that firing this command will not return output. We need to save the output to a file and download it through another channel (e.g. via SMB).
Keep in mind that there is a lof of techniques for executing code on a remote host using WMI and new ones are being discovered all the time.