域名收集姿勢及一些補充


#子域名收集工具

1.Teemo

下載地址:https://github.com/bit4woo/teemo

提莫(teemo)是個偵察兵,域名的收集如同滲透和漏洞挖掘的偵察,故命名為提莫(Teemo)!

Teemo具有相關域名搜集能力,即會收集當前域名所在組織的其他域名。

特色:具有相關域名搜集能力,即會收集當前域名所在組織的其他域名。原理是通過證書中"Subject Alternative Name"的內容。

相信這部分功能和 domain_hunter 中類似域名的收集一樣有用!

該工具主要有三大模塊:

利用搜索引擎:

利用第三方站點:

  1. Alexa
  2. Chaxunla
  3. CrtSearch
  4. DNSdumpster
  5. Googlect
  6. Ilink
  7. Netcraft
  8. PassiveDNS
  9. Pgpsearch
  10. Sitedossier
  11. ThreatCrowd
  12. Threatminer
  13. Virustotal
  14. HackerTarget

whois查詢及反向查詢(接口需付費,暫未加入到主功能當中):

  1. https://www.whoxy.com/
  2. DOMAINTOOLS
  3. WHOISXMLAPI
  4. ROBOWHOIS
  5. ZIPWHOIS

利用枚舉

各API申請指引(非必要)

其中部分接口需要API Key,如果有相應賬號,可以在config.py中進行配置,沒有也不影響程序的使用

Google CSE(自定義搜索引擎):

Bing API:

Fofa:

  • 需要購買會員

Shodan:

  • 登陸后頁面右上角“show API key”

基本使用:

首先在python2環境下下載相關庫

 

 查看幫助:

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中的設置保存到以域名命名的文件中在目錄output下):

python teemo.py -d example.com -o result.txt

2.layer子域名挖掘機

下載地址:https://www.webshell.cc/?dl_id=18

 直接輸入域名,調整參數即可

 

 

#通過HTTPS證書日志搜集

1.https://transparencyreport.google.com/https/certificates?cert_search=domian:apple.com;include_subdomains:true&hl=zh-CN(需要代理)

 

 2.https://crt.sh/

 

 

 

 3.https://search.censys.io/

 

 4.https://scans.io/

 

 #通過解析記錄收集

1.通過接口https://www.virustotal.com/查詢

 

 2.通過接口https://www.netcraft.com查詢

 

 

 

 3.通過接口https://www.threatcrowd.org查詢

 

 #通過搜索引擎搜索

1.通過百度語法搜索

 2.通過bing搜索語法與百度一至

 3.通過http://www.exalead.com/search/web/搜索引擎查詢

 

 

 4.通過fofa引擎搜索

直接搜索域名或者ip即可

 

 5.利用Google搜所

利用語法site或inurl搜索

 

 

 6.通過https://yandex.com/搜索引擎查詢

 

 7.使用鍾馗之眼搜索引擎搜索

地址:https://www.zoomeye.org

 直接搜索ip或域名即可

 

 

 8.shodan搜索引擎

與fofa和鍾馗之眼搜索方法相同

 

 

 

#枚舉

1.subbrute(子域暴力破解)工具

項目地址:https://github.com/TheRook/subbrute

resolvers.txt里添加了2000多個高品質的域名服務器,這些域名服務器將會解決1秒之內的多個查詢。

 

 

 參數說明:

-a 列舉所有子域名相關地址

-v 調試輸出,幫助開發人員/黑客調試subbrute

-o 文件形式輸出結果.

-t 以換行符間隔輸出域名

使用方法:

簡單易用:
python subbrute.py google.com

多域名測試:
python subbrute.py google.com gmail.com blogger.com

以換行符間隔輸出域名:
python subbrute.py -t list.txt

三級域名:(例如: _xmpp-server._tcp.gmail.com):
python subbrute.py gmail.com > gmail.out
python subbrute.py -t gmail.out

 2.subDomainsBrute

 項地址:https://github.com/lijiejie/subDomainsBrute

python3.5及以上需安裝aiodns

python2需安裝 dnspython

 用法:

subDomainsBrute.py [options] target.com
Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -f FILE               File contains new line delimited subs, default is
                        subnames.txt.
  --full                Full scan, NAMES FILE subnames_full.txt will be used
                        to brute
  -i, --ignore-intranet
                        Ignore domains pointed to private IPs
  -w, --wildcard        Force scan after wildcard test fail
  -t THREADS, --threads=THREADS
                        Num of scan threads, 256 by default
  -p PROCESS, --process=PROCESS
                        Num of scan Process, 6 by default
  -o OUTPUT, --output=OUTPUT
                        Output file name. default is {target}.txt

 

 

 #利用漏洞

1.zone transfer域傳送漏洞

基本原理:通過nslookup查詢到權威服務器,然后判斷是否有漏洞

nslookup 
set type=soa
xx.com

server ns.xx.com

ls -d xx.com

2.工具zZone-Transfer利用:

項目地址:https://github.com/Xyntax/zZone-Transfer

獲取網站列表

 python get_url.py

 

 漏洞利用:

3.工具DNS_Transfer_Check

 項目地址:https://github.com/cc06/DNS_Transfer_Check

一個用來批量檢測網站是否存在域傳送漏洞的Python腳本

支持單個檢測和批量檢測:

python dns_transfer_check.py

 4.工具xfr_scanner

 項目地址:https://github.com/LeoHuang2015/xfr_scanner

調用dnspython庫進行xfr查詢
xfr查詢比較耗時,把NS查詢和xfr查詢進行了分離,xfr使用多線程

 

 5.工具DNS_AXFR_Client

項目地址:https://github.com/lijiejie/DNS_AXFR_Client/

使用方法:

python axfr_client.py {DNS sever} domain

#whois查詢

1.站長之家whois查詢

 

 2.https://lookup.icann.org/lookup

 

 # IP反查域名

https://dns.aizhan.com/

 

 #一點補充

 cdn查詢接口:https://tools.ipip.net/cdn.php

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
 
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM