最好用的是這個工具:
項目地址:https://github.com/bit4woo/teemo
使用示例:
python teemo.py -d hkaspire.net output: a.hkaspire.net 47.106.102.137 mtc.hkaspire.net 121.40.216.101 mt.hkaspire.net 121.40.216.101 test.hkaspire.net 47.110.139.171 m.hkaspire.net www.hkaspire.net 121.196.203.24 xcx.hkaspire.net a.hkaspire.net m.hkaspire.net mt.hkaspire.net mtc.hkaspire.net test.hkaspire.net www.hkaspire.net xcx.hkaspire.net 121.40.216.101 47.106.102.137 47.110.139.171 121.196.203.24 [+] 11 sub domains found in total [+] 0 related domains found in total [+] 0 emails found in total [+] Results saved to output/hkaspire.net-2021-05-23-16-45.txt
域名收集及枚舉工具
提莫(teemo)是個偵察兵,域名的收集如同滲透和漏洞挖掘的偵察,故命名為提莫(Teemo)!
特色:具有相關域名搜集能力,即會收集當前域名所在組織的其他域名。原理是通過證書中"Subject Alternative Name"的內容。
相信這部分功能和 domain_hunter 中類似域名的收集一樣有用!
該工具主要有三大模塊:
利用搜索引擎:
- http://www.ask.com/ (無請求限制,需要代理)
- https://www.baidu.com/ (無請求限制,不需要代理)
- http://cn.bing.com/
- https://api.cognitive.microsoft.com (bing API 尚未完成)
- http://www.dogpile.com/ (無需代理)
- https://duckduckgo.com (尚未完成,頁面控制)
- http://www.exalead.com/search/web/
- http://www.fofa.so/ (需要購買)
- https://www.so.com/
- https://www.google.com (可能被block,需要代理)
- https://search.yahoo.com/
- https://yandex.com/ (可能被block)
- http://www.exalead.com/ (可能被block)
- http://www.googleapis.com/ (需要API key,google CSE)
- https://www.zoomeye.org/
- https://shodan.io/
利用第三方站點:
- Alexa
- Chaxunla
- CrtSearch
- DNSdumpster
- Googlect
- Ilink
- Netcraft
- PassiveDNS
- Pgpsearch
- Sitedossier
- ThreatCrowd
- Threatminer
- Virustotal
- HackerTarget
whois查詢及反向查詢(接口需付費,暫未加入到主功能當中):
- https://www.whoxy.com/
- DOMAINTOOLS
- WHOISXMLAPI
- ROBOWHOIS
- ZIPWHOIS
利用枚舉
- subDomainsBrute https://github.com/lijiejie/subDomainsBrute
各API申請指引(非必要)
其中部分接口需要API Key,如果有相應賬號,可以在config.py中進行配置,沒有也不影響程序的使用。
Google CSE(自定義搜索引擎):
- 創建自定義的搜索引擎(CSE)https://cse.google.com/cse/all
- 申請API Key: https://developers.google.com/custom-search/json-api/v1/overview
Bing API:
- https://azure.microsoft.com/zh-cn/try/cognitive-services/my-apis/
- https://api.cognitive.microsoft.com/bing/v5.0/search
- https://docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/quick-start
Fofa:
- 需要購買會員
Shodan:
- 登陸后頁面右上角“show API key”
基本使用
運行環境:python 2.7.*
- 查看幫助:
python teemo.py -h
- 枚舉指定域名(會使用搜索引擎和第三方站點模塊):
python teemo.py -d example.com
- 使用代理地址(默認會使用config.py中的設置):
python teemo.py -d example.com -x "http://127.0.0.1:9999"
- 啟用枚舉模式:
python teemo.py -b -d example.com
- 將結果保存到指定文件(默認會根據config.py中的設置保存到以域名命名的文件中):
python teemo.py -d example.com -o result.txt
參考
參考以下優秀的工具修改而來:
- https://github.com/ring04h/wydomain
- https://github.com/aboul3la/Sublist3r
- https://github.com/laramies/theHarvester
Thanks for their sharing.
Change Log
2017-08-17 : Update "domainsite" part, use logging to output; fix some bug. 2017-09-08 : Remove port scan function,leave it to nmap, add IP and Network analysis. 2018-04-03 : Add HackerTarget API 2018-04-04 : Add Censys API; Add function that to get "Related Domains" which base on Censys,Crt.sh and GoogleCert.
To Do
- 優化DNS查詢部分,抽象成一個函數
- 模糊匹配,例如包含"qq"的所有域名,比如qqimg.com
- 文件搜索
相關思維導圖
此外還可以使用子域名挖掘機,不過是在win下使用
see:https://github.com/euphrat1ca/LayerDomainFinder
https://dnsdb.io/zh-cn/search?q=youku.com 用這個也是可以查的
此外,https://crt.sh/?q=youku.com 可以查詢同一個證書下的子域名
--------------------
直接用搜索引擎搜索 site:主域名
在線子域名挖掘:
http://z.zcjun.com/
http://tools.bugscaner.com/subdomain/
子域名挖掘機:
鏈接:https://pan.baidu.com/s/1L2nheZUZhrx7NZSgLa97Uw
提取碼:so87
信息搜集-子域名挖掘
小剛127.0.0.1 2020-10-16 16:44:21 371 收藏 5
分類專欄: 信息搜集筆記 文章標簽: web安全 信息搜集
版權
作者:小剛
一位苦於信息安全的萌新小白帽,記得關注給個贊,謝謝
本實驗僅用於信息防御教學,切勿用於其它用途
子域名挖掘
域名
收集原理
網站和工具
1.在線子域名查詢https://phpinfo.me/domain/
2.一會兒~ https://dns.bufferover.run/dns?q=
3. https://dnsdumpster.com/
4.快速DNS rapiddns.io/subdomain
5.crt.sh 證書查詢
4.Layer子域名挖掘機
總結
域名
域名有級別之分,可以分為頂級域名(一級域名)、二級域名、三級域名、多級域名
二級三級和多級則是此網站的子域名。
舉個例子啊
頂級域名:pornhub.com
二級域名:www.pornhub.com; rtsp.pornhub.com;fr.pornhub.com
三級域名:ams.upload.pornhub.com
多級域名以此類推~
為什么要收集子域名?
通常來說,一個網站的主站防御力非常強的,而他們的非主站則相對較弱,俗話說蒼蠅不叮無縫的蛋 ,柿子還得挑軟的捏,我們通過收集的子域名進行擴大攻擊范圍,從子站入手,進一步滲透測試更加容易成功。
收集原理
1.字典爆破
字典爆破就是通過收集來的字典,拼接到頂級域名前面,然后通過自動化工具進行訪問,判斷返回結果,從而跑出子域名是否存在。
爆破處理接貨主要是依賴於字典的精准度,一本好的字典可以讓你事半功倍。
2.DNS信息收集
DNS原理就是搜集DNS的解析歷史,通過查詢dns記錄來獲取到對方的解析記錄,從而獲取到子域名,正常來說你的域名經DNS解析過一般就會搜到。
3.證書查詢
通過HTTPS 證書,ssl證書等搜集子域名記錄。
4.爬蟲提取子域名
可以利用爬蟲從頁面源代碼中提取子域名。
網站和工具
在這介紹我平時用到搜索子域名的網站和工具。
為啥要用好幾個工具?
當你的字典精度不高時,你搜集的信息是不完整的,我的方法是通過網站和本地跑字典,然后去重整合結果
1.在線子域名查詢https://phpinfo.me/domain/
使用比較多的一個在線爆破子域名網站。
在這里插入圖片描述
2.一會兒~ https://dns.bufferover.run/dns?q=
一款DNS在線查詢網站,需要在url后面拼接所要收集的網站
在這里插入圖片描述
3. https://dnsdumpster.com/
dns偵查和研究,查找和查找dns記錄
在這里插入圖片描述
4.快速DNS rapiddns.io/subdomain
在這里插入圖片描述
5.crt.sh 證書查詢
https://crt.sh/
一款通過證書查詢子域名的網站
在這里插入圖片描述
4.Layer子域名挖掘機
一款非常好用的Win平台工具
在這里插入圖片描述
總結
最好找幾個比較好的網站和工具,最后將結果去重組合,這樣的子域名查詢比較全面。
獲得Layer子域名挖掘機
可關注微信公眾號:XG小剛
回復:Layer或子域名挖掘機
————————————————
版權聲明:本文為CSDN博主「小剛127.0.0.1」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/weixin_43221560/article/details/109118270