Skip to content
Back to search

evil-winrm-py

Execute commands interactively on remote Windows machines using the WinRM protocol (just faster)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/adityatelange/evil-winrm-py with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/adityatelange/evil-winrm-py'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/adityatelange--evil-winrm-py/badge.svg)](/listings/adityatelange--evil-winrm-py)

HTML

<a href="/listings/adityatelange--evil-winrm-py"><img src="/api/listings/adityatelange--evil-winrm-py/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Installation of Kerberos prerequisites on Linux

sudo apt install gcc python3-dev libkrb5-dev krb5-pkinit
# Optional: krb5-user

Install `evil-winrm-py`

> You may use [uv](https://docs.astral.sh/uv/)/[pipx](https://pipx.pypa.io/stable/) instead of pip to install evil-winrm-py. `uv`/`pipx` is a tool to install and run Python applications in isolated environments, which helps prevent dependency conflicts by keeping the tool's dependencies separate from your system's Python packages.

Check [Installation Guide](https://github.com/adityatelange/evil-winrm-py/blob/main/docs/install.md) for more details.

pip install evil-winrm-py
# for optional dependencies use any one of the following commands:
pip install evil-winrm-py[kerberos] # for kerberos support on Linux
pip install evil-winrm-py[mcp] # for mcp support
pip install evil-winrm-py[kerberos,mcp] # to install both optional dependencies

# Note: building gssapi and krb5 packages may take some time, so be patient.

or if you want to install with latest commit from the main branch you can do so by cloning the repository and installing it with `pip`/`uv`/`pipx`:

git clone https://github.com/adityatelange/evil-winrm-py
cd evil-winrm-py
pip install .
# or use: pip install .[kerberos,mcp] to install both optional dependencies

Update

pip install --upgrade evil-winrm-py

Uninstall

pip uninstall evil-winrm-py

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 200 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align=center>
  2. <img height="150" alt="ewp-logo" src="https://raw.githubusercontent.com/adityatelange/evil-winrm-py/refs/heads/main/assets/logo.svg" />
  3. <h1>evil-winrm-py</h1>
  4. [![PyPI version](https://img.shields.io/pypi/v/evil-winrm-py)](https://pypi.org/project/evil-winrm-py/)
  5. ![Python](https://img.shields.io/badge/python-3.10+-blue.svg)
  6. ![License](https://img.shields.io/github/license/adityatelange/evil-winrm-py)
  7. [![PyPI Downloads](https://static.pepy.tech/personalized-badge/evil-winrm-py?period=monthly&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=BLUE&left_text=downloads%2Fmonth)](https://pepy.tech/projects/evil-winrm-py)
  8. [![Github Wiki](https://img.shields.io/badge/github-wiki%2Fdocs-blue)](https://github.com/adityatelange/evil-winrm-py/wiki)
  9. </div>
  10. `evil-winrm-py` is a python-based tool for executing commands on remote Windows machines using the WinRM (Windows Remote Management) protocol. It provides an interactive shell with enhanced features like file upload/download with progress and checksum verification, tab-completion of local/remote paths and PowerShell cmdlets, loading and running PowerShell scripts, in-memory execution of DLLs and EXEs, command history, and colorized output. It can also run as an MCP server, exposing WinRM sessions as tools for MCP-compatible clients. It supports various authentication methods including NTLM, Pass-the-Hash, Certificate, and Kerberos. [skip to installation](#installation)
  11. ![](https://raw.githubusercontent.com/adityatelange/evil-winrm-py/refs/tags/v1.7.0/assets/terminal.png)
  12. > [!NOTE]
  13. > This tool is designed strictly for educational, ethical use, and authorized penetration testing. Always ensure you have explicit authorization before accessing any system. Unauthorized access or misuse of this tool is both illegal and unethical.
  14. ## Motivation
  15. The original evil-winrm is written in Ruby, which can be a hurdle for some users. Rewriting it in Python makes it more accessible and easier to use, while also allowing us to leverage Python’s rich ecosystem for added features and flexibility.
  16. I also wanted to learn more about winrm and its internals, so this project will also serve as a learning experience for me.
  17. ## Features
  18. - Execute commands on remote Windows machines via an interactive shell.
  19. - Download files from the remote host to the local machine.
  20. - Upload files from the local machine to the remote host.
  21. - Progress bar for file transfers with speed and time estimation.
  22. - Stable and reliable file transfer including support for large files with MD5 checksum verification.
  23. - Auto-complete local and remote file paths (even those with spaces) with `Tab` completion.
  24. - Auto-complete PowerShell cmdlets/helpers with `Tab` completion.
  25. - Load PowerShell functions from local scripts into the interactive shell.
  26. - Run local PowerShell scripts on the remote host.
  27. - Load local DLLs (in-memory) as PowerShell modules on the remote host.
  28. - Upload and execute local EXEs (in-memory) on the remote host.
  29. - List the running services (except system services) on the remote host.
  30. - Optional MCP server mode to expose WinRM login/execute/logout as tools for MCP clients, with support for multiple concurrent sessions. 🆕
  31. - Enable logging and debugging for better traceability.
  32. - Navigate command history using `up`/`down` arrow keys.
  33. - Display colorized output for improved readability.
  34. - Lightweight and Python-based for ease of use.
  35. - Keyboard Interrupt (Ctrl+C / Ctrl+D) support to terminate long-running commands gracefully.
  36. Includes support for:
  37. - NTLM authentication.
  38. - Pass-the-Hash authentication.
  39. - Certificate authentication.
  40. - Kerberos authentication with custom SPN prefix and hostname options.
  41. - SSL to secure communication with the remote host.
  42. - custom WSMan URIs.
  43. - custom user agent for the WinRM client.
  44. - connecting to Just Enough Administration (JEA) session configurations. 🆕
  45. Detailed documentation can be found in the [docs](https://github.com/adityatelange/evil-winrm-py/blob/main/docs) directory.
  46. ## Installation
  47. #### Installation of Kerberos prerequisites on Linux
  48. ```bash
  49. sudo apt install gcc python3-dev libkrb5-dev krb5-pkinit
  50. # Optional: krb5-user
  51. ```
  52. ### Install `evil-winrm-py`
  53. > You may use [uv](https://docs.astral.sh/uv/)/[pipx](https://pipx.pypa.io/stable/) instead of pip to install evil-winrm-py. `uv`/`pipx` is a tool to install and run Python applications in isolated environments, which helps prevent dependency conflicts by keeping the tool's dependencies separate from your system's Python packages.
  54. Check [Installation Guide](https://github.com/adityatelange/evil-winrm-py/blob/main/docs/install.md) for more details.
  55. ```bash
  56. pip install evil-winrm-py
  57. # for optional dependencies use any one of the following commands:
  58. pip install evil-winrm-py[kerberos] # for kerberos support on Linux
  59. pip install evil-winrm-py[mcp] # for mcp support
  60. pip install evil-winrm-py[kerberos,mcp] # to install both optional dependencies
  61. # Note: building gssapi and krb5 packages may take some time, so be patient.
  62. ```
  63. or if you want to install with latest commit from the main branch you can do so by cloning the repository and installing it with `pip`/`uv`/`pipx`:
  64. ```bash
  65. git clone https://github.com/adityatelange/evil-winrm-py
  66. cd evil-winrm-py
  67. pip install .
  68. # or use: pip install .[kerberos,mcp] to install both optional dependencies
  69. ```
  70. ### Update
  71. ```bash
  72. pip install --upgrade evil-winrm-py
  73. ```
  74. ### Uninstall
  75. ```bash
  76. pip uninstall evil-winrm-py
  77. ```
  78. ## Availability on Unix distributions
  79. [![Packaging status](https://repology.org/badge/vertical-allrepos/evil-winrm-py.svg)](https://repology.org/project/evil-winrm-py/versions)
  80. For above mentioned distributions, you can install `evil-winrm-py` directly from their package managers. Thanks to the package maintainers for packaging and maintaining `evil-winrm-py` in their respective distributions.
  81. ## Usage
  82. Details on how to use `evil-winrm-py` can be found in the [Usage Guide](https://github.com/adityatelange/evil-winrm-py/blob/main/docs/usage.md).
  83. ```bash
  84. usage: evil-winrm-py [-h] [-i IP] [-u USER] [-p PASSWORD] [-H HASH] [-c CONFIGURATION_NAME]
  85. [--priv-key-pem PRIV_KEY_PEM] [--cert-pem CERT_PEM] [--uri URI] [--ua UA]
  86. [--port PORT] [--spn-prefix SPN_PREFIX] [--spn-hostname SPN_HOSTNAME] [-k]
  87. [--no-pass] [--ssl] [--log] [--debug] [--no-colors] [--version] [--mcp]
  88. [--mcp-port MCP_PORT] [--mcp-host MCP_HOST]
  89. options:
  90. -h, --help show this help message and exit
  91. -i IP, --ip IP remote host IP or hostname
  92. -u USER, --user USER username
  93. -p PASSWORD, --password PASSWORD
  94. password
  95. -H HASH, --hash HASH nthash
  96. -c CONFIGURATION_NAME, --configuration-name CONFIGURATION_NAME
  97. session configuration (JEA endpoint) to connect to (default: Microsoft.PowerShell)
  98. --priv-key-pem PRIV_KEY_PEM
  99. local path to private key PEM file
  100. --cert-pem CERT_PEM local path to certificate PEM file
  101. --uri URI wsman URI (default: /wsman)
  102. --ua UA user agent for the WinRM client (default: "Microsoft WinRM Client")
  103. --port PORT remote host port (default 5985)
  104. --spn-prefix SPN_PREFIX
  105. specify spn prefix
  106. --spn-hostname SPN_HOSTNAME
  107. specify spn hostname
  108. -k, --kerberos use kerberos authentication
  109. --no-pass do not prompt for password
  110. --ssl use ssl
  111. --log log session to file
  112. --debug enable debug logging
  113. --no-colors disable colors
  114. --version show version
  115. --mcp start MCP server in streamable HTTP mode
  116. --mcp-port MCP_PORT port for MCP streamable HTTP mode (default 8000)
  117. --mcp-host MCP_HOST host for MCP streamable HTTP mode (default 127.0.0.1)
  118. For more information about this project, visit https://github.com/adityatelange/evil-winrm-py
  119. For user guide, visit https://github.com/adityatelange/evil-winrm-py/blob/main/docs/usage.md
  120. ```
  121. Example:
  122. ```bash
  123. evil-winrm-py -i 192.168.1.100 -u Administrator -p P@ssw0rd --ssl
  124. ```
  125. ## Menu Commands (inside evil-winrm-py shell)
  126. ```bash
  127. Menu:
  128. [+] services - Show the running services (except system services)
  129. [+] upload <local_path> <remote_path> - Upload a file
  130. [+] download <remote_path> <local_path> - Download a file
  131. [+] loadps <local_path>.ps1 - Load PowerShell functions from a local script
  132. [+] runps <local_path>.ps1 - Run a local PowerShell script on the remote host
  133. [+] loaddll <local_path>.dll - Load a local DLL (in-memory) as a module on the remote host
  134. [+] runexe <local_path>.exe [args] - Upload and execute (in-memory) a local EXE on the remote host
  135. [+] menu - Show this menu
  136. [+] clear, cls - Clear the screen
  137. [+] exit - Exit the shell
  138. Note: Use absolute paths for upload/download for reliability.
  139. ```
  140. ### MCP Server Mode
  141. With the `mcp` extra installed, you can run `evil-winrm-py` as an MCP server, exposing WinRM login/execute/logout as tools for MCP-compatible clients (e.g. Claude, other AI agents) over streamable HTTP. It supports multiple concurrent WinRM sessions via a `session_id`.
  142. ```bash
  143. evil-winrm-py --mcp
  144. # or customize the address:
  145. evil-winrm-py --mcp --mcp-host 0.0.0.0 --mcp-port 8000
  146. ```
  147. > [!WARNING]
  148. > Since MCP server mode allows remote command execution on Windows hosts via MCP tools, only expose it on trusted networks and to trusted MCP clients.
  149. ## Credits
  150. - Original evil-winrm project - https://github.com/Hackplayers/evil-winrm
  151. - PowerShell Remoting Protocol for Python - https://github.com/jborean93/pypsrp
  152. - Prompt Toolkit - https://github.com/prompt-toolkit/python-prompt-toolkit
  153. - tqdm - https://github.com/tqdm/tqdm
  154. - Thanks to [Github Coplilot](https://github.com/features/copilot) and [Google Gemini](https://gemini.google.com/app) for code suggestions and improvements.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.