返回市场
漏洞数据库MCP服务器

漏洞数据库MCP服务器

作者:Cyreslab-AI14 星标更新:2025-11-03

项目介绍

ExploitDB MCP 服务器

Cyreslab.ai 开发的 Model Context Protocol 服务器,提供对 ExploitDB 功能的访问。此服务器使像 Claude 这样的AI助手能够查询有关安全漏洞和弱点的信息,增强网络安全研究和威胁情报能力。

GitHub 仓库: https://github.com/Cyreslab-AI/exploitdb-mcp-server 联系: contact@cyreslab.ai

特性

  • 漏洞搜索: 根据关键词、CVE 编号、平台等搜索漏洞
  • 漏洞详情: 获取特定漏洞的全面信息,包括代码
  • CVE 查询: 查找与特定 CVE 编号相关的所有漏洞
  • 最新漏洞: 跟踪新添加的漏洞
  • 统计数据: 获取按平台、类型和年份分布的漏洞洞察
  • 自动更新: 定期更新数据库以保持最新状态

安装

先决条件

  • Node.js (v16 或更高版本)
  • npm (v7 或更高版本)

安装步骤

  1. 克隆仓库:

    git clone https://github.com/Cyreslab-AI/exploitdb-mcp-server.git
    cd exploitdb-mcp-server
    
  2. 安装依赖项:

    npm install
    
  3. 构建项目:

    npm run build
    
  4. 配置服务器:

    • 在根目录下基于 .env.example 创建一个 .env 文件
    • 根据需要调整设置(数据目录、更新频率等)
  5. 初始化数据库:

    npm run update-db
    

    注意: 初始数据库更新可能需要几分钟时间,因为它处理了来自 ExploitDB CSV 文件的大约 47,000 个漏洞。脚本通过使用所需字段的默认值来优雅地处理缺失或格式错误的数据。

  6. 运行服务器:

    node build/index.js
    

MCP 配置

要将此服务器与 Claude 或其他兼容 MCP 的助手一起使用,请将其添加到您的 MCP 配置中:

{
  "mcpServers": {
    "mcp-exploitdb-server": {
      "command": "node",
      "args": ["/path/to/exploitdb-mcp-server/build/index.js"]
    }
  }
}

可用工具

ExploitDB MCP 服务器提供了 18 种全面的工具,用于查询和分析漏洞数据:

核心搜索工具

  1. search_exploits - 使用多个过滤器进行通用搜索
  2. get_exploit - 获取特定漏洞的详细信息
  3. find_by_cve - 根据 CVE 编号查找漏洞
  4. get_recent_exploits - 获取最近添加的漏洞
  5. get_statistics - 获取数据库统计信息

高级搜索工具

  1. search_by_platform - 根据特定平台及其过滤器搜索漏洞
  2. search_by_type - 按漏洞类型(webapps、远程、本地、dos、硬件)搜索
  3. search_by_author - 查找特定作者的所有漏洞
  4. search_by_date_range - 查找特定日期范围内的漏洞
  5. search_by_tags - 根据生成的标签(SQL 注入、XSS 等)搜索

分析与情报工具

  1. get_platform_statistics - 获取特定平台的详细统计信息
  2. get_trending_exploits - 查找最近添加的漏洞(可配置的时间段)
  3. compare_exploits - 并排比较多个漏洞
  4. get_exploit_timeline - 获取漏洞的时间线

实用工具

  1. batch_get_exploits - 高效检索多个漏洞(最多 50 个)
  2. get_related_exploits - 根据平台、作者、CVE 或标签查找相关漏洞
  3. validate_exploit_id - 检查漏洞 ID 是否存在
  4. export_search_results - 将搜索结果导出为 JSON 或 CSV 格式

使用示例

搜索漏洞

使用 search_exploits 工具在数据库中搜索漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_exploits</tool_name>
<arguments>
{
  "query": "wordpress 插件",
  "platform": "php",
  "limit": 5
}
</arguments>
</use_mcp_tool>

额外的搜索参数:

  • type: 按漏洞类型筛选(例如,webapps、远程、本地)
  • cve: 按 CVE 编号筛选
  • author: 按作者名称筛选
  • start_date/end_date: 按日期范围筛选(YYYY-MM-DD)
  • verified: 按验证状态筛选(true/false)
  • offset: 用于分页

获取漏洞详情

使用 get_exploit 工具获取特定漏洞的详细信息:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_exploit</tool_name>
<arguments>
{
  "id": 12345,
  "include_code": true
}
</arguments>
</use_mcp_tool>

根据 CVE 查找漏洞

使用 find_by_cve 工具查找与特定 CVE 相关的所有漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>find_by_cve</tool_name>
<arguments>
{
  "cve": "CVE-2021-44228",
  "limit": 10
}
</arguments>
</use_mcp_tool>

获取最近的漏洞

使用 get_recent_exploits 工具获取最近添加的漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_recent_exploits</tool_name>
<arguments>
{
  "limit": 10
}
</arguments>
</use_mcp_tool>

获取统计数据

使用 get_statistics 工具获取关于数据库中漏洞的洞察:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_statistics</tool_name>
<arguments>
{}
</arguments>
</use_mcp_tool>

根据平台搜索

根据特定平台及其高级过滤器搜索漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_by_platform</tool_name>
<arguments>
{
  "platform": "php",
  "type": "webapps",
  "verified": true,
  "limit": 10
}
</arguments>
</use_mcp_tool>

根据作者搜索

查找特定作者的所有漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_by_author</tool_name>
<arguments>
{
  "author": "Offensive Security",
  "limit": 10
}
</arguments>
</use_mcp_tool>

根据日期范围搜索

查找特定日期范围内的漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_by_date_range</tool_name>
<arguments>
{
  "start_date": "2024-01-01",
  "end_date": "2024-12-31",
  "platform": "windows",
  "limit": 20
}
</arguments>
</use_mcp_tool>

根据标签搜索

根据生成的标签搜索漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>search_by_tags</tool_name>
<arguments>
{
  "tags": ["SQL 注入", "RCE"],
  "match_all": false,
  "limit": 10
}
</arguments>
</use_mcp_tool>

获取热门漏洞

查找最近添加的漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_trending_exploits</tool_name>
<arguments>
{
  "days": 30,
  "limit": 10
}
</arguments>
</use_mcp_tool>

比较漏洞

并排比较多个漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>compare_exploits</tool_name>
<arguments>
{
  "ids": [12345, 12346, 12347]
}
</arguments>
</use_mcp_tool>

获取相关漏洞

查找与特定漏洞相关的漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>get_related_exploits</tool_name>
<arguments>
{
  "id": 12345,
  "relation_type": "platform",
  "limit": 10
}
</arguments>
</use_mcp_tool>

批量获取漏洞

高效检索多个漏洞:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>batch_get_exploits</tool_name>
<arguments>
{
  "ids": [12345, 12346, 12347, 12348],
  "include_code": false
}
</arguments>
</use_mcp_tool>

导出搜索结果

将搜索结果导出为 CSV 或 JSON 格式:

<use_mcp_tool>
<server_name>mcp-exploitdb-server</server_name>
<tool_name>export_search_results</tool_name>
<arguments>
{
  "query": "wordpress",
  "format": "csv",
  "platform": "php",
  "limit": 100
}
</arguments>
</use_mcp_tool>

配置选项

服务器可以通过环境变量或 .env 文件进行配置:

变量描述默认值
CLONE_REPOSITORY是否克隆 ExploitDB 仓库false
REPOSITORY_URLExploitDB 仓库的 URLhttps://gitlab.com/exploit-database/exploitdb.git
CSV_URLExploitDB CSV 文件的 URLhttps://gitlab.com/exploit-database/exploitdb/-/raw/main/files_exploits.csv
DATA_DIR存储数据的目录./data
DB_PATHSQLite 数据库的路径./data/exploitdb.sqlite
UPDATE_INTERVAL更新频率(小时),0 表示禁用24
MAX_RESULTS每次查询返回的最大结果数10

数据来源

此服务器使用 Exploit Database 中的数据,该数据库由 Offensive Security 维护。数据要么直接从 CSV 文件下载,要么从 ExploitDB GitLab 仓库克隆。

数据处理

服务器自动处理各种数据质量问题:

  • 日期处理: 使用 CSV 中的 date_published,如果缺失则回退到 date_addeddate_updated 或默认日期
  • 缺失字段: 当数据不完整时,为必需字段(作者、类型、平台)提供合理的默认值
  • CVE 提取: 自动从漏洞描述中提取 CVE 标识符
  • 标签生成: 根据漏洞描述生成相关标签,以提高可搜索性

数据库通常包含:

  • 超过 46,000 个漏洞,涵盖从 1988 年至今
  • 超过 33,000 个已验证的漏洞
  • 覆盖 60 多种 平台(PHP、Windows、Linux 等)
  • 超过 27,000 个 Web 应用程序漏洞
  • 包括作者、日期、平台和 CVE 引用在内的全面元数据

许可证

本项目采用 MIT 许可证 - 详情见 LICENSE 文件。

致谢

贡献

欢迎贡献!请随意提交 Pull Request。

有功能建议或发现错误?请在我们的 GitHub 仓库 上打开一个问题,或直接联系我们 contact@cyreslab.ai