Layer子域名挖掘机

Layer子域名挖掘机是一款域名查询工具,可提供网站子域名查询服务。拥有简洁的界面、简单的操作模式,支持服务接口、暴力搜索、同服挖掘三种模式,支持打开网站、复制域名、复制IP、复制CDN、导出域名、导出IP、导出域名+IP、导出域名+IP+WEB服务器以及导出存活网站!bf99b7e2c5e77cff30bd9e2f57d8e476.png

用法就不用多解释了,图形化界面简单易上手,信息收集必备神器!

Maltego

Maltego是一款非常优秀的信息收集工具。与其他工具相比,不仅功能强大,而且自动化水平非常高,不需要复杂的命令,就能轻松的完成信息收集。

39116d8f36bb288559e80364a25d1238.png

账号注册与使用教程: https://blog.csdn.net/smli_ng/article/details/105943189

maltego插件开发:https://www.freebuf.com/sectool/207378.html

OneForAll

OneForAll是一款功能强大的子域收集工具

详细介绍:https://paper.seebug.org/1053/

下载安装

1
2
3
4
5
git clone https://gitee.com/shmilylty/OneForAll.git

python3 -m pip install --user -U pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple/

pip3 install --user -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/

使用

1
2
3
4
5
cd OneForAll

python3 oneforall.py --help            #查看帮助菜单

python3 oneforall.py --target example.com run

JSFinder

JSFinder是一款用作快速在网站的js文件中提取URL,子域名的工具。

详细介绍:https://github.com/Threezh1/JSFinder

下载使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
git clone https://github.com/Threezh1/JSFinder.git

cd JSFinder/

python3 JSFinder.py -u http://www.baidu.com        #简单爬取

python3 JSFinder.py -u http://www.baidu.com -d      #深度爬取

#建议使用-ou 和 -os来指定保存URL和子域名的文件名。
python3 JSFinder.py -u http://www.mi.com -d -ou mi_url.txt -os mi_subdomain.txt

python3 JSFinder.py -f url.txt #批量指定url

python3 JSFinder.py -f js.txt -j #批量指定js

subDomainsBrute

高并发的DNS暴力枚举工具。

详细介绍:https://github.com/lijiejie/subDomainsBrute

下载安装

1
2
3
git clone https://github.com/lijiejie/subDomainsBrute.git

pip3 install aiodns

使用示例

1
2
3
cd subDomainsBrute

python3 subDomainsBrute.py -t 10 baidu.com -o baidu.txt

Sublist3r

Sublist3rsublist3r是一款python开发的子域名枚举工具,通过各种搜索引擎 (例如Google,Yahoo,Bing,Baidu和Ask)枚举子域。Sublist3r还使用Netcraft,Virustotal,ThreatCrowd,DNSdumpster和ReverseDNS枚举子域。也集合了subbrute的暴力枚举功能。

下载安装

1
2
3
4
5
git clone https://github.com/aboul3la/Sublist3r.git

cd Sublist3r/

pip3 install -r requirements.txt

使用示例

1
2
3
python3 sublist3r.py -d baidu.com		#扫描子域名

python3 sublist3r.py -b -d baidu.com #暴力枚举子域名

theHarvester

Kali Linux内置工具

theHarvester是一款信息收集工具,它可以从不同的公开源中(例如:搜索引擎和PGP key服务器)收集e -mail账户信息,用户名称和主机名/子域名等。theHarvester目的是帮助渗透测试人员在早期阶段尽可能的收集一些信息。这个工具十分简单但非常有效。

常用选项

  • -l 限制并发搜索结果
  • -b 指定搜索引擎(google,pgp,bing,baidu等)
  • -d 指定搜索对象
  • -h 使用Shodan数据库去搜索主机

使用示例

1
proxychains theHarvester -d 163.com -l 500 -b google

注:使用google作为搜索引擎需要使用proxychains代理进行“科学上网”

recon-ng

Kali Linux内置工具=

recon-ng是功能齐全的recon-ng框架,其目的是提供一个强大的环境,以快速,彻底地进行基于Web的开源侦查。recon-ng的使用方法和 Metasploit Framewor非常的相似。

注:运行时需要使用proxychains代理进行“科学上网”

基本命令

  • back 返回上一级
  • dashboard 显示活动的总结
  • db 工作区的数据库页面
  • exit 退出recon-ng
  • help 帮助信息
  • index 创造一个模块
  • keys 管理第三方的api接口
  • marketplace 应用市场
  • modules 已经安装的模块
  • option 管理当前文本的选项
  • pdb 打开python进行调试
  • script 记录并执行命令脚本
  • shell 执行操作系统命令
  • show 显示各种框架的条目
  • snapshots 管理一个快照
  • spool 将结果输出到一个文件里

初始化安装模块

1
2
3
proxychains recon-ng

marketplace install all

模块子命令

  • modules load 加载某个模块
  • modules reload 退出某个模块
  • modules search 搜索某个模块

示例-查询子域名

1、搜索要用到的模块(recon-ng利用浏览器进行查询,也支持暴力破解)

1
modules search bing(这里使用bing搜索引擎搜索,也支持其他浏览器)

2、然后装载模块(进行子域名查询)

1
modules load recon/domains-hosts/bing_domain_web

3、查看我们需要配置的列表并进行配置

1
2
3
options list

options set source baidu.com

注:选项子命令

  • options list 选项列表
  • options set 参数名称 参数值 (配置选项内容)
  • options unset 参数名称 (清除配置的内容)

4、然后运行模块,进行查询

1
run

5、查询结果保存在recon-ng的数据库的hosts表中

1
show hosts

示例-域名解析

1、我们要调用另一个模块并且查看选项列表

1
2
3
modules load recon/hosts-hosts/resolve

options list

2、我们要查询hosts表中的子域名的IP地址

1
options set source query select host from hosts

3、运行之后我们去hosts查看结果

1
2
3
run

show hosts

示例-生成报告

1、搜索要用到的模块

1
modules search report

2、转载报告模块并查看列表选项

1
2
3
4
5
6
7
8
9
10
11
modules load reporting/html

options list

options set CREATOR plumeria

options set CUSTOMER baidu

run

exit

3、运行模块后就可以在生成的目录下查看文件

SubFinder + KSubdomain + HttpX

  • SubFinder:用来查询域名的子域名信息的工具,可以使用很多国外安全网站的api接口进行自动化搜索子域名信息。
  • HttpX:一款运行速度极快的多功能HTTP安全工具,它可以使用retryablehttp库来运行多种网络探针,并使用了多线程机制来维持运行的稳定性和结果的准确性。
  • ksubdomain是一款基于无状态子域名爆破工具,支持在Windows/Linux/Mac上使用,它会很快的进行DNS爆破,在Mac和Windows上理论最大发包速度在30w/s,linux上为160w/s的速度。

安装go环境

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#下载go环境
wget -c https://storage.googleapis.com/golang/go1.15.11.linux-amd64.tar.gz

#解压到/usr/local/目录下
tar -C /usr/local/ -zxvf go1.15.11.linux-amd64.tar.gz

#配置环境
vim /etc/profile
#添加如下内容后保存:
export PATH=$PATH:/usr/local/go/bin

#执行以下命令,使环境变量立即生效
source /etc/profile

#查看go版本
go version

#设置go开发中的环境变量
go env -w GOPROXY=https://goproxy.io,direct

go env -w GO111MODULE=on

下载编译SubFinder与httpx

1
2
3
4
5
#安装subfinder
go get -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder

#安装httpx
go get -v github.com/projectdiscovery/httpx/cmd/httpx

下载编译KSubdomain

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
apt install libpcap-dev

git clone https://github.com/knownsec/ksubdomain.git

cd ksubdomain

go mod download

cd cmd

go build ksubdomain.go

mv ksubdomain /root/go/bin

cd /root/go/bin

使用

1
2
3
4
5
6
7
8
9
#subfinder基本使用
./subfinder -d baidu.com -o output.txt

#ksubdomain基本使用
./ksubdomain -d baidu.com

#管道操作
./subfinder -d baidu.com -silent|./ksubdomain -verify -silent|./httpx -title -content-length -status-code
#可以用管道结合在一起配合工作。达到收集域名,验证域名,http验证存活目的。

在线工具查找子域名

https://searchdns.netcraft.com/

https://pentest-tools.com/information-gathering/find-subdomains-of-domain

https://phpinfo.me/domain/

http://tool.chinaz.com/subdomain

https://spyse.com/tools/subdomain-finder

https://www.nmmapper.com/sys/tools/subdomainfinder/