aboul3la/Sublist3r

GitHub: aboul3la/Sublist3r

Sublist3r是一款基于Python的OSINT子域名枚举工具,通过聚合多个搜索引擎和公开数据源帮助渗透测试人员快速发现目标域名的子域名资产。

Stars: 10920 | Forks: 2204

## 关于 Sublist3r Sublist3r 是一个使用 OSINT 枚举网站子域名的 Python 工具。它帮助渗透测试人员和漏洞猎人收集和汇总他们目标域名的子域名。Sublist3r 使用许多搜索引擎(如 Google、Yahoo、Bing、Baidu 和 Ask)来枚举子域名。Sublist3r 还使用 Netcraft、Virustotal、ThreatCrowd、DNSdumpster 和 ReverseDNS 来枚举子域名。 [subbrute](https://github.com/TheRook/subbrute) 已集成到 Sublist3r 中,通过使用改进的字典进行暴力破解,增加了发现更多子域名的可能性。感谢 subbrute 的作者 TheRook。 ## 截图 ![Sublist3r](http://www.secgeek.net/images/Sublist3r.png "Sublist3r in action") ## 安装说明 ``` git clone https://github.com/aboul3la/Sublist3r.git ``` ## 推荐的 Python 版本: Sublist3r 目前支持 **Python 2** 和 **Python 3**。 * 推荐的 Python 2 版本是 **2.7.x** * 推荐的 Python 3 版本是 **3.4.x** ## 依赖项: Sublist3r 依赖于 `requests`、`dnspython` 和 `argparse` python 模块。 可以使用 requirements 文件安装这些依赖项: - 在 Windows 上安装: ``` c:\python27\python.exe -m pip install -r requirements.txt ``` - 在 Linux 上安装 ``` sudo pip install -r requirements.txt ``` 或者,可以独立安装每个模块,如下所示。 #### Requests 模块 (http://docs.python-requests.org/en/latest/) - Windows 安装: ``` c:\python27\python.exe -m pip install requests ``` - Ubuntu/Debian 安装: ``` sudo apt-get install python-requests ``` - Centos/Redhat 安装: ``` sudo yum install python-requests ``` - 在 Linux 上使用 pip 安装: ``` sudo pip install requests ``` #### dnspython 模块 (http://www.dnspython.org/) - Windows 安装: ``` c:\python27\python.exe -m pip install dnspython ``` - Ubuntu/Debian 安装: ``` sudo apt-get install python-dnspython ``` - 使用 pip 安装: ``` sudo pip install dnspython ``` #### argparse 模块 - Ubuntu/Debian 安装: ``` sudo apt-get install python-argparse ``` - Centos/Redhat 安装: ``` sudo yum install python-argparse ``` - 使用 pip 安装: ``` sudo pip install argparse ``` **为了在 Windows 中支持彩色输出,请安装以下库** ``` c:\python27\python.exe -m pip install win_unicode_console colorama ``` ## 用法 简写形式 | 全写形式 | 描述 ------------- | ------------- |------------- -d | --domain | 要枚举子域名的域名 -b | --bruteforce | 启用 subbrute 暴力破解模块 -p | --ports | 对发现的子域名扫描特定的 tcp 端口 -v | --verbose | 启用详细模式并实时显示结果 -t | --threads | 用于 subbrute 暴力破解的线程数 -e | --engines | 指定以逗号分隔的搜索引擎列表 -o | --output | 将结果保存到文本文件中 -h | --help | 显示帮助信息并退出 ### 示例 * 要列出所有基本选项和开关,请使用 -h 开关: ```python sublist3r.py -h``` * 枚举特定域名的子域名: ``python sublist3r.py -d example.com`` * 枚举特定域名的子域名,并且只显示开放了 80 和 443 端口的子域名: ``python sublist3r.py -d example.com -p 80,443`` * 枚举特定域名的子域名并实时显示结果: ``python sublist3r.py -v -d example.com`` * 枚举子域名并启用暴力破解模块: ``python sublist3r.py -b -d example.com`` * 枚举子域名并使用特定的引擎,如 Google、Yahoo 和 Virustotal 引擎 ``python sublist3r.py -e google,yahoo,virustotal -d example.com`` ## 在你的 Python 脚本中将 Sublist3r 作为模块使用 **示例** ``` import sublist3r subdomains = sublist3r.main(domain, no_threads, savefile, ports, silent, verbose, enable_bruteforce, engines) ``` 主函数将返回 Sublist3r 发现的一组唯一子域名。 **函数用法:** * **domain**:您要枚举子域名的目标域名。 * **savefile**:将输出保存到文本文件中。 * **ports**:指定以逗号分隔的要扫描的 tcp 端口列表。 * **silent**:在执行期间将 sublist3r 设置为静默模式(当您不需要太多噪音输出时很有用)。 * **verbose**:实时显示发现的子域名。 * **enable_bruteforce**:启用暴力破解模块。 * **engines**:(可选)选择特定的引擎。 枚举 Yahoo.com 子域名的示例: ``` import sublist3r subdomains = sublist3r.main('yahoo.com', 40, 'yahoo_subdomains.txt', ports= None, silent=False, verbose= False, enable_bruteforce= False, engines=None) ``` ## 许可证 Sublist3r 根据 GNU GPL 许可证授权。请查看 [LICENSE](https://github.com/aboul3la/Sublist3r/blob/master/LICENSE) 获取更多信息。 ## 致谢 * 特别感谢 [Ibrahim Mosaad](https://twitter.com/ibrahim_mosaad) 的巨大贡献,帮助改进了此工具。 ## 版本 **当前版本为 1.0**
标签:BeEF, Bug Bounty, DNS解析, ESC4, OSINT, Python, 可自定义解析器, 子域名枚举, 子域名爆破, 实时处理, 开源项目, 搜索引擎, 数据展示, 无后门, 爬虫, 用户模式钩子绕过, 系统安全, 红队, 网络安全, 逆向工具, 隐私保护