子域名枚举工具

一个基于ProjectDiscovery Subfinder的MCP服务器,用于渗透测试和漏洞赏金狩猎中的快速被动子域名枚举。

  • by schwarztim
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 schwarztim/sec-subfinder-mcp

使用说明

sec子指示器mcp

MCP(模型上下文协议)服务器 项目发现子取景器 -一种用于渗透测试和漏洞赏金狩猎的快速被动子域枚举工具。

特性

  • 被动子域发现 -使用50多个无源源枚举子域,无需主动探测
  • 递归枚举 -查找子域的子域以进行更深入的发现
  • 批量操作 -在单个操作中处理多个域
  • 源代码管理 -选择特定来源或排除不可靠来源
  • 模式过滤 -根据模式匹配或排除子域
  • 远程执行 -通过SSH在远程Kali Linux系统上执行

先决条件

  • Node.js 18+
  • 通过SSH访问Linux系统(例如Kali) 子指示器 安装
  • 已配置SSH密钥身份验证(无密码)

在远程系统上安装Subfinder

# Using Go
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest

# Or using package manager on Kali
sudo apt install subfinder

安装

git clone https://github.com/schwarztim/sec-subfinder-mcp.git
cd sec-subfinder-mcp
npm install
npm run build

配置

克劳德桌面/克劳德代码

添加到MCP配置中:

{
  "mcpServers": {
    "subfinder": {
      "command": "node",
      "args": ["/path/to/sec-subfinder-mcp/dist/index.js"],
      "env": {
        "KALI_HOST": "your-kali-hostname",
        "SSH_PORT": "22"
      }
    }
  }
}

环境变量

变量 默认值 描述
KALI_HOST kali 远程系统的SSH主机名
SSH_PORT 22222 SSH端口
SUBFINDER_PATH ~/bin/subfinder 远程系统上子索引器二进制文件的路径

可用工具

子索引枚举

主子域枚举工具。使用被动源发现子域。

Input:
- domain (required): Target domain (e.g., "example.com")
- sources: Array of specific sources to use
- excludeSources: Array of sources to exclude
- recursive: Enable recursive enumeration
- all: Use all available sources
- json: Output in JSON format
- collectSources: Include source information in output
- match: Patterns to include
- filter: Patterns to exclude
- rateLimit: Max requests per second
- timeout: Timeout per source (seconds)

子索引源

列出子域枚举的所有可用被动源。

子指示器_递归

执行递归子域枚举(findsubexample.com)。

Input:
- domain (required): Target domain
- maxDepth: Maximum recursion depth (default: 2)
- sources: Specific sources to use
- rateLimit: Rate limit for requests

子指示器_散装

同时枚举多个域的子域。

Input:
- domains (required): Array of domains
- sources: Specific sources to use
- all: Use all available sources
- json: Output in JSON format
- rateLimit: Rate limit for requests

子索引过滤器

使用模式匹配/筛选运行枚举。

Input:
- domain (required): Target domain
- match: Patterns to include (e.g., ["api", "dev"])
- filter: Patterns to exclude (e.g., ["staging"])
- all: Use all sources

子索引配置

检查子指示器配置和API密钥状态。

子指示器版本

获取子指示器版本并验证安装。

使用示例

基本枚举

枚举example.com的子域

全面扫描

使用所有可用来源查找example.com的所有子域

目标发现

查找example.com的api和dev子域,不包括暂存环境

多个域

枚举example.com、test.com和demo.org的子域

被动源

Subfinder支持50多种无源源,包括:

免费(无API密钥):

  • crtsh、hackertargett、alienvault、anubis、columbus、commoncrawl、dnsdumpster、rapiddns、网站档案、回溯档案

需要API密钥:

  • censys、securitytrails、shodan、virustotal、github、混沌、binaryedge、fofa、intelx、netlas、zoomeye等

在中配置API密钥 ~/.config/subfinder/provider-config.yaml 在远程系统上:

securitytrails:
  - YOUR_API_KEY
shodan:
  - YOUR_API_KEY
virustotal:
  - YOUR_API_KEY

安全考虑

  • 此工具执行 仅被动侦察 -不主动探测目标系统
  • 扫描任何域之前,请确保您有授权
  • 按照适用的法律法规负责任地使用
  • API密钥应安全地存储在远程系统上

建筑

Claude/AI Assistant
       |
       v
  [MCP Server] (Node.js)
       |
       v (SSH)
  [Kali Linux]
       |
       v
  [Subfinder CLI]
       |
       v
  [Passive Sources]

发展

# Watch mode for development
npm run dev

# Build
npm run build

# Run
npm start

相关项目

许可证

MIT许可证-请参阅 许可证 了解详情。

免责声明

此工具仅用于授权的安全测试和研究目的。用户有责任在扫描任何系统或域之前确保他们有适当的授权。作者不对该工具造成的任何误用或损坏负责。