MCP-Kali-Server
by Wh0am123
Overview
Enabling AI-driven offensive security testing by bridging AI agents to a Kali Linux terminal for command execution.
Installation
python3 mcp_server.py --server http://127.0.0.1:5000Security Notes
The backend component, `kali_server.py`, which the `mcp_server.py` (the 'MCP Server' client) connects to, uses `subprocess.Popen(command, shell=True)` with user-supplied input from API requests (e.g., target, URL, additional_args) without sufficient sanitization. This creates severe command injection vulnerabilities across all tool-specific endpoints (nmap, gobuster, dirb, nikto, sqlmap, hydra, john, wpscan, enum4linux) and especially the generic `/api/command` endpoint. An attacker or an unconstrained AI could execute arbitrary commands on the host Kali machine, potentially leading to system compromise. Running `kali_server.py` with `--ip 0.0.0.0` (as explicitly warned in the README) would expose these critical vulnerabilities over the network. There are no mechanisms for input validation beyond checking for parameter presence.
Similar Servers
burp-mcp-agents
Connects Burp Suite MCP Server to AI backends (Codex, Gemini, Ollama, LM Studio) for assisted, non-destructive vulnerability analysis using real Burp traffic.
pentestMCP
This MCP server enables AI agents to perform automated and interactive penetration testing tasks by exposing a suite of security assessment utilities as callable tools.
mcp-pentest
An AI-driven middleware to orchestrate and manage penetration testing tools and engagements.
VulneraMCP
An AI-powered platform for automated security testing, vulnerability research, and bug bounty hunting.