GO KALI FREE

Evil-WinRM

Post Exploitation

Intermediatehigh risk

Evil-WinRM is a dedicated tool for executing commands via the Windows Remote Management (WinRM) protocol. It serves as an exploit shell alternative during penetration testing engagements.

Installation

sudo gem install evil-winrm

Basic Syntax

evil-winrm -i <target_ip> -u <user> -p <password>

Quick Facts

Full Name
Evil-WinRM
License
MIT
Language
Ruby
Interface
CLI
Category
Remote Shell
Requires
WinRM Enabled on Target

Tool Overview

Evil-WinRM is the ultimate WinRM client for penetration testers, providing an interactive PowerShell-like shell on remote Windows systems. It enables efficient lateral movement and post-exploitation through the Windows Remote Management protocol.

With built-in support for pass-the-hash authentication, file upload/download, and custom extension loading, Evil-WinRM streamlines remote Windows access during security assessments.

Common Commands

evil-winrm -i 10.10.10.10 -u <USER> -p <PASS>Connect to a Windows host over WinRM with a username and password
evil-winrm -i 10.10.10.10 -u <USER> -H <NTLM_HASH>Authenticate using a pass-the-hash NTLM hash instead of a password
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> -SConnect using HTTPS/SSL WinRM (port 5986)
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> --port 5986 -SSpecify a custom port and enable SSL
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> -s /path/to/scriptsSet a local scripts directory to load PowerShell scripts from
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> -e /path/to/exesSet a local executables directory for the Invoke-Binary feature
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> -r example.comUse Kerberos authentication with the given realm
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> --spn HTTPSet the SPN prefix for Kerberos authentication
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> -c /path/to/cert.pem -k /path/to/key.pemAuthenticate with an SSL client certificate and private key
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> -lEnable logging of the session to a file
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> -nDisable colored output
evil-winrm -i 10.10.10.10 -u <USER> -p <PASS> -NDisable remote path completion
upload /path/to/file C:\Windows\Temp\fileMenu command: upload a local file to the remote host
download C:\Users\Administrator\Desktop\flag.txt /path/to/fileMenu command: download a remote file to the local machine
servicesMenu command: list Windows services and their vulnerable permissions

Step-by-Step Guide

  1. 1Ensure you have a valid password or authentication hash
  2. 2Establish a session to the target machine
  3. 3Execute standard command-line instructions
  4. 4Transfer files to or from the machine as required
  5. 5Import advanced scripts from the built-in menu to expand capabilities

Use Cases

Remote Shell

Get interactive PowerShell on Windows targets.

Lateral Movement

Pivot between Windows hosts via WinRM.

File Transfer

Upload/download files to/from target.

Extension Loading

Load custom PowerShell scripts dynamically.

Key Features

Related Tools

CrackMapExec

Post Exploitation

AD lateral movement toolkit.

Impacket

Post Exploitation

Protocol toolkit for Windows.

Frequently Asked Questions

What is Evil-WinRM used for?

Evil-WinRM provides an interactive PowerShell shell on Windows targets via the WinRM protocol. It's used for remote command execution, file transfers, and lateral movement during penetration testing.

How does pass-the-hash work with Evil-WinRM?

Evil-WinRM supports NTLM pass-the-hash authentication using the -H flag. You can authenticate to WinRM using only the NTLM hash without knowing the plaintext password.

What protocols does Evil-WinRM support?

Evil-WinRM supports WinRM (HTTP/HTTPS) and can work with both NTLM and Kerberos authentication. It also supports SSL for encrypted WinRM communication.

Can Evil-WinRM run PowerShell scripts?

Yes, Evil-WinRM provides a full PowerShell execution environment. You can use its built-in menu to load extensions like Bypass-4MSI, and execute arbitrary PowerShell cmdlets and scripts.

Tags

#post-exploitation#winrm#windows#remote-shell

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.