Kali Linux Docker+克劳德技能
Claude代码的令牌高效渗透测试系统
🎯 概述
该项目提供了一个全面的Kali Linux Docker容器,其中包含200多个渗透测试工具,通过自定义技能针对Claude Code进行了优化。通过使用直接命令执行而不是MCP协议,该系统实现了 70%代币效率 与传统的MCP服务器方法相比。
🏗️ 建筑
┌─────────────────────────────────────────────────────────┐
│ Claude Code │
│ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ kali-docker-pentesting skill │ │
│ │ (Tool catalog + usage patterns) │ │
│ └──────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ bash_tool │ │
│ │ (Direct docker exec commands) │ │
│ └──────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Kali Linux Docker Container │
│ │
│ • 200+ pentesting tools │
│ • No MCP server overhead │
│ • Direct command execution │
│ • Persistent storage via volumes │
└─────────────────────────────────────────────────────────┘📦 包含什么
Docker容器
- 基地: Kali Linux滚动
- 工具: 200+渗透测试工具
- 网络扫描仪(nmap、masscan、zmap) - Web应用程序测试(nikto、sqlmap、burp套件) - 密码破解(john、hashcat、hydra) - 无线工具(aircrack-ng、wifite、reaver) - 取证(波动性、binwalk,最重要) - 开发(metasploit、SET、牛肉) - 还有更多!
克劳德技能
- 完整的工具目录
- 每个工具的使用示例
- 常见渗透测试工作流程
- 故障排除指南
- 最佳实践
支持文件
Dockerfile-kali-simple-简化容器(无MCP)docker-compose-kali.yml-轻松的集装箱管理SKILL.md-克劳德技能文档QUICK-START.md-快速入门指南
🚀 快速开始
1.构建容器
# Clone or create project directory
mkdir kali-docker-pentest && cd kali-docker-pentest
# Copy files
# - Dockerfile-kali-simple (rename to Dockerfile)
# - docker-compose-kali.yml (rename to docker-compose.yml)
# Build
docker-compose build2.安装技能
# Copy skill to Claude skills directory
mkdir -p /mnt/skills/user/kali-docker-pentesting/
cp SKILL.md /mnt/skills/user/kali-docker-pentesting/3.启动容器
docker-compose up -d4.测试
docker exec kali-pentest nmap --version💡 用法示例
使用克劳德代码
自然地问克劳德:
You: "Scan 192.168.1.1 with nmap"
Claude: [Executes] docker exec kali-pentest nmap -sV 192.168.1.1
You: "Test http://testsite.local for SQL injection"
Claude: [Executes] docker exec kali-pentest sqlmap -u "http://testsite.local" --batch
You: "Crack these password hashes using rockyou"
Claude: [Executes workflow with john/hashcat]直接命令行
# Network scanning
docker exec kali-pentest nmap -sV 192.168.1.0/24
# Web testing
docker exec kali-pentest nikto -h http://target.com
# Password cracking
docker exec kali-pentest john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
# Interactive shell
docker exec -it kali-pentest /bin/bash📊 代币效率
传统的MCP服务器方法
- 加载MCP服务器:约500个令牌
- JSON-RPC协议:约300个令牌
- 工具发现:约200个令牌
- 响应格式:约200个令牌
- 总计:每次交互约1200个令牌
这种方法(技能+直接执行)
- 阅读技能:约100个代币
- 直接命令:~50个令牌
- 原始输出:约200个代币
- 总计:每次交互约350个令牌
结果:70%的代币节省! 🎉
📁 项目结构
kali-docker-pentest/
├── Dockerfile # Container definition
├── docker-compose.yml # Container orchestration
├── SKILL.md # Claude skill
├── QUICK-START.md # Quick start guide
├── README.md # This file
├── workspace/ # Working files
├── results/ # Scan outputs
├── wordlists/ # Custom wordlists
└── tools/ # Additional tools⚠️ 法律声明
重要: 此工具集仅用于授权的安全测试。
- 始终获得书面许可
- 仅测试您拥有或有权测试的系统
- 遵循负责任的披露做法
- 遵守当地法律法规
- 在道德和法律上使用
未经授权访问计算机系统是非法的。作者对滥用此软件不承担任何责任。
📚 文档
______________________________________________________________________
快乐(道德)的黑客行为! 🛡️
