Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
OWASP-WSTG-Rag — OWASP Web Security Testing Guide RAG系统,带有ChromaDB和用于Claude Code的MCP | Kitploit
工具/GitHubGitHub/zilbonn/owasp-wstg-rag
漏洞分析API安全测试信息收集Web安全密码学渗透测试身份验证学习与教育精选资源学习路径与课程AI 安全
GitHub
22399个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
zilbonn/owasp-wstg-rag

OWASP-WSTG-Rag

OWASP Web Security Testing Guide RAG系统,带有ChromaDB和用于Claude Code的MCP

查看仓库
分享

OWASP WSTG RAG

一种检索增强生成(RAG)系统,它将OWASP Web安全测试指南(WSTG) 索引到向量数据库中,通过REST API和MCP(模型上下文协议)提供即时访问,并支持Claude Code集成。

特性

  • 完整的WSTG覆盖 - 所有12个WSTG测试类别均已索引并支持搜索
  • 语义搜索 - 使用自然语言查询查找相关测试方法
  • MCP集成 - 直接集成Claude Code,实现AI辅助渗透测试
  • REST API - 提供HTTP端点用于程序化访问
  • WSTG ID查询 - 通过WSTG标识符(例如 WSTG-INPV-05)检索完整测试用例

WSTG类别

类别WSTG ID描述
信息收集WSTG-INFO指纹识别、枚举、映射
配置WSTG-CONF服务器/平台配置测试
身份管理WSTG-IDNT用户注册、账户配置
认证WSTG-ATHN登录、密码策略、多因素认证测试
授权WSTG-ATHZ权限提升、IDOR、访问控制
会话管理WSTG-SESS会话令牌、Cookie、会话固定测试
输入验证WSTG-INPVSQL注入、XSS、命令注入、SSTI
错误处理WSTG-ERRH错误消息、堆栈跟踪
密码学WSTG-CRYPTLS、加密、哈希
业务逻辑WSTG-BUSL工作流绕过、文件上传
客户端WSTG-CLNTDOM XSS、点击劫持、WebSocket
API测试WSTG-APITREST、GraphQL、API安全

快速开始

1. 安装依赖

root@kitploit:~
cd RAG_runner
pip install -r requirements.txt

2. 构建数据库

root@kitploit:~
python3 build_database.py

此操作将:

  • 解析所有OWASP WSTG HTML文件
  • 为检索创建语义块
  • 构建ChromaDB向量数据库

3. 启动服务器

root@kitploit:~
python3 -m server.http_server

服务器运行在 http://localhost:5004

4. 测试API

root@kitploit:~
# 健康检查
curl http://localhost:5004/health

# 搜索SQL注入测试
curl -X POST http://localhost:5004/search \
  -H "Content-Type: application/json" \
  -d '{"query": "SQL injection testing methodology"}'

# 获取特定WSTG测试用例
curl http://localhost:5004/wstg/WSTG-INPV-05

REST API端点

端点方法描述
/healthGET健康检查
/infoGET数据库统计
/listGET列出所有文档
/categoriesGET列出类别及WSTG ID
/doc/{id}GET按ID获取文档
/wstg/{id}GET获取WSTG ID的所有块
/searchPOST语义搜索

搜索请求体

root@kitploit:~
{
  "query": "SQL injection testing",
  "n_results": 5,
  "category": "input_validation",
  "wstg_id": "WSTG-INPV-05"
}

Claude Code集成(MCP)

添加到 ~/.claude.json:

root@kitploit:~
{
  "mcpServers": {
    "owasp-wstg-rag": {
      "command": "python3",
      "args": ["/path/to/OWASP_WSTG_Rag/RAG_runner/server/mcp_client.py"],
      "env": {
        "WSTG_RAG_URL": "http://localhost:5004"
      }
    }
  }
}

MCP工具

工具描述
search_wstg搜索WSTG获取测试方法
search_test_methodology搜索如何测试的指南
search_test_objectives搜索测试目标
get_wstg_test_case按WSTG ID获取完整测试用例
get_wstg_document按ID获取文档
list_wstg_categories列出所有类别及WSTG ID
wstg_health健康检查
wstg_info数据库统计

在Claude Code中的示例用法

root@kitploit:~
# 搜索SQL注入测试方法
search_wstg("SQL injection testing methodology")

# 获取特定测试用例
get_wstg_test_case("WSTG-INPV-05")

# 按类别搜索
search_wstg("authentication bypass", category_filter="authentication")

# 获取IDOR的测试目标
search_test_objectives("IDOR insecure direct object reference")

项目结构

root@kitploit:~
OWASP_WSTG_Rag/
├── README.md
├── CLAUDE.md                    # Claude Code项目指南
├── raw_data/                    # OWASP WSTG HTML源文件
│   ├── 01-Information_Gathering/
│   ├── 02-Configuration_and_Deployment_Management_Testing/
│   ├── 03-Identity_Management_Testing/
│   ├── 04-Authentication_Testing/
│   ├── 05-Authorization_Testing/
│   ├── 06-Session_Management_Testing/
│   ├── 07-Input_Validation_Testing/
│   ├── 08-Testing_for_Error_Handling/
│   ├── 09-Testing_for_Weak_Cryptography/
│   ├── 10-Business_Logic_Testing/
│   ├── 11-Client-side_Testing/
│   └── 12-API_Testing/
└── RAG_runner/
    ├── build_database.py        # 主构建流水线
    ├── requirements.txt
    ├── parsers/
    │   └── wstg_parser.py       # WSTG的HTML解析器
    ├── chunking/
    │   └── chunker.py           # 语义分块
    ├── server/
    │   ├── vector_store.py      # ChromaDB封装器
    │   ├── http_server.py       # REST API服务器
    │   └── mcp_client.py        # 用于Claude Code的MCP工具
    └── data/
        ├── processed/           # 中间JSON文件
        └── chroma_db/           # 向量数据库

架构

root@kitploit:~
┌─────────────────────────────────────────────────────────────────┐
│                    OWASP WSTG HTML Files                        │
│                      (raw_data/*.html)                          │
└────────────────────────────┬────────────────────────────────────┘
                             │
                             ▼
┌─────────────────────────────────────────────────────────────────┐
│                     wstg_parser.py                              │
│              Parse HTML → Structured JSON                       │
└────────────────────────────┬────────────────────────────────────┘
                             │
                             ▼
┌─────────────────────────────────────────────────────────────────┐
│                       chunker.py                                │
│              Create Semantic Chunks for RAG                     │
└────────────────────────────┬────────────────────────────────────┘
                             │
                             ▼
┌─────────────────────────────────────────────────────────────────┐
│                   ChromaDB Vector Store                         │
│                 (data/chroma_db/)                               │
└────────────────────────────┬────────────────────────────────────┘
                             │
              ┌──────────────┴──────────────┐
              ▼                             ▼
┌──────────────────────────┐   ┌──────────────────────────┐
│    http_server.py        │   │    mcp_client.py         │
│    REST API :5004        │   │    MCP for Claude Code   │
│                          │   │                          │
│  GET  /health            │   │  search_wstg()           │
│  GET  /info              │   │  get_wstg_test_case()    │
│  GET  /wstg/{id}         │   │  search_test_methodology │
│  POST /search            │   │  list_wstg_categories()  │
└──────────────────────────┘   └──────────────────────────┘

用例

AI辅助渗透测试

集成Claude Code,在安全评估期间即时获取OWASP测试方法:

root@kitploit:~
用户: "如何测试SQL注入?"

Claude: [查询WSTG RAG]
→ 返回WSTG-INPV-05方法,包含:
  - 测试目标
  - 分步测试流程
  - 示例载荷
  - 推荐工具

自动化安全测试

使用REST API将WSTG方法集成到自动化安全流水线中:

root@kitploit:~
import requests

# 获取当前测试的测试方法
response = requests.post('http://localhost:5004/search', json={
    'query': 'session fixation testing',
    'n_results': 3
})
methodology = response.json()['results']

安全培训

培训或CTF挑战期间快速参考安全测试方法。

要求

  • Python 3.8+
  • ChromaDB
  • BeautifulSoup4
  • httpx
  • MCP SDK(用于Claude Code集成)

许可证

本项目使用了OWASP Web安全测试指南的内容,该指南采用知识共享署名-相同方式共享4.0许可。

相关项目

  • OWASP WSTG - 原始材料
  • Claude Code - 支持MCP的AI编程助手
  • ChromaDB - 用于嵌入的向量数据库
下载工具