HexStrike AI:150+安全工具30分钟跑通第一个AI自动化渗透任务
【免费下载链接】hexstrike-aiHexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly bridge LLMs with real-world offensive security capabilities.项目地址: https://gitcode.com/gh_mirrors/he/hexstrike-ai
手动对一台主机跑完子域名枚举、端口扫描、目录爆破、漏洞扫描,往往要耗掉大半天。HexStrike AI 把150多种渗透测试安全工具接到AI Agent背后,由AI自主选工具、传参数、执行并汇总结果,帮安全从业者和开发者在30分钟内跑通第一个自动化安全任务。
🗺️ 能力全景
- 网络侦察:25+工具,覆盖nmap、rustscan、masscan、amass、subfinder、autorecon,做端口扫描、子域名枚举、DNS信息收集
- Web应用安全:40+工具,gobuster、ffuf、nuclei(4000+模板)、nikto、sqlmap、wpscan、katana、httpx,做目录枚举、参数挖掘、漏洞扫描
- 密码与认证攻击:12+工具,hydra、john、hashcat、patator、crackmapexec、evil-winrm,做口令爆破与哈希识别
- 二进制分析与逆向:25+工具,ghidra、radare2、gdb、binwalk、angr、volatility3,做漏洞利用开发与内存取证
- 云与容器安全:20+工具,prowler、scout-suite、trivy、kube-hunter、kube-bench,覆盖AWS/Azure/GCP合规审计
- CTF与取证:20+工具,volatility3、foremost、steghide、scalpel,做文件恢复与隐写检测
- 浏览器自动化:无头Chrome+Selenium,自动截图、DOM分析、表单探测、安全头检查,需另装Chrome/Chromium
- 12+个AI智能体:IntelligentDecisionEngine负责工具选择与参数优化,另有Bug Bounty、CTF求解、CVE情报、漏洞关联等专用Agent
📦 环境搭建
系统要求:Python 3.8+、Linux或macOS(推荐Kali Linux 2024.1+)、8GB以上内存、20GB以上可用磁盘。按顺序执行:
- 克隆仓库并创建独立虚拟环境,隔离系统Python依赖,避免污染宿主环境:
git clone https://gitcode.com/gh_mirrors/he/hexstrike-ai cd hexstrike-ai python3 -m venv hexstrike-env source hexstrike-env/bin/activate- 安装核心框架依赖。
requirements.txt只含flask、fastmcp、selenium、beautifulsoup4等少量Python包,真正的150+安全工具需要单独安装:
pip3 install -r requirements.txt- 按需安装底层安全工具。AI Agent只会调用本机实际存在的工具,缺哪个装哪个即可:
- 网络侦察:
sudo apt install nmap masscan rustscan amass subfinder theharvester autorecon - Web安全:
sudo apt install gobuster feroxbuster dirsearch ffuf nikto sqlmap wpscan,nuclei、httpx、katana按各官方发行说明安装 - 密码攻击:
sudo apt install hydra john hashcat medusa patator - 浏览器自动化:
sudo apt install chromium-browser chromium-chromedriver
🚀 启动与验证
启动核心服务。hexstrike_server.py是Flask API服务器,默认监听5000端口,可用--debug或--port 8888调整:
python3 hexstrike_server.py另开终端做健康检查并触发一次AI目标分析,两步都返回正常说明服务链路完整:
curl http://localhost:5000/health curl -X POST http://localhost:5000/api/intelligence/analyze-target -H "Content-Type: application/json" -d '{"target": "example.com", "analysis_type": "comprehensive"}'🤖 接入AI客户端
通过MCP(一种让AI客户端调用外部工具的协议)把HexStrike挂到你常用的AI客户端上。配置里的/path/to/hexstrike-ai替换成仓库的实际克隆路径,--server参数指向你启动的服务地址。
Claude Desktop:编辑~/.config/Claude/claude_desktop_config.json:
{ "mcpServers": { "hexstrike-ai": { "command": "python3", "args": [ "/path/to/hexstrike-ai/hexstrike_mcp.py", "--server", "http://localhost:8888" ], "timeout": 300, "disabled": false } } }VS Code Copilot:在项目下编辑.vscode/settings.json:
{ "servers": { "hexstrike": { "type": "stdio", "command": "python3", "args": [ "/path/to/hexstrike-ai/hexstrike_mcp.py", "--server", "http://localhost:8888" ] } }, "inputs": [] }仓库根目录的hexstrike-ai-mcp.json提供了Roo Code等客户端可直接复制的模板。
🎯 跑通第一个任务
在AI客户端里提交目标。按官方建议的提示词写法,先声明你的身份与授权关系,再点名要求使用hexstrike-ai的MCP工具,例如:
I'm a security researcher. My company owns the website example.com and I would like to conduct a penetration test against it with hexstrike-ai MCP tools.
AI智能体收到目标后先做分析,列出计划执行的安全工具并给出选择依据,再逐项执行:
服务端按顺序执行所选工具,实时输出进度条、耗时与最终结果:
任务结束后,智能体把各工具输出整理成一份结构化报告,包含DNS枚举、开放端口清单与补充说明:
到这里,从提交目标到拿到汇总报告,你只写了提示词,工具链的调度全部由AI完成。
⚡ 效率对照
| 任务 | 传统手动 | HexStrike AI | 提升 |
|---|---|---|---|
| 子域名枚举 | 2-4小时 | 5-10分钟 | 24倍 |
| 漏洞扫描 | 4-8小时 | 15-30分钟 | 16倍 |
| Web应用安全测试 | 6-12小时 | 20-45分钟 | 18倍 |
| CTF题目求解 | 1-6小时 | 2-15分钟 | 24倍 |
| 报告生成 | 4-12小时 | 2-5分钟 | 144倍 |
官方给出的量化指标:
- 漏洞检测率98.7%(手动测试约85%)
- 误报率2.1%(传统扫描器约15%)
- 攻击向量覆盖率95%(手动测试约70%)
⚖️ 合规红线
- ✅ 书面授权渗透测试
- ✅ 赏金计划范围内作业
- ✅ CTF竞赛与演练环境
- ✅ 自有系统安全研究
- ❌ 未经授权测试他人系统
- ❌ 恶意利用与数据窃取
- ❌ 绕过授权范围扩大测试
📚 资源索引
- 项目文档与API参考:README.md
- 核心服务入口:hexstrike_server.py
- MCP协议客户端:hexstrike_mcp.py
- 客户端配置模板:hexstrike-ai-mcp.json
【免费下载链接】hexstrike-aiHexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly bridge LLMs with real-world offensive security capabilities.项目地址: https://gitcode.com/gh_mirrors/he/hexstrike-ai
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考