rhysha/claude-security-research-skill

GitHub: rhysha/claude-security-research-skill

为Claude Code提供结构化安全研究工作流与工具编排的AI安全助理。

Stars: 21 | Forks: 1

# 🔐 Claude 安全研究技能 ![Claude Code](https://img.shields.io/badge/Claude-Code-orange) ![License](https://img.shields.io/badge/license-MIT-blue) ![Security Research](https://img.shields.io/badge/use-security%20research-green) **面向 Claude 的全谱安全研究技能** — 直接构建在 AI 助手中的结构化、工具驱动安全评估工作流。 将该技能放入 [Claude Code](https://claude.ai/code) 或任意 Claude MCP 配置中,即可获得一个“像安全研究员一样思考”的 AI:结构化阶段、合理的工具链调用、限定范围的侦察以及专业的报告输出 — 而不是随机的命令生成。 Claude 在本技能中的角色是 **解释工具输出、建议下一步操作并记录发现**。工具执行实际的测试。Claude 不生成载荷或利用代码。 ## 效果演示 想在安装前了解输出长什么样吗? **[查看示例评估报告 →](examples/sample-report.md)** 一份虚构但真实的安全评估报告,展示确切的输出格式 Claude 生成的 — 包含从 CRITICAL 到 INFO 的五个发现,附带原始 工具输出、影响分析和修复优先级表格。 ## 功能概述 该技能为 Claude 提供包含 6 个阶段的完整 engagement 工作流: ``` RECON → ENUMERATION → VULN SCANNING → VULNERABILITY VALIDATION → SECRETS AUDIT → REPORTING ``` Claude 会根据目标类型自动路由、加载对应的参考材料、按正确顺序建议工具,并在阶段之间传递输出。 ### 支持的目标 | 目标 | 使用的工具 | |---|---| | Web 服务器(Apache / Nginx / IIS) | nmap、nikto、nuclei、testssl | | REST API | ffuf、sqlmap、dalfox | | Web 应用 | nikto、nuclei、ZAP、ffuf | | 网络 / IP 范围 | nmap、snmpwalk、enum4linux | | 源代码 / 仓库 | trufflehog | | 完整评估 | 按阶段顺序执行全部工具 | ## 快速开始 ### 0. 前置条件 - 已安装并配置好 Claude Code - 你拥有授权测试的目标 - Linux/macOS 环境(Windows 上通过 WSL 也可) ### 1. 安装技能 **Claude Code(推荐):** ``` # 克隆到您的 Claude 技能目录 git clone https://github.com/rhysha/claude-security-research-skill ~/.claude/skills/security-research ``` **手动 / MCP:** 将 `SKILL.md` 和 `references/` 文件夹复制到你的 Claude 技能路径中。 ### 2. 验证工具 ``` chmod +x scripts/tool-check.sh ./scripts/tool-check.sh ``` ### 3. 启动一次评估 ``` chmod +x scripts/init-engagement.sh ./scripts/init-engagement.sh example.com ``` ### 4. 与 Claude 交互 该技能可通过两种方式调用。 **作为斜杠命令(Claude Code CLI):** ``` /security-research ``` 这会显式地将技能加载到 Claude 的上下文中。 **通过自然语言:** Claude 也会在请求匹配其描述时自动加载技能 — 例如请求扫描、漏洞评估、侦察、密钥审计等: ``` "Run a full security assessment on https://target.example.com — I have written authorization." "Do passive recon on domain.com — stay passive only." "Scan this API for OWASP Top 10 issues: https://api.example.com" "Audit this repo for leaked secrets." "Analyze these nmap results and suggest next assessment steps." ``` Claude 将确认范围、提出阶段计划、加载正确的参考材料,并逐步引导你完成评估 — 指出应运行哪个工具进行检查。 ## 技能结构 ``` ├── SKILL.md # Core skill definition (loaded by Claude) ├── references/ │ ├── recon.md # subfinder, amass, httpx, waybackurls │ ├── enumeration.md # nmap, testssl, enum4linux, snmpwalk │ ├── vuln-scanning.md # nikto, nuclei, OWASP ZAP │ ├── vulnscan.md # Supplementary vuln scan patterns │ ├── api-testing.md # ffuf, sqlmap, dalfox, JWT testing │ ├── auth-secrets.md # hydra, trufflehog, credential auditing │ └── reporting.md # Severity ratings, finding templates ├── scripts/ │ ├── tool-check.sh # Verify all required tools are installed │ ├── init-engagement.sh # Create engagement directory structure │ └── setup_engagement.sh # Alternative setup with scope template └── .claude/ └── settings.local.json # Claude MCP configuration ``` ## 工作原理 安装此技能后,Claude 会将 `SKILL.md` 加载到其上下文。以下是前 30 行 — 正是这些内容决定了 Claude 在每次 engagement 中的行为: ``` --- name: security-research user-invokable: true description: > Full-spectrum security research skill for web servers, REST APIs, web applications, and network/port enumeration. Triggers whenever the user wants to: find vulnerabilities, run a security assessment, scan a target, test an API for security issues, enumerate ports or services, check for OWASP Top 10 vulnerabilities, audit auth/secrets, fuzz endpoints, run recon on a domain or IP, or use tools like nmap, nikto, nuclei, ZAP, sqlmap, ffuf, dalfox, subfinder, hydra, or trufflehog. Use this skill even if the user says "just a quick scan" or phrases it casually. Covers full engagement workflow: recon → enumeration → vuln scanning → vulnerability validation → reporting. --- # 安全研究技能 Advanced security research skill for web servers, REST APIs, web applications, and network infrastructure. Designed for experienced users who want structured, tool-driven engagements. --- ## Claude 的角色 Claude's role is to interpret tool output, suggest next steps, and document findings. Tools perform active testing. Claude does not generate payloads or exploit code. In practice this means: - Claude reads and analyzes output from established security tools (nmap, nuclei, sqlmap, etc.) - Claude proposes which tool to run next and explains why - Claude organizes findings into the reporting format ``` 完整文件(包括伦理门控、阶段流程、目标路由表和输出规范)请参见 [SKILL.md](SKILL.md)。 ## 必需工具 如果缺少工具,Claude 会告知哪些阶段被阻塞。请安装所需工具: ``` # 核心 sudo apt install nmap nikto sqlmap hydra # 基于 Go 的工具 go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest go install github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest go install github.com/projectdiscovery/httpx/cmd/httpx@latest go install github.com/ffuf/ffuf/v2@latest go install github.com/hahwul/dalfox/v2@latest # 密钥 pip install trufflehog # 被动侦察 go install github.com/tomnomnom/waybackurls@latest ``` ## 伦理门控 本技能在执行任何操作前强制进行伦理检查: 1. **书面授权** — 你拥有目标或获得明确许可 2. **定义范围** — 指定目标,而非“全部” 3. **私有发现** — 不外泄真实凭证 4. **工具边界** — Claude 不会生成载荷或利用代码。如果某步骤需要此类内容,Claude 会指明应使用的工具并让你直接运行。 Claude 会在不明确时请求确认。这是不可跳过的。 ## 输出格式 每个发现遵循一致的结构: ``` [SEVERITY] Finding Title Target: Tool: Evidence: Impact: Remediation: References: ``` 严重性等级:`CRITICAL > HIGH > MEDIUM > LOW > INFO` ## 适用人群 - **安全研究人员**:希望获得 AI 辅助的 engagement 管理,而非让 AI 猜测命令 - **漏洞赏金猎人**:需要结构化侦察和工具链式工作流 - **安全工程师**:执行内部评估 - **CTF 选手**:完成结构化挑战 **不适用于初学者** — 本技能假设你了解工具用途并拥有合法授权。 ## 贡献 欢迎提交 PR: - 新的参考文件(云安全研究、移动端、厚客户端) - 额外的工具集成 - 改进的报告模板 - 平台特定的工具安装指南 ## 许可证 MIT — 请自由、负责任地使用,仅针对你被授权测试的目标。 ## 免责声明 本工具仅供授权安全测试使用。作者不对滥用负责。在测试任何你不拥有的系统前,请务必获得书面许可。
标签:AI安全研究助理, Claude Code, Maven, MCP技能, 专业报告, 云安全监控, 侦察枚举, 反取证, 威胁建模, 安全研究员, 安全评估, 密钥审计, 工作流自动化, 工具编排, 漏洞验证, 结构化评估, 网络安全, 赏金猎人, 隐私保护, 静态分析