Oneforall 是一款知名的信息收集工具,收集的信息包括子域名、端口、网站标题等,只需要提供一个域名即可帮你梳理出所有子域名下的网站信息,如图:
整个运行过程都展示出来,安装也很简单,三条命令搞定:
工具是固定死的,每个使用者在运行时,所获得的结果几乎一样,那么接下来的重点是,如何让这个工具的使用与他人拉开差距,如何配置可以获得更多的结果。
技巧一:运行工具的网络环境选择
在运行工具时,会出现下面的报错信息:
出现的原因是查询域名的接口无法正常访问,被防火墙拦截所致,所以需要改变网络环境,可以使用代理或者国外的 VPS 来运行该程序,从而解决连接超时的问题。
技巧二:氪金玩家专属
Oneforall 集成了 56 个接口查询服务,详细信息如图:
其中的一些接口需要付费订阅才可以查询到完整数据,Oneforall 中提供了 API-KEY 的配置文件,路径:
config/api.py
# 模块API配置# Censys可以免费注册获取API:https://censys.io/apicensys_api_id = ''censys_api_secret = ''# Binaryedge可以免费注册获取API:https://app.binaryedge.io/account/api# 免费的API有效期只有1个月,到期之后可以再次生成,每月可以查询250次。binaryedge_api = ''# BeVigil API: https://bevigil.com/osint-apibevigil_api = ''# Chinaz可以免费注册获取API:http://api.chinaz.com/ApiDetails/Alexachinaz_api = ''# Bing可以免费注册获取API:https://azure.microsoft.com/zh-cn/services/# cognitive-services/bing-web-search-api/#web-jsonbing_api_id = ''bing_api_key = ''# SecurityTrails可以免费注册获取API:https://securitytrails.com/corp/apisecuritytrails_api = ''# https://fofa.so/apifofa_api_email = '' fofa_api_key = '' # Google可以免费注册获取API:# 免费的API只能查询前100条结果# https://developers.google.com/custom-search/v1/overview#search_engine_id# 创建自定义搜索引擎后需要在响应的控制面板上启用Search the entire webgoogle_api_id = '' # https://developers.google.com/custom-search/v1/overview#api_keygoogle_api_key = '' # https://api.passivetotal.org/api/docs/riskiq_api_username = ''riskiq_api_key = ''# Shodan可以免费注册获取API: https://account.shodan.io/register# 免费的API限速1秒查询1次shodan_api_key = ''# ThreatBook API 查询子域名需要收费 https://x.threatbook.cn/nodev4/vb4/myAPIthreatbook_api_key = ''# VirusTotal可以免费注册获取API: https://developers.virustotal.com/referencevirustotal_api_key = ''# https://www.zoomeye.org/doc?channel=apizoomeye_api_key = ''# Spyse可以免费注册获取API: https://spyse.com/spyse_api_token = ''# https://www.circl.lu/services/passive-dns/circl_api_username = ''circl_api_password = ''# https://www.dnsdb.info/dnsdb_api_key = ''# ipv4info可以免费注册获取API: http://ipv4info.com/tools/api/# 免费的API有效期只有2天,到期之后可以再次生成,每天可以查询50次。ipv4info_api_key = ''# https://github.com/360netlab/flint# passivedns_api_addr默认空使用http://api.passivedns.cn# passivedns_api_token可为空passivedns_api_addr = ''passivedns_api_token = ''# Github Token可以访问https://github.com/settings/tokens生成,user为Github用户名# 用于子域接管和子域收集github_api_user = ''github_api_token = ''# obtain Cloudflare API key from https://dash.cloudflare.com/profile/api-tokenscloudflare_api_token = ''# https://hunter.qianxin.com/home/userInfohunter_api_key = ''# https://api-docs.fullhunt.io/fullhunt_api_key = ''# 登录quake之后可在个人中心获取key https://quake.360.net/quake/#/personal?tab=messagequake_api_key = ''#https://www.racent.com/ctlog F2>Network抓包获取Tokenracent_api_token = ''
如果你是氪金玩家,拥有全部的付费会员账号,那么你的数据一定能超过大多数人。
技巧三:自定义字典
Oneforall 中有一个通过 dns 枚举来扩展子域名的步骤,整个执行过程如下:
简而言之就是先组合出域名字典,然后调用第三方工具 massdns 进行域名枚举,最后将结果进行整合,这里会用到 dns 的域名字典,默认有 95267 个,路径:
data/subnames.txt
如果你所收集的目标子域名不在字典中,那么将无法找到该子域名,一份完整域名字典或者高频字典就很关键,也可以根据目标已知域名进行推测,然后在进行枚举,可以大大提高子域名覆盖率。