子域名信息收集

被动信息收集

0x01 Certificate Transparency(证书透明)

证书透明度(Certificate Transparency)是证书授权机构的一个项目,证书授权机构会将每个SSL/TLS证书发布到公共日志中。一个SSL/TLS证书通常包含域名、子域名和邮件地址。查找某个域名所属证书的最简单的方法就是使用搜索引擎搜索一些公开的CT日志。

利用Google提出的证书透明度(Certificate Transparency)查询公开的子域,一般查询结果包括域、签发者、有效期和签名等

在线查询地址:

https://crt.sh/
https://censys.io/
https://developers.facebook.com/tools/ct/
https://google.com/transparencyreport/https/ct/
https://transparencyreport.google.com/https/certificates:

0x02 利用DNS记录公开数据收集

域名系统DNS(https://www.cnblogs.com/lalalaxiaoyuren/p/14464348.html)

查询公开DNS记录

(1)ip138:https://site.ip138.com/
(2)百度云观测:http://ce.baidu.com/index/getRelatedSites?site_address=baidu.com
(3)circl:https://www.circl.lu/services/passive-dns/#passive-dns
(4)hackertarget:https://hackertarget.com/find-dns-host-records/
(5)riddler:https://riddler.io/search?q=pld:baidu.com
(6)bufferover:https://dns.bufferover.run/dns?q=.baidu.com
(7)dnsdb:https://dnsdb.io/zh-cn/search?q=baidu.com
(8)ipv4info:http://ipv4info.com/
(9)robtex:https://www.robtex.com/dns-lookup/
(10)chinaz:https://alexa.chinaz.com/
(11)netcraft:https://searchdns.netcraft.com/
(12)securitytrails:https://docs.securitytrails.com/v1.0/reference#get-domain
(13)dnsdumpster:https://dnsdumpster.com/
(14)sitedossier:http://www.sitedossier.com/
(15)threatcrowd:https://www.threatcrowd.org/
(16)siterankdata:https://siterankdata.com/
(17)findsubdomains:https://findsubdomains.com/

dnssumpster

hackertarget

0x03 威胁情报数据

(1)微步:https://x.threatbook.cn/
(2)alienvault:https://otx.alienvault.com/
(3)riskiq:https://www.riskiq.com/
(4)threatminer:https://www.threatminer.org/
(5)virustotal:https://www.virustotal.com/gui/home/search

0x04 安全类型搜索引擎

(1)https://fofa.so/
(2)https://www.shodan.io/
(3)https://www.zoomeye.org/
(4)binaryedge:https://app.binaryedge.io/services/domains


0x05 常规搜索引擎

(1)baidu
(2)bing
(3)google
(4)sougou

0x06 代码仓库

(1)gayhub:giithub
(2)阿里云代码托管:https://code.aliyun.com/
(3)码云:https://gitee.com/

主动信息收集

oneforall

  • 项目地址:https://github.com/shmilylty/OneForAll
  • 工具介绍:https://www.cnblogs.com/R-S-PY/p/13087063.html
  • 工具描述:oneforall是近几年出现的比较优秀的子域名收集工具之一,目前还在不断地进行更新优化。这款工具集成了各种域名信息收集的“姿势”,手段可谓是非常全面了。包括利用证书透明度、常规检查、利用网上爬虫(正在实现)、DNS数据集、DNS查询、威胁情报平台、搜索引擎等,但笔者发现它对域名泛解析的处理还不是特别理想,存在较多误收集,同时存在用时较长等缺点。

SubdomainBrute

  • 项目地址:https://github.com/lijiejie/subDomainsBrute
  • 工具介绍:李劼杰的SubdomainBrute是业内比较出名的子域名收集工具了,工具采用协程加快爆破速度,使用114DNS、百度DNS、阿里DNS这几个快速又可靠的公共DNS进行查询。准确率高,效果比较好。但对泛解析的处理规则是:超过10个域名指向同一IP,则此后发现的其他指向该IP的域名将被丢弃,该方法可能存在误删,但不可否认的是,该规则在一定程度上简便有效。
  • 使用方法:
进入文件目录下:python subDomainsBrute.py --full xxx.cn
-f 添加字典
--full 全体扫描
-t 线程
-o 输出文件

ESD

  • 项目地址:https://github.com/FeeiCN/ESD
  • 工具介绍:ESD的爆破速度极快,62万条数据只用了4分30秒左右,这款工具存在的缺点之一就是对性能要求高,1G2核的服务器CPU占用率达100%。除此之外,输出的结果也比较不稳定,同一网络下对同一域名进行收集,几次结果数量都不一样。
  • 使用环境:
    Python3
  • 安装
    pip install esd
  • 升级
    pip install esd -upgrade
  • 使用方法:
# 扫描单个域名
esd -d qq.com

# debug模式扫描单个域名
esd=debug esd -d qq.com

# 扫描多个域名(英文逗号分隔)
esd --domain qq.com,tencent.com

# 扫描单个域名且过滤子域名中单个特定响应内容
esd --domain mogujie.com --filter 搜本店

# 扫描单个域名且过滤子域名中多个特定响应内容
esd --domain mogujie.com --filter 搜本店,收藏店铺

# 扫描文件(文件中每行一个域名)
esd --file targets.txt

# 跳过相似度对比(开启这个选项会把所有泛解析的域名都过滤掉)
esd --domain qq.com --skip-rsc

# 使用搜索引擎进行子域名搜索(支持baidu、google、bing、yahoo,使用英文逗号分隔)
esd --domain qq.com --engines baidu,google,bing,yahoo

# 平均分割字典,加快爆破
esd --domain qq.com --split 1/4

# 使用DNS域传送漏洞获取子域名
esd --domain qq.com --dns-transfer

# 使用HTTPS证书透明度获取子域名
esd --domain qq.com --ca-info

Sublist3r

Short Form	Long Form	Description
-d	--domain	Domain name to enumerate subdomains of
-b	--bruteforce	Enable the subbrute bruteforce module
-p	--ports	Scan the found subdomains against specific tcp ports
-v	--verbose	Enable the verbose mode and display results in realtime
-t	--threads	Number of threads to use for subbrute bruteforce
-e	--engines	Specify a comma-separated list of search engines
-o	--output	Save the results to text file
-h	--help	show the help message and exit

Layer

Layer子域名爆破机
Layer是windows下的一款子域名探测工具,其工作原理是利用子域名字典进行爆破,使用简单容易上手。

在线子域名查询

项目地址:https://phpinfo.me/domain/

posted @ 2021-03-01 16:41  lalalaxiaoyuren  阅读(914)  评论(0编辑  收藏  举报