Evil-WinRM is the tool testers use to get a full, interactive shell on a Windows machine over WinRM, Windows Remote Management, the same protocol administrators use to manage servers remotely. That is the important part: it is not exploiting a vulnerability. It is using a legitimate remote-management feature with credentials it should not have. If it appears in a report against your environment, the story is almost always about credentials and access, not a software flaw. MITRE ATT&CK tracks the technique as T1021.006, Remote Services: Windows Remote Management, and describes it the same way: adversaries use valid accounts to interact with remote systems over WinRM.
What WinRM is, and why attackers like it
WinRM is Microsoft’s built-in protocol for remote administration: the engine behind PowerShell Remoting. It is enabled across countless corporate environments because administrators rely on it, and it typically listens on ports 5985 (HTTP) and 5986 (HTTPS). Microsoft’s own guidance calls PowerShell Remoting “the recommended way to manage Windows systems” and notes it is enabled by default on Windows Server 2012 R2 and later (Microsoft Learn).
That ubiquity is exactly why attackers value it. Using WinRM to move around a network is living off the land: abusing a trusted, expected, built-in feature rather than dropping malware. Traffic to WinRM looks like normal administration, which makes it quieter than more obviously hostile techniques. Evil-WinRM turns a valid credential into a clean interactive shell over this channel, with conveniences built in for uploading files, loading scripts, and running post-exploitation tooling.
It is also actively maintained. As of November 2026 the current release is v4.1 (September 2026), which added support for Ruby 4.0; v3.8 in December 2025 added Kerberos ticket files (ccache and kirbi formats) as a login method, on top of the Kerberos authentication the tool already had (project releases). A tool that keeps gaining authentication options is a reminder that the control that matters is who holds remote-management rights, not which client they connect with.
The one thing it requires: valid credentials
Evil-WinRM does not break in. It needs a credential, usually one of:
- A username and password for an account with remote-management rights, or
- An NTLM hash for that account, usually dumped from memory or a credential store with a tool such as Mimikatz (it supports pass-the-hash), or
- Kerberos tickets for the account.
In other words, the hard part, obtaining the credential, happens before Evil-WinRM. The credential typically comes from an earlier stage: a password sprayed with Kerbrute, a hash dumped with NetExec, or a credential found in a config file or share. Evil-WinRM is what that credential is then used with to get comfortable, interactive access.
This is why its appearance in a report points backwards. The finding is not “Evil-WinRM was used.” The finding is “an attacker obtained a credential with remote-management rights, and here is what that access allowed.”
Evil-WinRM authentication options: password, hash, Kerberos, certificate
The option names below are from the project’s own help text (Evil-WinRM on GitHub). They are the flags you will see in the command line a tester pastes into a report, and each one tells you something different about what was stolen.
| Login method | Options in the command | What the tester held | What it tells the defender |
|---|---|---|---|
| Password | -u user, -p password |
The cleartext password | It was guessed, sprayed, reused or found in a file or share. Reset it and find where it was exposed |
| NTLM hash | -u user, -H hash |
The NT hash, never cracked | The hash was dumped from a host or the domain. Password length did not matter, and NTLM is still accepted for remote management here |
| Kerberos | -r realm, optionally -K ticket file |
A Kerberos ticket (ccache or kirbi file) | A ticket was stolen or forged. A password reset alone does not end access until the ticket expires |
| Certificate | -c public key, -k private key, with -S for SSL |
A client certificate and its private key | Certificate mapping is enabled on the listener. Microsoft notes these certificates map only to local accounts, not domain accounts |
Two details answer common questions. A local account, as opposed to a domain account, authenticates with NTLM, because Kerberos is only available for domain accounts (Microsoft Learn). And -S only switches the connection to the HTTPS listener on 5986; it does not change who is allowed in.
Who can connect over WinRM: the groups that matter
A valid password is not enough by itself. Microsoft’s requirement is that the account be “a member of the Administrators or Remote Management Users group on the remote computer” (about_Remote_Requirements). So when a low-privilege account opens an Evil-WinRM session, look at two things: who is in the local Remote Management Users group on that server, and which domain groups have been nested into local Administrators. Both lists tend to grow over the years and rarely get reviewed.
How testers use it
The usage is deliberately simple, which is the point. The tester points Evil-WinRM at a host’s WinRM port with whichever of the three common credentials above the earlier stage produced: a password that was recovered or sprayed, an NTLM hash that was dumped but never cracked, or a Kerberos ticket file. Any of the three opens the same thing: an interactive PowerShell session on the remote host, over the ordinary WinRM channel administrators already use. From there the tester enumerates the machine and moves files in and out, exactly as a legitimate administrator would. Nothing about the session looks like an exploit, because it is not one. That is what makes the finding a statement about credentials and privilege rather than about a software flaw, and how far that one credential reaches is the question an Active Directory security assessment answers.
What its use in a report means
When a report describes access via Evil-WinRM, read it as a statement about three things:
- A credential was compromised, and it belonged to an account with WinRM/remote-management privileges. The upstream question is how it was obtained and why it was so privileged.
- That account had more reach than it needed: if a single credential grants interactive shells across many servers, privilege boundaries are too loose.
- The interactive access enabled real impact: from a shell, the tester can enumerate, attempt privilege escalation, and pivot. Evil-WinRM is where “we have a credential” becomes “we control this server.”
The remediation is never “block Evil-WinRM.” It is to fix the credential exposure and the excessive privilege that made the credential valuable.
How defenders detect and limit it
WinRM abuse blends into legitimate administration, which makes it a genuine detection challenge, but not an impossible one:
- WinRM logon events (Event ID 4624, logon type 3) followed by PowerShell activity on servers that do not normally receive remote sessions.
- PowerShell script-block and module logging, which captures what ran in the session: the single most valuable log source here.
- Remote-management connections from unexpected sources: a workstation initiating WinRM to multiple servers is not normal administrator behavior.
Evil-WinRM detection: event IDs and processes to alert on
| Log source | Event or process | What to alert on |
|---|---|---|
| Security log | Event ID 4624, logon type 3 | A network logon to a server from a workstation or an account that does not normally administer it |
| Security log or Sysmon | Process creation (Event ID 4688, or Sysmon Event ID 1) for wsmprovhost.exe |
The process Windows starts to host a remote PowerShell session, appearing on a server with no scheduled remote administration, or spawning cmd.exe and other child processes |
| Microsoft-Windows-PowerShell/Operational | Event ID 4104, script block logging | The actual commands and scripts run in the session, including loaded tooling and attempts to tamper with AMSI |
| Microsoft-Windows-WinRM/Operational | Inbound session events | A source address outside your management subnet opening a WinRM session |
| Network | TCP 5985 and 5986 | Workstation-to-server or server-to-server WinRM that crosses a tier boundary |
Event ID 4104 is only written when script block logging is turned on (Microsoft Learn), so check that policy before you rely on the third row. The useful alert is the sequence: a type 3 logon, a new wsmprovhost.exe and PowerShell activity on the same host within a short window.
Limiting the exposure:
- Restrict WinRM to the specific management hosts and accounts that need it, not domain-wide.
- Enforce least privilege so few accounts hold remote-management rights, and none more broadly than required.
- Protect credentials: LAPS for unique local admin passwords, Credential Guard against hash theft, tiered administration so a workstation credential cannot manage servers. Our Active Directory hardening checklist has the settings for each.
- Enable PowerShell logging everywhere: it is the record of what an interactive session actually did.
- Require MFA and just-in-time elevation for administrative access where possible.
- Use Just Enough Administration (JEA) for routine tasks. A JEA endpoint limits a remote session to the specific cmdlets a role needs, so a stolen helpdesk credential opens a constrained session instead of a full shell (Microsoft Learn).
- Scope the firewall rule for 5985 and 5986 to your management subnet or jump hosts, so a compromised workstation cannot reach the listener at all.
How we use it in an engagement
Evil-WinRM is a lateral-movement and post-exploitation tool in internal network penetration testing and red team assessments. It sits after credential access: it is how a recovered credential is converted into hands-on control of a Windows host, from which the tester continues toward the engagement’s objective. It is a link in a chain, and the chain is the finding.
When we use it, it is only on hosts inside the agreed scope and only to prove what a recovered credential allows, under the written limits that govern the whole test: no destructive actions and no changes to production data. The report records where the credential came from and which servers accepted a remote session with it, and the logging guidance above tells your team what should have captured the session. That turns one line of tool output into fixable findings about the exposure and the excess privilege, each covered by the free retest.
Frequently asked questions
Is Evil-WinRM malware? No. It is an open-source Ruby client for the WinRM protocol, published on GitHub and used by penetration testers. It exploits nothing and installs nothing on the target by itself. Security products may still flag it or the session it opens, because attackers use the same technique with stolen credentials.
Which ports does Evil-WinRM use? The standard WinRM ports: TCP 5985 for HTTP and TCP 5986 for HTTPS. If neither is reachable from where the attacker sits, the tool has nothing to connect to.
Does disabling WinRM break Windows administration? It can. PowerShell Remoting, Server Manager and many management tools depend on WinRM, so turning it off everywhere is rarely practical. Restricting who can connect, and from which hosts, removes most of the risk.
Can EDR detect Evil-WinRM?
Often, but through behavior, not through the tool’s name. The connection is a normal WinRM logon with valid credentials. What EDR and a SIEM can catch is what follows: wsmprovhost.exe starting on a server that is never managed remotely, script block logs showing enumeration or credential tooling, and one account opening sessions on many hosts.
The short version
Evil-WinRM turns a valid Windows credential into a clean interactive shell over WinRM, a legitimate remote-management protocol, which makes it a living-off-the-land technique that resembles normal administration. It exploits no vulnerability; it requires credentials obtained earlier. So its presence in a report is really a finding about credential exposure and excessive privilege, and the defenses are least privilege, credential protection (LAPS, Credential Guard, tiering), restricted WinRM, and thorough PowerShell logging.
Want to know whether one compromised credential would hand an attacker interactive control of your servers? Tracing that path end to end is what an internal penetration test does. Our internal penetration testing cost page shows the fixed price, from $6,000. Scope one here.
Written by
Mark Kiss, Founder & CEO
15+ years in the field. Focus: Offensive security & strategy. Part of the team that scopes, tests, and reports for our clients. Full profile →