Subdominator:73种OSINT数据源驱动的终极子域名枚举引擎,助你快速映射攻击面

📅 2026/7/27 18:14:50 👁️ 阅读次数 📝 编程学习
Subdominator:73种OSINT数据源驱动的终极子域名枚举引擎,助你快速映射攻击面

Subdominator:73种OSINT数据源驱动的终极子域名枚举引擎,助你快速映射攻击面

【免费下载链接】SubdominatorSubDominator helps you discover subdomains associated with a target domain efficiently and with minimal impact for your Bug Bounty项目地址: https://gitcode.com/gh_mirrors/su/Subdominator

Subdominator是一款高性能的被动子域名枚举引擎,它利用73种OSINT数据源(包括证书透明度日志、搜索引擎、威胁情报源、DNS数据集等),能在几秒钟内绘制目标的完整攻击面。基于Python的async/await技术栈(asyncio+aiohttp)构建,借助磁盘支持的发现缓存,即使每次运行处理10万+个子域名,也不会出现内存峰值。

为什么选择Subdominator进行子域名枚举?

在网络安全领域,全面的资产发现是漏洞挖掘和渗透测试的基础。Subdominator作为一款专注于子域名枚举的工具,具有以下核心优势:

73种被动OSINT数据源

Subdominator整合了73种不同类型的数据源,包括证书透明度日志(如crt.sh)、搜索引擎(如Google)、威胁情报平台(如Shodan、Censys)、DNS档案库等。这种多源数据聚合能力确保了发现的子域名数量和覆盖面远超单一数据源工具。

递归枚举能力

支持自动扫描发现的子域名到任意深度,通过-rd参数可设置递归深度,帮助用户发现更深层次的子域名结构。

高效的资源管理

采用异步优先架构,可配置并行度,在保证速度的同时避免对目标和数据源造成过大压力。磁盘支持的缓存机制确保即使处理10万+个子域名,内存使用也保持稳定。

丰富的输出与存储选项

提供多种输出格式(纯文本、JSONL流、JSON报告、HTML报告),满足不同场景需求。 findings会自动保存到本地SQLite数据库,用户可通过交互式shell进行查询和导出。

快速开始:Subdominator安装指南

推荐方式 - uv工具(最快)

uv tool install subdominator

pip(传统方式)

pip install --upgrade subdominator

从源码安装

git clone https://gitcode.com/gh_mirrors/su/Subdominator cd Subdominator uv sync

带HTML报告支持

pip install "subdominator[reports]" # 或 uv tool install "subdominator[reports]"

注意:需要Python 3.13+

简单易用的Subdominator使用方法

基本命令格式

subdominator [flags]

常用示例

基本单域扫描:

subdominator -d example.com

将结果保存到文件:

subdominator -d example.com -o results.txt

递归枚举(深度2):

subdominator -d example.com -rd 2

使用JSON流进行管道集成:

subdominator -d example.com -j | jq .subdomain

仅使用特定数据源:

subdominator -d example.com -ir shodan,censys,securitytrails

全量扫描并生成HTML报告:

subdominator -d example.com --all -oh report.html

强大的交互式审计shell

Subdominator提供了一个交互式审计shell,用于查询和管理存储在SQLite数据库中的历史发现。通过--shell-sh参数启动:

subdominator --shell

常用shell命令

命令描述
domains列出所有存储的根域名及其发现数量
domain <root>显示存储域名的统计摘要
findings <root>显示域名的所有存储发现
export <root> <path> [txt\|json\|html]将发现导出到文件
resources列出资源目录及认证标记

灵活的配置选项

Subdominator将API密钥配置存储在YAML文件中。首次运行时,会自动在以下位置创建模板:

~/.config/subdominator/provider-config.yaml

用户可以在该文件中为每个提供程序添加密钥。每个条目都是一个列表,因此可以提供多个密钥——Subdominator会在每次运行时随机选择一个:

# ~/.config/subdominator/provider-config.yaml shodan: - YOUR_SHODAN_KEY censys: - YOUR_CENSYS_ID:YOUR_CENSYS_SECRET github: - ghp_token1 - ghp_token2

也可以使用--config-path/-cp指定自定义配置路径:

subdominator -d example.com -cp /path/to/my-config.yaml

丰富的输出格式

纯文本(默认)

每行一个子域名,适合管道操作。使用-o results.txt保存。

api.example.com mail.example.com dev.example.com

JSONL流(-j

每行一个JSON对象,适合与jqgrep等管道工具配合使用。

{"domain":"example.com","subdomain":"api.example.com","resource":"shodan"} {"domain":"example.com","subdomain":"mail.example.com","resource":"crtsh"}

HTML报告(-oh report.html

完整的独立HTML报告,需要jinja2可选依赖(pip install "subdominator[reports]")。

数据库存储

每次运行的findings会自动保存到SQLite数据库(~/.local/share/subdominator/subdominator.db)。使用--no-db可跳过特定运行的持久化,或使用--db-path指定自定义路径。

Docker部署选项

预构建的镜像发布在GitHub Container Registry上。

拉取并扫描:

docker run --rm -it ghcr.io/revoltsecurities/subdominator:latest -d example.com

将输出保存到当前目录:

docker run --rm -it \ -v $(pwd):/output \ ghcr.io/revoltsecurities/subdominator:latest \ -d example.com -o /output/results.txt

使用自定义提供程序配置:

docker run --rm -it \ -v /path/to/config:/config \ ghcr.io/revoltsecurities/subdominator:latest \ -cp /config/provider-config.yaml -d example.com

总结

Subdominator作为一款功能强大的子域名枚举工具,通过整合73种OSINT数据源,为安全研究人员和渗透测试人员提供了高效、全面的资产发现能力。无论是漏洞赏金猎人还是企业安全团队,都能通过Subdominator快速映射目标攻击面,为后续的安全评估和漏洞挖掘奠定坚实基础。

其主要特点包括:多源数据聚合、递归枚举、高效资源管理、丰富的输出选项以及交互式审计功能。通过简单易用的命令行界面和灵活的配置选项,Subdominator能够满足不同场景下的子域名枚举需求,是网络安全从业者的得力助手。

【免费下载链接】SubdominatorSubDominator helps you discover subdomains associated with a target domain efficiently and with minimal impact for your Bug Bounty项目地址: https://gitcode.com/gh_mirrors/su/Subdominator

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考