githubEdit

Evil-WinRM

Port: 5985 (Over HTTP) 5986 (Over HTTPS)

TIP: Use -S flag to enable SSL. Use this when the WinRM port is 5986 (Over HTTPS)

Do lateral movement via WinRM protocol using found credentials with evil-winrm

In your Evil-WinRM session, when authenticating you can use a folder from your local machine as a source to run powershell scripts

evil-winrm -i TARGET_IP -u USER -p PASSWORD -s /path/to/PowerSharpBinaries

Bypass AMSI using the command within the session:

Bypass-4MSI

Then you can run scripts from memory (DO NOT WRITE ON DISK UNLESS ABSOLUTELY NECESSARY!)

Authentication Methods

1) Clear text Password

2) Certificate (.pfx file)

After generating the private key from the .pfx file, we use Evil-WinRM to authenticate

3) Kerberos

Configure /etc/krb5.conf file with the appropriate settings (Replace some of the placeholders for your use case)

4) NTLM Authentication (Pass-the-Hash)

5) Authenticate using IPv6 address (In case firewall blocks IPv4 traffic on port 5985)

TIP: Enter the IPv6 in your /etc/hosts file and give it a hostname (preferably the target machine name)

6) Store logs with Evil-WinRM

Logs will be saved to

7) Run executables in Evil-WinRM sessions

8) Service Enumeration

9) File Transfer

Upload a file from our system to target machine

Download a file from target machine to our system

10) Use Evil-WinRM from Docker

Last updated