MCP server bridging Kali and FlareVM for automated Windows malware analysis. 48 tools, 5 prompts, 5 resources, composite playbooks (triage, behavioral, unpack, persistence audit).
FlareVM MCP Server
A Model Context Protocol (MCP) server that provides remote access to Windows malware analysis tools on FlareVM through a unified interface. This enables AI agents and security analysts to perform comprehensive malware analysis and reverse engineering tasks without manual tool interaction. This project is developed to enable agentic AI integration and ease file transfers to and from FlareVM while keeping it isolated.
Quick install
Three supported installation paths:
One-line installer (Kali / Debian)
curl -sSL https://raw.githubusercontent.com/zixuantemp/flarevm-mcp/main/install.sh | bash Creates a venv at ~/.flarevm-mcp/venv, installs the package, and stores your FlareVM password in the system keyring.
pip (any Linux / macOS / WSL)
pip install git+https://github.com/zixuantemp/flarevm-mcp.git flarevm-mcp # runs the MCP server on stdio
Docker
docker run -i --rm \ -e FLAREVM_HOST=192.168.100.10 \ -e FLAREVM_USER=xtemp \ -e FLAREVM_PASSWORD=infected \ ghcr.io/zixuantemp/flarevm-mcp
After install, register with your MCP client (~/.claude/.mcp.json or claudedesktopconfig.json) โ the installer prints a ready-to-paste snippet.
MCP capabilities
This server implements the full MCP capability set:
- Tools (48) โ see
resources/tools-reference.md. - Prompts (5) โ pre-baked workflows for common tasks. See
prompts/.
triageunknownsample, behavioralanalysis, unpackworkflow,
injectionhunt, persistenceaudit_report.
- Resources (5) โ live and static reference material:
flarevm://tools/inventory โ Test-Path every configured tool, live.
- flarevm://config/fakenet-default โ generated FakeNet config.
- flarevm://docs/yara-rules โ installed YARA rule listing + index.
- flarevm://docs/cheatsheet โ common workflow recipes.
- flarevm://status/connection โ live FlareVM health check.
- Skills (3) โ Claude Code skill bundles in
skills/:
triage-malware-sample, incident-response-windows, automated-unpacking.
Security
Detonation runs inside a disposable VM, never on the analyst host. See SECURITY.md for the full threat model, credential handling rules, and how to report a vulnerability.
License
MIT โ Copyright (c) 2026 zixuantemp.
What is FlareVM MCP?
FlareVM MCP is made to bridge between your analysis environment (typically Kali Linux) and an isolated Windows malware analysis VM (FlareVM) to enable analysis on both Linux and Windows environments. It exposes 40+ malware analysis tools through the MCP protocol, allowing:
- Remote file operations - Upload/download samples and artifacts
- Static analysis - Packer detection (DIEC), capability analysis (CAPA), string extraction (FLOSS)
- Dynamic analysis - Process monitoring, network surveillance, registry tracking
- Debuggers - x64dbg scripting, WinDbg crash analysis
- Instrumentation - Frida hooks for runtime API monitoring
- IDA Pro integration - Decompilation and annotation via RPC
Architecture Overview
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI Agent / Claude Code โ
โ (Kali Linux / Local Machine) โ
โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โ
MCP (stdio)
โ
โโโโโโโโโโผโโโโโโโโโโ
โ FlareVM MCP โ
โ Server โ
โ (Python/FastMCP)โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
WinRM SMB Share IDA RPC
โ โ (localhost)
โ โ โ
โโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ โ
โ FlareVM (Windows VM) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ Malware Analysis Tools: โ โ โ
โ โ - Procmon (process monitoring) โ โ โ
โ โ - DIE (packer detection) โ โ โ
โ โ - FLOSS (string extraction) โ โ โ
โ โ - CAPA (capability analysis) โ โ โ
โ โ - x64dbg (debugger) โ โ โ
โ โ - WinDbg (dump analysis) โ โ โ
โ โ - Frida (dynamic instrumentation)โ โ โ
โ โ - FakeNet-NG (network sim) โ โ โ
โ โ - Autoruns (persistence) โ โ โ
โ โ - Regshot (registry monitoring) โ โ โ
โ โ - IDA Pro (reverse engineering) โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ
โ IDA Pro Server (port 13337)โโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Current Features
File Transfer Operations
upload_file- Upload files from Kali to FlareVM (>8KB uses SMB, <8KB uses WinRM)download_file- Download analysis artifacts back to Kali- Automatic SHA256 checksum verification for integrity
Basic System Tools
check_connection- Verify WinRM connectivity and get system infoexecute_powershell- Run arbitrary PowerShell commandsread_file- Read file contents remotelygetfilehash- Calculate MD5/SHA1/SHA256 hasheslist_processes- Enumerate running processes with optional filtering
Dynamic Analysis
procmon_start- Start Process Monitor with optional process filteringprocmon_stop- Stop Process Monitor captureprocmonexportcsv- Export PML logs to CSV for analysisexecutewithmonitoring- Execute binary with full monitoring (procmon + network)monitornetworkrealtime- Real-time network connection monitoringprocesshackerinfo- Detailed process information via Process Hackerregshot_snapshot- Registry snapshot (before/after/compare analysis)autoruns_analyze- Analyze autostart programs and persistence
Static Analysis
die_analyze- Detect compiler/packer with DetectItEasy (DIEC)flossextractstrings- Extract obfuscated strings with FLOSScapa_analyze- Identify malware capabilities with CAPA framework
Dynamic Instrumentation
fridalistprocesses- List processes available for Frida injectionfridaspawnand_attach- Spawn and attach Frida to processfridaattachpid- Attach to running process by PIDfridarunscript- Execute Frida instrumentation scripts
Debugging & Analysis
x64dbg_load- Launch executable in x64dbg GUIx64dbgrunscript- Create and execute x64dbg scriptswindbganalyzedump- Analyze crash dumps with WinDbg
Network Simulation
fakenet_start- Start FakeNet-NG network simulationfakenet_stop- Stop FakeNet-NG and retrieve logs
IDA Pro Integration (Not built-in in FlareVM)
idagetmetadata- Get metadata about loaded binaryidalistfunctions- List functions with paginationidadecompilefunction- Decompile function to pseudocodeidadisassemblefunction- Get assembly listingidaliststrings- List strings in binaryidasetcomment- Add/modify comments in IDAidarenamefunction- Rename functions
System Requirements
Host Machine (Kali/Analysis)
- Python 3.10+
python3-winrm- Windows Remote Management librarysmbclient- For large file transferspython-keyring- For credential storagefastmcp- MCP server framework
FlareVM (Windows Analysis VM)
- OS: Windows 10/11
- WinRM: Enabled and configured for remote access
- SMB Share: Optional but recommended (named
KaliShare) - Tools Required:
Installation
1. Clone Repository
cd /home/kali
git clone https://github.com/zixuantemp/flarevm-mcp.git
cd flarevm-mcp
2. Install dependencies
# Requires Python > 3.10
pip install -r requirements.txt
sudo apt-get install smbclient
3. Configure Credentials
# Store FlareVM credentials in system keyring
python3 << 'EOF'
import keyring
Configure based on your FlareVM setup
FLAREVM_HOST = "192.168.100.128" # Adjust to your VM IP
FLAREVM_USER = "USER" # Adjust to your username
FLAREVMPASSWORD = "yourpassword" # Your password
Store password securely
keyring.setpassword("flarevm", FLAREVMUSER, FLAREVM_PASSWORD)
print(f"โ Credentials stored for {FLAREVMUSER}@{FLAREVMHOST}")
EOF
4. Update Configuration
Edit server.py to match your environment:
FLAREVM_HOST = "192.168.100.10" # Your FlareVM IP
FLAREVM_USER = "xtemp" # Your Windows username
SMBSHARENAME = "KaliShare" # Your SMB share name
SMBLOCALPATH = "C:\\Share" # SMB mount point on FlareVM
5. Configure MCP Server
For use with Claude Code or other MCP clients, add to your MCP config:
For Claude Code (~/.claude/claude.json):
{ "mcp_servers": { "flarevm": { "command": "python3", "args": ["/home/kali/mcp-flare/server.py"], "env": { "PYTHONUNBUFFERED": "1" } } } } OR claude mcp add flare-mcp python3 /path/to/server.py
For other MCP clients, configure according to their documentation.
6. Verify Installation
# Test connection
python3 << 'EOF'
import asyncio
import json
from pathlib import Path
import sys
sys.path.insert(0, '/home/kali/mcp-flare')
async def test(): # This will attempt to load the server print("โ Server module loads successfully") print("โ All dependencies installed")
asyncio.run(test()) EOF
Configuration Guide
WinRM Setup on FlareVM
- Enable WinRM:
# On FlareVM, run as Administrator:
Enable-PSRemoting -Force
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force
Restart-Service WinRM
- Verify connectivity from Kali:
python3 << 'EOF'
import winrm
session = winrm.Session( "192.168.100.128", auth=("USER", "password"), transport='plaintext' )
result = session.run_ps("Write-Output 'Hello from FlareVM'") print(result.std_out.decode()) EOF
SMB Share Setup (Optional)
For large file transfers (>8KB), configure SMB share on FlareVM:
- Create share:
New-Item -Path "C:\Share" -ItemType Directory -Force
New-SmbShare -Name "KaliShare" -Path "C:\Share" -FullAccess "Everyone"
- Test from Kali:
smbclient //192.168.100.128/KaliShare -U xtemp -c "ls"
IDA Pro Integration
If using IDA Pro tools:
- Install IDA Pro on FlareVM
- Install IDA Pro MCP plugin: https://github.com/mandiant/ida-pro-mcp
- Start IDA Pro with MCP server listening on
localhost:13337 - Verify on FlareVM:
netstat -ano | findstr :13337
Usage Examples
1. Quick Malware Triage
# Using with Claude Code or Python
from mcp_client import MCPClient
client = MCPClient("flarevm")
Upload sample
client.call("upload_file", {
"local_path": "/home/kali/samples/malware.exe",
"remote_path": "C:\\temp\\sample.exe"
})
Get static analysis
dieresult = client.call("dieanalyze", {
"file_path": "C:\\temp\\sample.exe"
})
print(f"Packer: {die_result}")
Extract strings
strings = client.call("flossextractstrings", {
"file_path": "C:\\temp\\sample.exe"
})
Get capabilities
caparesult = client.call("capaanalyze", {
"file_path": "C:\\temp\\sample.exe"
})
2. Behavioral Analysis with Monitoring
# Monitor process execution
result = client.call("executewithmonitoring", {
"executable": "C:\\temp\\sample.exe",
"arguments": "--test",
"duration": 30
})
Download procmon logs
client.call("download_file", {
"remote_path": result["ProcmonLog"],
"localpath": "/home/kali/analysis/procmonlogs.pml"
})
3. API Hooking with Frida
# Hook Windows API during execution
frida_script = """
Interceptor.attach(Module.findExportByName("kernel32.dll", "CreateProcessW"), {
onEnter: function(args) {
console.log("[*] CreateProcess called with: " + args[1].readUtf16String());
}
});
"""
result = client.call("fridarunscript", { "target": "sample.exe", "scriptcontent": fridascript })
4. Interactive Debugging with x64dbg
# Load in debugger
client.call("x64dbg_load", {
"executable": "C:\\temp\\sample.exe"
})
Create breakpoint script
script = """
bp 0x00401000
BreakOnDll(kernel32.dll, false)
bp CreateProcessW
"""
client.call("x64dbgrunscript", { "script_content": script })
5. IDA Pro Analysis
# Decompile function
decomp = client.call("idadecompilefunction", {
"address": "0x00401000"
})
Add comment
client.call("idasetcomment", {
"address": "0x00401000",
"comment": "Entry point - possible C2 setup"
})
Rename function
client.call("idarenamefunction", {
"function_address": "0x00401050",
"newname": "decryptconfig"
})
6. Persistence Analysis
# Check autostart programs
autoruns = client.call("autoruns_analyze")
Take registry snapshots
before = client.call("regshot_snapshot", {
"action": "first",
"output_dir": "C:\\temp\\regshot"
})
Run malware
client.call("executewithmonitoring", {
"executable": "C:\\temp\\sample.exe",
"duration": 30
})
Compare after
after = client.call("regshot_snapshot", {
"action": "second",
"output_dir": "C:\\temp\\regshot"
})
comparison = client.call("regshot_snapshot", { "action": "compare", "output_dir": "C:\\temp\\regshot" })
Suggested Setups
Setup 1: Minimal Analysis Lab
Components:
- Kali Linux VM (4GB RAM, 20GB storage)
- FlareVM Windows 10 (8GB RAM, 50GB storage)
- Network: Isolated lab network (no internet)
- Storage: Shared folder for samples/logs
- Procmon, x64dbg, DIE, FLOSS, CAPA
Estimated Setup Time: 2-3 hours
Setup 2: Advanced Research Lab
Components:
- Kali Linux (dedicated host, 8GB+ RAM)
- Multiple FlareVM snapshots (one per sample type)
- IDA Pro for reverse engineering
- Network: Isolated + FakeNet for network-connected malware
- Storage: 500GB+ for analysis artifacts
- All tools: Procmon, x64dbg, WinDbg, DIE, FLOSS, CAPA, Frida, IDA Pro, FakeNet
- Static analysis (DIE, FLOSS, CAPA)
- Behavioral analysis (Procmon, network monitoring)
- Interactive debugging (x64dbg, Frida)
- Deep reverse engineering (IDA Pro)
Estimated Setup Time: 8-10 hours
Setup 3: Automated Analysis Pipeline
Components:
- Kali Linux (automation host)
- FlareVM (automated analysis)
- Message queue (Redis/RabbitMQ optional)
- Database (SQLite/MongoDB) for results
Sample Upload โ Static Analysis โ Dynamic Analysis โ Report Generation
Best For: Bulk sample analysis, honeypot integration, SOC automation
Estimated Setup Time: 1-2 days
API Reference
Tool Categories
File Transfer
uploadfile(localpath, remote_path)downloadfile(remotepath, local_path)
System Operations
check_connection()execute_powershell(command)read_file(path)getfilehash(path, algorithm)list_processes(filter?)
Dynamic Analysis
procmonstart(outputfile, process_filter?)procmon_stop()procmonexportcsv(pmlfile, csvfile)executewithmonitoring(executable, arguments?, duration?)monitornetworkrealtime(duration?, process_filter?)processhackerinfo(processnameor_pid)regshotsnapshot(action, outputdir)autorunsanalyze(verifysignatures?)
Static Analysis
dieanalyze(filepath)flossextractstrings(filepath, minlength?)capaanalyze(filepath)
Debugging
x64dbgload(executable, scriptfile?)x64dbgrunscript(scriptcontent, savepath?)windbganalyzedump(dump_file, commands?)
Frida Instrumentation
fridalistprocesses()fridaspawnandattach(executable, scriptpath)fridaattachpid(pid, script_path)fridarunscript(target, script_content)
Network Simulation
fakenetstart(configfile?)fakenet_stop()
IDA Pro
idagetmetadata()idalistfunctions(offset, count)idadecompilefunction(address)idadisassemblefunction(start_address)idaliststrings(offset, count)idasetcomment(address, comment)idarenamefunction(functionaddress, newname)
Troubleshooting
Connection Issues
Problem: "could not read Username for ... No such device or address"
Solution: Verify FlareVM IP is reachable ping 192.168.100.10
Problem: "WinRM connection timeout"
Solution: Enable WinRM on FlareVM Run as Administrator on FlareVM: Enable-PSRemoting -Force Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force
Problem: "Keyring password not found"
Solution: Store credentials in keyring python3 -c "import keyring; keyring.set_password('flarevm', 'xtemp', 'password')"
File Transfer Issues
Problem: "SMB connection failed"
Solution: - Verify SMB share exists: net share
- Check network connectivity: ping
- Verify credentials: smbclient -U user
Problem: "File upload verification failed" Solution: Check available disk space on remote machine diskspace C:\temp\
Tool Execution
Problem: "Tool not found" error
Solution: Verify tool path in server.py matches your FlareVM installation Check: C:\Tools\sysinternals\Procmon.exe
Problem: "Permission denied" on file operations
Solution: Ensure running WinRM as user with appropriate permissions Run: whoami on FlareVM
Security Considerations
Isolation
- Always run FlareVM on isolated network (no internet unless needed)
- Use separate credentials for analysis vs. production systems
- Snapshot FlareVM before executing unknown binaries
Credential Management
- Use system keyring (not hardcoded passwords)
- Rotate credentials regularly
- Use least-privilege user account for WinRM
Network Security
- Restrict WinRM to trusted networks only
- Use VPN if connecting over untrusted networks
- Monitor WinRM traffic for anomalies
Malware Safety
- NEVER execute unknown binaries on host machine
- ALWAYS use FlareVM for suspected malware
- Verify VM snapshots before behavioral analysis
- Use FakeNet for network-connected malware
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Add tests for new functionality
- Update documentation
- Submit pull request
License
This project is provided as-is for security research and malware analysis purposes.
References
- FlareVM GitHub
- Model Context Protocol
- WinRM Documentation
- Frida Dynamic Instrumentation
- IDA Pro MCP Plugin
Support
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check existing documentation
- Review tool-specific documentation
Last Updated: 2026-04-17 Version: 1.0.0