Back to Home
MrQauckQauck icon

Kali-MCP-Server-Walkthrough

by MrQauckQauck

Overview

A walkthrough for setting up a client-server architecture using Kali Linux and 5ire to control Kali server tools (like Nmap) via an LLM.

Installation

Run Command
cd MCP-Kali-Server/kali-server && python3 kali_server.py

Security Notes

The system is critically vulnerable to Remote Code Execution (RCE) on both the Kali VM and the client machine. The 'kali_server.py' uses 'subprocess.run(command, shell=True)' to execute commands received from the client, with no apparent input sanitization or command whitelisting. This allows an LLM to execute arbitrary system commands on the Kali machine. Furthermore, 'mcp_server.py' on the client side contains 'eval(tool_code)', which can execute arbitrary Python code if 'tool_code' originates from an untrusted source, such as an LLM's output. The design inherently trusts all LLM outputs for command execution, making it extremely dangerous and prone to compromise.

Similar Servers

Stats

Interest Score0
Security Score1
Cost ClassLow
Avg Tokens50
Stars0
Forks0
Last Update2026-01-19

Tags

Kali LinuxLLM IntegrationSecurity TestingAgentic AINmap