跳到正文
Skillpedia
连接器(MCP)6.5k · #14016

kali-mcp-bridge

它能做什么

这项技能说明如何设置和使用一座桥接器,让 AI 智能体以可控的方式运行 Kali Linux 测试工具。适合只在获得授权的系统上工作的安全测试人员。

适用场景

  • ✓当一项授权测试需要 AI 智能体通过结构化接口运行 Kali 工具时。
  • ✓当你需要在测试人员的机器与 Kali 服务器之间建立安全隧道时。
  • ✓当 Kali 的工具输出将展示给 AI,且你需要安全处理规则时。

技能链接

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/decepticon/kali-mcp-bridge/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/decepticon/kali-mcp-bridge/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我把我们的 AI 助手通过安全隧道连接到一台 Kali 服务器,用于一次授权测试?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体在 Kali 机器上设置服务器,通过加密隧道连接,并通过标准接口传递工具调用,返回结构化结果。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Kali MCP Bridge — Operator Playbook

Drive Kali Linux tools (nmap, gobuster, sqlmap, metasploit, hydra, john, nikto, enum4linux, raw commands) through a FastMCP bridge during authorized engagements. This skill covers server deployment, SSH tunnel hardening, tool-call interface, and the critical prompt-injection hygiene rules required when Kali output re-enters the AI context.

AUTHORIZED USE ONLY. This skill is for use exclusively on systems you own or have explicit written authorization to test. Unauthorized use is illegal.


1. Architecture

┌──────────────┐    MCP stdio    ┌─────────────────┐    HTTP/REST    ┌──────────────────┐
│ Decepticon   │ ◄────────────► │ client.py (MCP) │ ◄────────────► │ server.py (Kali) │
│ (AI agent)   │                 │ on attacker host│                 │ Flask API :5000  │
└──────────────┘                 └─────────────────┘                 └──────────────────┘
  • server.py: Flask API on Kali, wraps each tool, exposes /api/tools/<tool> and /api/command.
  • client.py: FastMCP server that registers tools and relays calls to server.py via HTTP.
  • AI agent: Calls MCP tools; receives structured JSON output.

2. Deployment

2a. Kali server (on engagement jump box / VM)

# OS package (Kali 2024.1+)
sudo apt install mcp-kali-server
kali-server-mcp --ip 127.0.0.1 --port 5000   # localhost only — NEVER bind 0.0.0.0

# OR bleeding edge
git clone https://github.com/Wh0am123/MCP-Kali-Server.git
cd MCP-Kali-Server
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
./server.py --ip 127.0.0.1 --port 5000 --debug

Verify health:

curl -s http://127.0.0.1:5000/health | python3 -m json.tool
# Expected: {"status": "healthy", "all_essential_tools_available": true, "tools_status": {...}}

2b. SSH tunnel (when client and server are on different machines)

Always route through SSH — never expose server.py directly on a routable interface.

# On attacker/orchestrator host — forward local :5000 to Kali :5000
ssh -N -L 5000:localhost:5000 <user>@<KALI_IP>

# Keep tunnel alive for long engagements
ssh -N -o ServerAliveInterval=60 -o ServerAliveCountMax=3 \
    -L 5000:localhost:5000 <user>@<KALI_IP>

2c. MCP client registration (Claude Desktop / Decepticon)

claude_desktop_config.json or equivalent:

{
  "mcpServers": {
    "kali": {
      "command": "python3",
      "args": ["/abs/path/to/client.py", "--server", "http://127.0.0.1:5000"],
      "timeout": 300
    }
  }
}

3. Tool Call Reference

All tools return {"success": bool, "output": str, ...}. Check success before using output.

3.1 nmap_scan

target: str           # IP, hostname, CIDR
scan_type: str        # "-sV" (default), "-sS", "-sU", "-sC", "-A"
ports: str            # "22,80,443" or "1-1024" (empty = default)
additional_args: str  # "-T2 -oX /tmp/scan.xml"

3.2 gobuster_scan

url: str              # "http://target.local"
mode: str             # "dir" (default), "dns", "vhost", "fuzz"
wordlist: str         # "/usr/share/wordlists/dirb/common.txt"
additional_args: str  # "-x php,html -o /tmp/gobuster.txt"

3.3 dirb_scan

url: str
wordlist: str
additional_args: str  # "-r -z 100"    (-z = ms delay between requests)

3.4 nikto_scan

target: str           # URL or IP
additional_args: str  # "-Tuning 1234" (1=files, 2=misconfigs, 3=info, 4=inject)

3.5 sqlmap_scan

url: str              # "http://target/page?id=1"
data: str             # POST body: "user=foo&pass=bar" (empty for GET)
additional_args: str  # "--level=3 --risk=2 --batch --dbs"

3.6 metasploit_run

module: str           # "auxiliary/scanner/portscan/tcp"
options: dict         # {"RHOSTS": "10.0.0.1", "PORTS": "22,80"}

Common module patterns:

# SMB version detection
module: "auxiliary/scanner/smb/smb_version"
options: {"RHOSTS": "<target>", "THREADS": "4"}

# EternalBlue check (scan only — do NOT exploit without explicit RoE auth)
module: "auxiliary/scanner/smb/smb_ms17_010"
options: {"RHOSTS": "<target>"}

3.7 hydra_attack

target: str           # IP or hostname
service: str          # "ssh", "ftp", "http-post-form", "smb"
username: str         # single user (mutually exclusive with username_file)
username_file: str    # path to userlist
password: str         # single pass
password_file: str    # "/usr/share/wordlists/rockyou.txt"
additional_args: str  # "-t 4 -V" (
常见问题

可以用于任何系统吗?

不可以。该技能只适用于你拥有或获得书面授权测试的系统。

隧道设置为什么重要?

该技能强调应将 Kali 服务器绑定到本地回环地址,且只能通过受保护的隧道访问。

什么是提示注入防护?

这是处理工具输出的规则,确保扫描结果中的文字不能操纵 AI。

详情

作者的原始描述

Deploy and drive Kali Linux tools via MCP-Kali-Server — structured tool-call interface, SSH tunnel setup, prompt-injection hygiene for AI-assisted engagements.

repo: BitterSecurity/Decepticon

热度

GitHub 星标
6.5k
排名
#14016
许可证
Apache-2.0
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能