使用各种公开资源尽可能获取更多的的信息,收集的范围包括DNS服务器、路由关系、whois数据库、电子邮件、电话号码、个人信息和公司信息等
以www.testfire.net为例
DNS收集
关注域名注册者、联系方式、邮件信息、子域名等信息
whois查询
kali的集成工具,公开的

可以看到关联的邮箱、电话、域名信息
也可以通过一些在线工具查询,比如站长之家站长工具 - 站长之家

还可以通过邮箱电话等进行反查
子域名查询
利用网站查询 https://searchdns.netcraft.com/
直接提交域名就可以,但网站不太稳定

使用搜索引擎
比如百度的语法
site:x.x.x.x

也可使用工具进行查询
例如使用子域名挖掘机

按以上步骤启动
原理大概就是暴力枚举,利用已有的字典进行遍历,输出有效域名
可以看到该域名的其他域名和IP、端口、WEB服务器等信息

可以用kali的指定搜索引擎
theHarvester

常用
theHarvester -d testfire.net -l 500 -b baidu
可以看到搜索出来的子域名

通过DNS解析找到IP地址
ping就可以实现
可以看到IP为65.61.137.117

nslookup也可以实现
有的时候用nslookup,会找到多个IP,一些大的搜索引擎会采用CDN技术,在某一个地方会有一个总站的IP镜像,同步总站的数据,用户访问的就是这个镜像IP,可以提升用户的访问速度,也可以通过指定DNS服务器地址来实现找到其他IP
例如google,结果就是不一样的


dig
//简单查询
dig testfire.net
//指定服务器查询
dig @8.8.8.8 testfire.net
//获取域名的详细解析过程
dig + trace testfire.net

