Back to Home
Wh0am123 icon

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

Run Command
python3 mcp_server.py --server http://127.0.0.1:5000

Security 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

Stats

Interest Score86
Security Score1
Cost ClassMedium
Avg Tokens500
Stars452
Forks95
Last Update2026-01-19

Tags

AIpenetration testingoffensive securityCTFKali Linux