winrm
Thewinrm command provides Windows Remote Management (WinRM) operations for remote command execution and PowerShell remoting.
Usage
Overview
WinRM is Microsoft’s implementation of WS-Management, providing a SOAP-based protocol for remote system management. It enables operators to execute commands and PowerShell scripts on remote Windows hosts over HTTP (port 5985) or HTTPS (port 5986). WinRM is the protocol underlying PowerShell Remoting (Enter-PSSession, Invoke-Command) and is commonly enabled in enterprise environments for administrative management.
Planned Capabilities
| Capability | Description |
|---|---|
| Command Execution | Execute arbitrary commands on remote hosts |
| PowerShell Remoting | Run PowerShell scripts and cmdlets remotely |
| Interactive Shell | Establish an interactive remote shell session |
| File Transfer | Upload and download files over WinRM |
Authentication
WinRM 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 |
Connection Details
| Property | Value |
|---|---|
| Protocol | WS-Management (SOAP over HTTP/HTTPS) |
| HTTP Port | 5985 |
| HTTPS Port | 5986 |
| Authentication | NTLM, Kerberos, Basic, Certificate |
| Libraries | github.com/cloudbase/go-winrm, github.com/k8gege/LadonGo |
Payload Execution via WinRM
WinRM is a primary execution channel for delivering payloads to remote hosts. The payload factory can generate artifacts suited for WinRM delivery:Payload Factory Integration
When the payload factory is operational, WinRM execution modules will request artifacts by capability:| Capability Request | Use Case |
|---|---|
execution=script, type=ps1 | PowerShell stager for in-memory execution |
inmemory=true, execution=script | Fileless execution via encoded PowerShell |
execution=self-exec, os=windows | Standard EXE executed after file transfer |
reflective=true, execution=script | Reflective DLL loaded via PowerShell cradle |
Spray Integration
WinRM credential spraying tests credentials against WinRM endpoints. Seespray winrm.

