-
Notifications
You must be signed in to change notification settings - Fork 661
The ultimate WinRM shell for hacking/pentesting
License
Hackplayers/evil-winrm
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
The ultimate WinRM shell for hacking/pentesting This shell 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. It is based mainly in the WinRM Ruby library which changed its way to work since its version 2.0. Now instead of using WinRM protocol, it is using PSRP (Powershell Remoting Protocol) for initializing runspace pools as well as creating and processing pipelines.
Ruby 2.3 or higher is needed. Some ruby gems are needed as well: 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 The remote path completion feature will work only if your ruby was compiled enabling the Method 1. Installation directly as ruby gem (dependencies will be installed automatically on your system)
If you don't want to put the password in clear text, you can optionally avoid to set To use IPv6, the address must be added to /etc/hosts. Just put the already set name of the host after
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
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:
This feature could be not available depending of the ruby you are using. It must be compiled with readline support. Otherwise, this feature will not work (a warning will be shown). Using this method you'll compile ruby with the needed readline feature but to use only the library without changing the default ruby version on your system. Because of this, is the most recommended method. Let's suppose that you have in your Debian based system ruby 2.7.3: Let's suppose that you want ruby 2.7.1 on a Debian based Linux and you are using zsh. This script will automatize it. You'll need to launch it from the same dir where evil-winrm.rb and Gemfile is located (the evil-winrm created dir after a git clone for example): Then you can safely launch evil-winrm using the new installed ruby with the required readline support from any location. If you want to compile it yourself, you can follow these steps. Let's suppose that you want ruby 2.7.3: Depending of your system it will be installed at Now just need to install evil-winrm dependencies for that new installed ruby version. The easiest way is to launch command After that, you can launch safely your new installed ruby to use it on evil-winrm: It is recommended to use this new installed ruby only to launch evil-winrm. If you set it up as your default ruby for your system, bear in mind that it has no dependency gems installed. Some ruby based software like Metasploit or others could not start correctly due dependencies problems. This feature will create files on your $HOME dir saving commands and the outputs of the WinRM sessions. Sometimes, you could face an error like this: The error is caused because the OpenSSL 3.0 version retired some legacy functions like MD4 which are needed to run this tool. There are different existing workarounds to deal with this situation:
Changelog and project changes can be checked here: CHANGELOG.md Staff: Hat tip to:
This script is licensed under LGPLv3+. Direct link to License. Evil-WinRM should be used for authorized penetration testing and/or nonprofit educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own servers and/or with the server owner's permission. AboutThe ultimate WinRM shell for hacking/pentesting TopicsResourcesLicenseCode of conductContributingStarsWatchersForksPackages 0
No packages published
| ||||