Skip to main content
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.
WinRM being open is itself a strong signal: it means the account you’re testing is a local administrator or has been explicitly delegated remoting rights, by default only Administrators can use it.

Connecting

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

A raw request to the /wsman endpoint confirms the service is really WinRM, worth checking in a browser or with curl before anything else:
Visiting http://TARGET:5985/wsman directly in a browser is often the fastest confirmation that WinRM is actually listening and worth pursuing, before running any tool against it.

Brute Forcing


Command Execution Without a Full Shell

Once you have valid credentials, both NetExec and Invoke-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.
A WinRM shell runs with the privileges of whichever account authenticated, usually a local admin. Treat access the same as any other admin-level compromise: confirm scope before credential dumping, persistence, or lateral movement.