Kali MCP Server

Kali MCP Server

Provides access to 20+ Kali Linux penetration testing tools including nmap, sqlmap, nikto, and hydra for authorized security testing and vulnerability assessment through a Docker-based MCP interface.

Category
访问服务器

README

🔐 Kali MCP Server

Model Context Protocol (MCP) server with comprehensive Kali Linux penetration testing tools.

License: MIT Docker Kali Linux

⚠️ LEGAL DISCLAIMER

THIS TOOL IS FOR EDUCATIONAL PURPOSES ONLY!

✓ Only use on systems you own or have explicit written permission to test
✓ Comply with all applicable laws and regulations
✓ Understand that unauthorized access to computer systems is illegal
✓ Take full responsibility for your actions

Unauthorized access to computer systems is a crime. Use at your own risk!


🚀 Features

This MCP server provides access to 20+ professional penetration testing tools:

🌐 Network Scanning

  • nmap - Network mapper and port scanner
  • masscan - Ultra-fast port scanner

🕷️ Web Vulnerability Scanners

  • nikto - Web server vulnerability scanner
  • wpscan - WordPress security scanner
  • whatweb - Web technology identifier
  • wafw00f - Web Application Firewall detector

📂 Directory/File Enumeration

  • dirb - Directory brute forcer
  • gobuster - Fast directory/DNS/vhost brute forcer

💉 Exploitation Tools

  • sqlmap - SQL injection detection and exploitation
  • searchsploit - Exploit database search

🔍 DNS Enumeration

  • dnsrecon - DNS enumeration and scanning
  • dnsenum - DNS enumeration tool

🔒 SSL/TLS Testing

  • sslscan - SSL/TLS configuration tester

🔓 Password Cracking

  • hydra - Network login brute forcer
  • john - John the Ripper password cracker
  • hashcat - Advanced password recovery

🦠 Windows/SMB Enumeration

  • enum4linux - Windows and Samba enumeration

📡 Additional Tools

  • Metasploit Framework
  • Burp Suite
  • Aircrack-ng suite
  • And many more!

📦 Installation

Prerequisites

  • Docker and Docker Compose installed
  • At least 4GB of free disk space
  • Linux/macOS or Windows with WSL2

Quick Start

  1. Clone the repository:
git clone https://github.com/JesseEikeland/kali-mcp.git
cd kali-mcp
  1. Build the Docker container:
docker-compose build

⏰ This will take 10-15 minutes as it downloads and installs all tools.

  1. Start the server:
docker-compose up -d
  1. Access the container:
docker-compose exec kali-mcp bash
  1. Run the MCP server:
python3 server.py

🛠️ Usage

Available MCP Tools

🌐 Network Scanning

# Basic nmap scan
nmap_scan(target="192.168.1.1", scan_type="basic")

# Full port scan
nmap_scan(target="example.com", scan_type="full")

# Vulnerability scan
nmap_scan(target="192.168.1.1", scan_type="vuln")

# Fast masscan
masscan_scan(target="192.168.1.0/24", ports="1-1000", rate=1000)

🕷️ Web Scanning

# Nikto web scan
nikto_scan(target="http://example.com", ssl=False)

# WordPress scan
wpscan_scan(target="http://example.com", enumerate="vp,vt,u")

# Identify web technologies
whatweb_scan(target="http://example.com", aggression=1)

# Detect WAF
wafw00f_detect(target="http://example.com")

📂 Directory Brute Force

# Dirb scan
dirb_scan(target="http://example.com")

# Gobuster directory scan
gobuster_scan(target="http://example.com", mode="dir")

# Gobuster DNS enumeration
gobuster_scan(target="example.com", mode="dns")

💉 SQL Injection Testing

# Basic SQLMap scan
sqlmap_scan(target="http://example.com/page?id=1")

# With POST data
sqlmap_scan(target="http://example.com/login", data="username=admin&password=test")

# With cookies
sqlmap_scan(target="http://example.com/page", cookie="PHPSESSID=abc123")

🔍 Exploit Search

# Search for exploits
searchsploit_search(query="wordpress")

# Exact match search
searchsploit_search(query="Apache 2.4.49", exact=True)

🌐 DNS Enumeration

# DNS reconnaissance
dnsrecon_scan(domain="example.com", scan_type="std")

# DNS enumeration
dnsenum_scan(domain="example.com")

🔒 SSL/TLS Testing

# Test SSL configuration
sslscan_test(target="example.com:443")

🔓 Password Cracking

# Brute force SSH
hydra_bruteforce(
    target="192.168.1.1",
    service="ssh",
    username="admin",
    wordlist="/usr/share/wordlists/rockyou.txt"
)

🦠 SMB/Windows Enumeration

# Enumerate Windows/Samba
enum4linux_scan(target="192.168.1.1")

🔧 Utility Functions

# List available wordlists
list_wordlists()

# Get legal disclaimer
get_disclaimer()

🏗️ Architecture

kali-mcp/
├── Dockerfile              # Kali Linux container with all tools
├── docker-compose.yml      # Container orchestration
├── server.py               # FastMCP server with tool wrappers
├── requirements.txt        # Python dependencies
├── README.md              # This file
├── SETUP.md               # Quick setup guide
├── LICENSE                # MIT License
├── .gitignore             # Git ignore rules
├── scans/                 # Scan results (created on first run)
└── wordlists/             # Custom wordlists (optional)

How It Works

  1. Docker Container: Runs Kali Linux with all penetration testing tools installed
  2. MCP Server: Python FastMCP server wraps each tool with safe input sanitization
  3. Non-Root User: Runs as pentester user with minimal required capabilities
  4. Input Sanitization: All inputs are sanitized to prevent command injection
  5. Timeouts: Commands have configurable timeouts to prevent hanging

🔒 Security Features

  • ✓ Runs as non-root user (pentester)
  • ✓ Input sanitization on all parameters
  • ✓ Command injection prevention
  • ✓ Timeout limits on all operations
  • ✓ No new privileges security option
  • ✓ Resource limits (CPU/Memory)
  • ✓ Minimal required capabilities (NET_RAW, NET_ADMIN)

🎓 Learning Resources

Recommended Platforms

Books

  • "The Web Application Hacker's Handbook" by Dafydd Stuttard
  • "Penetration Testing" by Georgia Weidman
  • "The Hacker Playbook 3" by Peter Kim

YouTube Channels

  • NetworkChuck
  • IppSec
  • John Hammond
  • The Cyber Mentor

🐛 Troubleshooting

Container won't start

# Check logs
docker-compose logs kali-mcp

# Rebuild container
docker-compose down
docker-compose build --no-cache
docker-compose up -d

Permission errors

# Fix scan directory permissions
sudo chown -R $USER:$USER ./scans

Tools not found

# Update package lists
docker-compose exec kali-mcp apt-get update

# Install missing tool
docker-compose exec kali-mcp apt-get install -y <tool-name>

📝 Configuration

Environment Variables

Edit docker-compose.yml to customize:

environment:
  - MAX_TIMEOUT=300        # Maximum command timeout (seconds)
  - SCAN_RESULTS_DIR=/home/pentester/scans

Custom Wordlists

Place your wordlists in the ./wordlists directory:

mkdir -p wordlists
cp /path/to/custom.txt wordlists/

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

📄 License

MIT License - See LICENSE file for details

Important: This license applies to the code only. You are solely responsible for how you use this software.


⚖️ Legal Notice

READ THIS CAREFULLY:

This tool is provided for educational and authorized testing purposes only.

By using this software, you agree that:

  1. You will only use it on systems you own or have explicit written authorization to test
  2. You understand that unauthorized computer access is illegal
  3. You take full responsibility for your actions
  4. The authors and contributors are not liable for any misuse or damage

Always get written permission before testing!


🙏 Acknowledgments

  • Kali Linux Team - For the amazing pentesting distribution
  • FastMCP - For the MCP server framework
  • Tool Authors - For creating these incredible security tools
  • NetworkChuck - For inspiring this project

📞 Support


🗺️ Roadmap

  • [ ] Add Metasploit integration
  • [ ] Web UI for easier interaction
  • [ ] Report generation (PDF/HTML)
  • [ ] Automated vulnerability chains
  • [ ] Integration with CVE databases
  • [ ] Custom scan profiles
  • [ ] Scheduled scanning
  • [ ] Multi-target support

Remember: With great power comes great responsibility. Use wisely! 🦸


Made with ❤️ for the security community

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选