Evil Winrm Py

SecurityDeveloper tools

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

Your AI app calls the Evil Winrm Py MCP server, which does the security and developer tools work and sends the result back to the chat.

About Evil Winrm Py

Evil Winrm Py is a community MCP server from adityatelange, filed in our directory under security and developer tools. Execute commands interactively on remote Windows machines using the WinRM protocol (just faster).

At a glance

Publisher
adityatelange (community)
Runs
See the README for setup
Written in
Python
License
MIT
GitHub stars
429

How to set up Evil Winrm Py

  1. Follow the install steps in the Evil Winrm Py README; it is written in Python, so have that toolchain ready.
  2. Check the Evil Winrm Py README for keys or settings; the registry lists none that Evil Winrm Py requires.
  3. Add Evil Winrm Py to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Evil Winrm Py tools to confirm the connection.
  5. Run one read-only task with Evil Winrm Py first, and keep your app asking before each tool call until the results look right.

Evil Winrm Py compared with similar servers

  • Wireshark by bx33661 has fewer GitHub stars than Evil Winrm Py (425 against 429); both are community servers, and both run locally.
  • ARTEX CC by sresarehumantoo has fewer GitHub stars than Evil Winrm Py (429 against 429); both are community servers, and both run locally.
  • Lasso Security Gateway by lasso-security has fewer GitHub stars than Evil Winrm Py (402 against 429); both are community servers, and both run locally.

Before you connect Evil Winrm Py

  • Give Evil Winrm Py its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Evil Winrm Py tool call until you trust what it does with them.
  • Treat text that Evil Winrm Py fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Evil Winrm Py on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Evil Winrm Py

How marketing and sales teams put Evil Winrm Py to work, by company size. Pick the size closest to yours and start Evil Winrm Py on one use case.

Small business

  • A small business can use Evil Winrm Py to check its domains, logins and site for common gaps before they cost a customer's trust.
  • Owners can ask Evil Winrm Py whether a tool or vendor has known issues before connecting it to customer data.
  • A small business with a developer can use Evil Winrm Py to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Evil Winrm Py runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing ops can use Evil Winrm Py to review what each connected app can access and remove keys nobody uses.
  • Security and web teams can connect Evil Winrm Py to scan campaign sites and forms before launch, not after an incident.
  • Growth engineers can use Evil Winrm Py to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Start Evil Winrm Py on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can run Evil Winrm Py in the security team's tooling, so marketing's agents and apps are reviewed like any other system.
  • Large orgs can use Evil Winrm Py to keep evidence for audits, showing which agents reached which data and when.
  • Enterprise engineering teams can roll out Evil Winrm Py with repo scopes and audit logs, so agents work only where they are allowed.
  • Evil Winrm Py is a community server, so have security review the code and pin a version before Evil Winrm Py touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Evil Winrm Py README

From adityatelange/evil-winrm-py on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

evil-winrm-py

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

[!NOTE] 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.

Motivation

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.

I also wanted to learn more about winrm and its internals, so this project will also serve as a learning experience for me.

Features

  • Execute commands on remote Windows machines via an interactive shell.
  • Download files from the remote host to the local machine.
  • Upload files from the local machine to the remote host.
  • Progress bar for file transfers with speed and time estimation.
  • Stable and reliable file transfer including support for large files with MD5 checksum verification.
  • Auto-complete local and remote file paths (even those with spaces) with Tab completion.
  • Auto-complete PowerShell cmdlets/helpers with Tab completion.
  • Load PowerShell functions from local scripts into the interactive shell.
  • Run local PowerShell scripts on the remote host.
  • Load local DLLs (in-memory) as PowerShell modules on the remote host.
  • Upload and execute local EXEs (in-memory) on the remote host.
  • List the running services (except system services) on the remote host.
  • Optional MCP server mode to expose WinRM login/execute/logout as tools for MCP clients, with support for multiple concurrent sessions. 🆕
  • Enable logging and debugging for better traceability.
  • Navigate command history using up/down arrow keys.
  • Display colorized output for improved readability.
  • Lightweight and Python-based for ease of use.
  • Keyboard Interrupt (Ctrl+C / Ctrl+D) support to terminate long-running commands gracefully.

Includes support for:

  • NTLM authentication.
  • Pass-the-Hash authentication.
  • Certificate authentication.
  • Kerberos authentication with custom SPN prefix and hostname options.
  • SSL to secure communication with the remote host.
  • custom WSMan URIs.
  • custom user agent for the WinRM client.
  • connecting to Just Enough Administration (JEA) session configurations. 🆕

Detailed documentation can be found in the docs (github.com/adityatelange/evil-winrm-py/blob/main/docs) directory.

Installation

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/pipx 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 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

Availability on Unix distributions

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.

Usage

Details on how to use evil-winrm-py can be found in the Usage Guide.

usage: evil-winrm-py [-h] [-i IP] [-u USER] [-p PASSWORD] [-H HASH] [-c CONFIGURATION_NAME]
                     [--priv-key-pem PRIV_KEY_PEM] [--cert-pem CERT_PEM] [--uri URI] [--ua UA]
                     [--port PORT] [--spn-prefix SPN_PREFIX] [--spn-hostname SPN_HOSTNAME] [-k]
                     [--no-pass] [--ssl] [--log] [--debug] [--no-colors] [--version] [--mcp]
                     [--mcp-port MCP_PORT] [--mcp-host MCP_HOST]

options:
  -h, --help            show this help message and exit
  -i IP, --ip IP        remote host IP or hostname
  -u USER, --user USER  username
  -p PASSWORD, --password PASSWORD
                        password
  -H HASH, --hash HASH  nthash
  -c CONFIGURATION_NAME, --configuration-name CONFIGURATION_NAME
                        session configuration (JEA endpoint) to connect to (default: Microsoft.PowerShell)
  --priv-key-pem PRIV_KEY_PEM
                        local path to private key PEM file
  --cert-pem CERT_PEM   local path to certificate PEM file
  --uri URI             wsman URI (default: /wsman)
  --ua UA               user agent for the WinRM client (default: "Microsoft WinRM Client")
  --port PORT           remote host port (default 5985)
  --spn-prefix SPN_PREFIX
                        specify spn prefix
  --spn-hostname SPN_HOSTNAME
                        specify spn hostname
  -k, --kerberos        use kerberos authentication
  --no-pass             do not prompt for password
  --ssl                 use ssl
  --log                 log session to file
  --debug               enable debug logging
  --no-colors           disable colors
  --version             show version
  --mcp                 start MCP server in streamable HTTP mode
  --mcp-port MCP_PORT   port for MCP streamable HTTP mode (default 8000)
  --mcp-host MCP_HOST   host for MCP streamable HTTP mode (default 127.0.0.1)

For more information about this project, visit https://github.com/adityatelange/evil-winrm-py
For user guide, visit https://github.com/adityatelange/evil-winrm-py/blob/main/docs/usage.md

Example:

evil-winrm-py -i 192.168.1.100 -u Administrator -p P@ssw0rd --ssl

Menu Commands (inside evil-winrm-py shell)

Menu:
[+] services                                                - Show the running services (except system services)
[+] upload <local_path> <remote_path>                       - Upload a file
[+] download <remote_path> <local_path>                     - Download a file
[+] loadps <local_path>.ps1                                 - Load PowerShell functions from a local script
[+] runps <local_path>.ps1                                  - Run a local PowerShell script on the remote host
[+] loaddll <local_path>.dll                                - Load a local DLL (in-memory) as a module on the remote host
[+] runexe <local_path>.exe [args]                          - Upload and execute (in-memory) a local EXE on the remote host
[+] menu                                                    - Show this menu
[+] clear, cls                                              - Clear the screen
[+] exit                                                    - Exit the shell
Note: Use absolute paths for upload/download for reliability.
MCP Server Mode

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.

evil-winrm-py --mcp
# or customize the address:
evil-winrm-py --mcp --mcp-host 0.0.0.0 --mcp-port 8000

[!WARNING] 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.

Credits

Questions about Evil Winrm Py

What is the Evil Winrm Py MCP server?

Execute commands interactively on remote Windows machines using the WinRM protocol (just faster). Evil Winrm Py is maintained by adityatelange on GitHub at adityatelange/evil-winrm-py, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Evil Winrm Py MCP server?

Evil Winrm Py doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (adityatelange/evil-winrm-py). Like most servers, Evil Winrm Py ends with a command or URL you paste into your AI app's MCP config.

Does Evil Winrm Py need an API key?

The registry lists no required keys for Evil Winrm Py. Check the Evil Winrm Py README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Evil Winrm Py an official MCP server?

No. Evil Winrm Py is a community server maintained by adityatelange. Community servers can be excellent; read the code and the open issues before you give Evil Winrm Py access to company data.

What license is Evil Winrm Py under?

Evil Winrm Py is released under the MIT license, according to its GitHub repository. The license covers the code of Evil Winrm Py; the service it connects to has its own terms.