Default Ports: 5985 (HTTP), 5986 (HTTPS)
WinRM is Windows’ native remote management protocol, built on PowerShell remoting rather than a graphical session like RDP. In enterprise environments it’s frequently enabled right alongside RDP, or even in its place for admin-only hosts, and getting a WinRM shell means you land directly in PowerShell, with all the tooling that implies, rather than a bare cmd.exe.
Interactive Shell
A live PowerShell session on the target, via
evil-winrm or Enter-PSSession. The default choice for hands-on post-exploitation.Invoke-Command
Runs a script block remotely without an interactive session, useful for scripting the same action across many hosts at once.
Connecting
- evil-winrm
- winrs
- PowerShell (Enter-PSSession)
The standard tool for this service, built specifically for WinRM pentesting.Loading custom PowerShell scripts from a local folder at connect time saves re-uploading them every session:
Recon
/wsman endpoint confirms the service is really WinRM, worth checking in a browser or with curl before anything else:
Brute Forcing
Command Execution Without a Full Shell
Once you have valid credentials, both NetExec andInvoke-Command can run a single command without dropping into an interactive session, useful for quick checks across several hosts.
Useful evil-winrm Commands
Once connected, these built-in commands cover file transfer and common evasion without needing to upload separate tools.Metasploit Modules
CredSSP and Multi-Hop Sessions
By default, credentials used in a WinRM session can’t be reused to authenticate onward to a third host from inside that session, a protection against credential relay. CredSSP exists specifically to bypass that limitation when it’s genuinely needed for legitimate multi-hop administration, and it’s worth checking for since it directly enables double-hop attacks.
Quick Reference Tools
Hackviser: WinRM
Quick-reference pentesting guide for the WinRM service.
HackTricks: WinRM
Deeper breakdown of WinRM enumeration and exploitation techniques.
evil-winrm
The standard WinRM shell tool used throughout this page.

