子域名收集器 OneforAll

OneForAll 是一款开源的子域名收集工具,支持多种收集方式和格式导出,适用于信息收集与渗透测试场景。

OneForAll工具(Windows)

一、 OneForAll 简介

OneForAll 是由 shmilylty 在 Github 上开源的子域名收集工具。它具有强大的收集能力和灵活的处理功 能,支持多线程操作,速度极快。

功能特点:

  • 收集能力强大:利用证书透明度、常规检查、爬虫档案、DNS 数据集、DNS 查询、威胁情报平 台、搜索引擎等多种方式收集子域。
  • 支持子域爆破:支持字典爆破、自定义 fuzz 模式,批量爆破和递归爆破。
  • 子域验证:自动解析子域 DNS,获取 title 和 banner,判断子域存活情况。
  • 子域接管:支持子域接管风险检查和自动接管(目前支持 Github)。
  • 处理功能强大:支持多种格式导出结果(rst、csv、tsv、json、yaml、html、xls、xlsx、dbf、 latex、ods)。
  • 速度极快:利用多线程和异步多协程技术,收集速度达到10000pps。

二、安装环境

安装 OneForAll 需要 Python 3.8 以上版本和 pip3 包管理工具。

检查环境步骤:

  • 检查 Python 版本:使用命令 python -V 或 python –version 确认 Python 版本
  • 检查 pip 版本:使用命令 pip3 -V 或 pip3 –version 确认 pip 版本(Python 3.4 以上版本已内置 pip)

三、 OneForAll 的安装与使用

1、下载 OneForAll 文件

将文件部署在本地 下载地址:https://github.com/shmilylty/OneForAll?tab=readme-ov-file

2、切换路径

打开 CMD 窗口,将执行文件路径切换到 OneForAll 程序所在路径。

1
cd G:\Tools\OneForAll\OneForAll-master>

3、利用pip安装的库

1
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/

4、运行 OneForAll 程序

输入命令启动 OneForAll

1
python oneforall.py

四、使用 OneForAll 收集子域名

1、单个目标子域名收集

1
python oneforall.py --target wangdun.cn run

扫描结果将存放于 oneforall\results 文件夹中

2、批量目标子域收集

1
python oneforall.py --targets ./domains.txt run

domains.txt 需要自己创建

3、只导出存活的子域结果

1
python oneforall.py --target wangdun.com --valid Valid run

4、使用爆破模块进行子域名爆破

1
python oneforall.py --target wangdun.com --brute True run

5、设置结果保存格式为csv

1
python oneforall.py --target example.com --fmt csv run

6、不使用DNS解析子域

1
python oneforall.py --target example.com --dns False run

7、不使用HTTP请求子域

1
python oneforall.py --target example.com --req False run

8、不检查子域名接管

1
python oneforall.py --target example.com --takeover False run