Contact Us

Evil-Winrm : The Ultimate WinRM Shell For Hacking/Pentesting

Cyber Security | January 14, 2020

Evil-WinRM is the ultimate WinRM shell for hacking/pentesting. WinRM (Windows Remote Management) is the Microsoft implementation of WS-Management Protocol. A standard SOAP based protocol that allows hardware and operating systems from different vendors to interoperate. Microsoft included it in their Operating Systems in order to make life easier to system administrators.

This program can be used on any Microsoft Windows Servers with this feature enabled (usually at port 5985), of course only if you have credentials and permissions to use it. So we can say that it could be used in a post-exploitation hacking/pentesting phase.

The purpose of this program is to provide nice and easy-to-use features for hacking. It can be used with legitimate purposes by system administrators as well but the most of its features are focused on hacking/pentesting stuff.

Features

Ruby 2.3 or higher is needed. Some ruby gems are needed as well: winrm >=2.3.2, winrm-fs >=1.3.2, stringio >=0.0.2 and colorize >=0.8.1. Depending of your installation method (3 availables) the installation of them could be required to be done manually.

Another important requirement only used for Kerberos auth is to install the Kerberos package used for network authentication.
For some Linux like Debian based (Kali, Parrot, etc.) it is called krb5-user. For BlackArch it is called krb5 and probably it could be called in a different way for other Linux distributions.

Installation & Quick Start (4 methods)

Method 1. Installation directly as ruby gem (dependencies will be installed automatically on your system)

Method 2. Git clone and install dependencies on your system manually

Method 3. Using bundler (dependencies will not be installed on your system, just to use evil-winrm)

Method 4. Using Docker

If you don’t want to put the password in clear text, you can optionally avoid to set -p argument and the password will be prompted preventing to be shown.

To use IPv6, the address must be added to /etc/hosts. Just put the already set name of the host after -i argument instead of an IP address.

Table of Contents

Basic commands

Notes about paths (upload/download):
Relative paths are not allowed to use on download/upload. Use filenames on current directory or absolute path.
If you are using Evil-WinRM in a docker environment, bear in mind that all local paths should be at /data
and be pretty sure that you mapped it as a volume in order to be able
to access to downloaded files or to be able to upload files from your
local host O.S.

Load powershell scripts

Advanced commands

l04d3r-LoadDll: allows loading dll libraries in memory, it is equivalent to: [Reflection.Assembly]::Load([IO.File]::ReadAllBytes("pwn.dll"))

The dll file can be hosted by smb, http or locally. Once it is loaded type menu, then it is possible to autocomplete all functions.

Donut-Loader: allows to inject x64 payloads generated with awesome donut technique. No need to encode the payload.bin, just generate and inject!

You can use this donut-maker to generate the payload.bin if you don’t use Windows.
This script use a python module written by Marcello Salvati (byt3bl33d3r). It could be installed using pip:

pip3 install donut-shellcode

Bypass-4MSI: patchs AMSI protection.

Kerberos

Extra features