su6osec/subfinder-pro

GitHub: su6osec/subfinder-pro

基于证书透明度日志、多源API和DNS暴力破解的异步子域名枚举工具,支持通配符检测、去重合并和结果统计。

Stars: 0 | Forks: 0

# subfinder-pro ![Python Version](https://img.shields.io/badge/python-3.10%2B-blue) ![License](https://img.shields.io/badge/license-MIT-green) ![Author](https://img.shields.io/badge/author-su6osec-orange) ![Toolkit](https://img.shields.io/badge/toolkit-su6osec-purple) [![GitHub Stars](https://img.shields.io/github/stars/su6osec/subfinder-pro?style=social)](https://github.com/su6osec/subfinder-pro) 由 [Deepanshu Chauhan](https://github.com/su6osec) 开发,专为需要可靠子域名发现的 Bug Bounty 猎人、红队成员和安全审计人员打造。 ## 功能特性 - **证书透明度 (CT) 扫描** — 并发查询 crt.sh 和 CertSpotter API - **DNS 暴力破解引擎** — 异步解析器,支持可配置字典、通配符检测和误报过滤 - **多 API 集成** — SecurityTrails、Shodan DNS、Censys Certificates、VirusTotal(通过环境变量设置 API 密钥) - **异步优先架构** — 所有 I/O 操作通过 `asyncio` 和 `httpx` 并发运行 - **通配符域名检测** — 自动检测并过滤虚假的 DNS 响应 - **无效域名过滤** — 可选的解析步骤,用于丢弃 NXDOMAIN 结果 - **多格式输出** — 纯文本、JSON、CSV 或格式化表格 - **合并与去重** — 将多次扫描的结果合并为一个唯一集合 - **扫描统计** — 分析结果文件的来源分布、唯一 IP 等 - **Docker 就绪** — 一键构建并运行 - **整洁的 CLI** — 使用 [Rich](https://github.com/textualize/rich) 精美渲染,由 [Typer](https://github.com/tiangolo/typer) 驱动 ## 安装说明 ### pip (推荐) ``` pip install -e . # editable install from source subfinder-pro --version # verify ``` ### 从发布包安装 ``` tar xzf subfinder-pro-*.tar.gz cd subfinder-pro-* pip install . ``` ### Git clone ``` git clone https://github.com/su6osec/subfinder-pro.git cd subfinder-pro pip install -e ".[dev]" # includes pytest, ruff, mypy ``` ### Docker ``` docker build -t subfinder-pro . docker run --rm subfinder-pro --version ``` ## 快速使用 ``` # 对域名进行 Full scan (CT + API + brute-force) subfinder-pro scan example.com # 仅 CT log 搜索 subfinder-pro ct example.com -f json -o results.json # 使用自定义 wordlist 进行 DNS brute-force subfinder-pro bruteforce example.com -w /path/to/wordlist.txt -t 100 # 仅 API 搜索(需要环境中的 API keys) subfinder-pro api-search example.com -f json # 合并多个结果文件并去重 subfinder-pro merge results1.txt results2.json -f json -o merged.json # 显示结果文件的统计信息 subfinder-pro stats results.json ``` ### 环境变量 | 变量 | 描述 | 默认值 | |------------------------------|------------------------------------|----------------------------------| | `SECURITYTRAILS_API_KEY` | SecurityTrails API 密钥 | *(未设置)* | | `SHODAN_API_KEY` | Shodan API 密钥 | *(未设置)* | | `CENSYS_API_ID` | Censys API ID | *(未设置)* | | `CENSYS_API_SECRET` | Censys API 密钥 | *(未设置)* | | `VIRUSTOTAL_API_KEY` | VirusTotal API 密钥 | *(未设置)* | | `SUBFINDER_THREADS` | 并发线程数 | `50` | | `SUBFINDER_TIMEOUT` | HTTP 请求超时 (秒) | `15` | | `SUBFINDER_RESOLVERS` | 逗号分隔的 DNS 解析器 IP | `8.8.8.8,8.8.4.4,1.1.1.1,...` | | `SUBFINDER_WORDLIST` | 自定义字典路径 | 内置 `wordlists/default.txt` | | `SUBFINDER_RESOLVE` | 解析发现的子域名 | `true` | | `SUBFINDER_FILTER_DEAD` | 丢弃 NXDOMAIN 结果 | `true` | ## CLI 参考 | 命令 | 描述 | | -------------- | ------------------------------------ | | `scan` | 完整的子域名枚举流程 | | `bruteforce` | 仅 DNS 暴力破解 | | `ct` | 仅证书透明度扫描 | | `api-search` | 仅第三方 API 来源 | | `merge` | 合并并去重结果文件 | | `stats` | 分析结果文件 | ### 全局选项 | 选项 | 描述 | | ------------------- | --------------------------------- | | `--version, -v` | 显示版本并退出 | | ` --help` | 显示特定命令的帮助 | ### 扫描特定选项 | 选项 | 描述 | 默认值 | | ----------------------------- | ------------------------------------ | ------- | | `--format, -f` | 输出格式: `json`, `csv`, `txt`, `table`| `txt` | | `--output, -o` | 将结果写入文件路径 | stdout | | `--threads` | 并发任务限制 | `50` | | `--timeout` | HTTP / DNS 超时 (秒) | `15` | | `--bruteforce` / `--no-bruteforce` | 切换暴力破解阶段 | `on` | | `--resolve` / `--no-resolve` | 切换 DNS 解析 | `on` | | `--quiet, -q` | 抑制详细输出 | `off` | ## API 来源配置 要进行完整的 API 枚举,请在运行前导出您的密钥: ``` export SECURITYTRAILS_API_KEY="your-key" export SHODAN_API_KEY="your-key" export CENSYS_API_ID="your-id" export CENSYS_API_SECRET="your-secret" export VIRUSTOTAL_API_KEY="your-key" ``` 或者在项目目录中创建一个 `.env` 文件: ``` SECURITYTRAILS_API_KEY=your-key SHODAN_API_KEY=your-key ``` ## 架构 ``` subfinder-pro scan example.com | ├─ Phase 1: CT Sources (crt.sh + CertSpotter, concurrent) ├─ Phase 2: API Sources (SecurityTrails, Shodan, Censys, VT) ├─ Phase 3: DNS Brute-Force (wordlist -> async resolver) | ├─ Merge & Deduplicate ├─ DNS Resolution (optional) └─ Dead-domain Filtering (optional) ``` ## 许可证 [MIT License](LICENSE) — 2024 Deepanshu Chauhan (su6osec)
标签:API集成, Asyncio异步编程, CT日志, DNS爆破, DNS解析, GitHub, Httpx, Linux安全, Python安全工具, Rich, Talos规则, Typer, 主动扫描, 可观测性, 命令行工具(CLI), 域名接管, 子域名枚举, 密码管理, 开源项目, 插件系统, 系统安全, 计算机取证, 证书透明性, 请求拦截, 资产梳理, 资产测绘, 运行时操纵, 逆向工具