使用recon/domains-hosts/baidu_site模塊,枚舉baidu網站的子域數據庫
【實例3-1】使用recon/domains-hosts/baidu_site模塊,枚舉baidu網站的子域。具體操做步驟以下所示:本文選自Kail Linux滲透測試實訓手冊dom
(1)使用recon/domains-hosts/baidu_site模塊。執行命令以下所示:ide
[recon-ng][default] > use recon/domains-hosts/baidu_site測試
(2)查看該模塊下可配置選項參數。執行命令以下所示:網站
[recon-ng][default][baidu_site] > show optionsui
Name Current Value Req Descriptiongoogle
-------------- ---------------------- --------- -------------------------------------------------------spa
SOURCE default yes source of input (see 'show info' for details).net
[recon-ng][default][baidu_site] >orm
從輸出的信息中,能夠看到有一個選項須要配置。
(3)配置SOURCE選項參數。執行命令以下所示:
[recon-ng][default][baidu_site] > set SOURCE baidu.com
SOURCE => baidu.com
從輸出的信息中,能夠看到SOURCE選項參數已經設置爲baidu.com,本文選自Kail Linux滲透測試實訓手冊。
(4)啓動信息收集。執行命令以下所示:
[recon-ng][default][baidu_site] > run
---------
BAIDU.COM
---------
[*] URL: http://www.baidu.com/s?pn=0&wd=site%3Abaidu.com
[*] map.baidu.com
[*] 123.baidu.com
[*] jingyan.baidu.com
[*] top.baidu.com
[*] www.baidu.com
[*] hi.baidu.com
[*] video.baidu.com
[*] pan.baidu.com
[*] zhidao.baidu.com
[*] Sleeping to avoid lockout...
-------
SUMMARY
-------
[*] 9 total (2 new) items found.
從輸出的信息中,能夠看到找到9個子域。枚舉到的全部數據將被鏈接到Recon-NG放置的數據庫中。這時候,用戶能夠建立一個報告查看被鏈接的數據。
【實例3-2】查看獲取的數據。具體操做步驟以下所示:
(1)選擇reporting/csv模塊,執行命令以下所示:
[recon-ng][default] > use reporting/csv
(2)建立報告。執行命令以下所示:
[recon-ng][default][csv] > run
[*] 9 records added to '/root/.recon-ng/workspaces/default/results.csv'.
從輸出的信息能夠看到,枚舉到的9個記錄已被添加到/root/.recon-ng/workspaces/default/results.csv文件中。打開該文件,本文選自Kail Linux滲透測試實訓手冊如圖3.1所示。
圖3.1 results.csv文件
(3)從該界面能夠看到,枚舉到的全部子域。
用戶也能夠使用Dmitry命令,查詢關於網站的信息。下面將介紹Dmitry命令的使用。
查看Dmitry命令的幫助信息。執行命令以下所示:
root@kali :~# dmitry -h
Deepmagic Information Gathering Tool
"There be some deep magic going on"
dmitry: invalid option -- 'h'
Usage: dmitry [-winsepfb] [-t 0-9] [-o %host.txt] host
-o Save output to %host.txt or to file specified by -o file
-i Perform a whois lookup on the IP address of a host
-w Perform a whois lookup on the domain name of a host
-n Retrieve Netcraft.com information on a host
-s Perform a search for possible subdomains
-e Perform a search for possible email addresses
-p Perform a TCP port scan on a host
* -f Perform a TCP port scan on a host showing output reporting filtered ports
* -b Read in the banner received from the scanned port
* -t 0-9 Set the TTL in seconds when scanning a TCP port ( Default 2 )
*Requires the -p flagged to be passed
以上信息顯示了dmitry命令的語法格式和全部可用參數。下面使用dmitry命令的-s選項,查詢合理的子域。執行命令以下所示:
root@kali :~# dmitry -s google.com
Deepmagic Information Gathering Tool
"There be some deep magic going on"
HostIP:173.194.127.71
HostName:google.com
Gathered Subdomain information for google.com
---------------------------------
Searching Google.com:80...
HostName:www.google.com
HostIP:173.194.127.51
Searching Altavista.com:80...
Found 1 possible subdomain(s) for host google.com, Searched 0 pages containing 0 results
All scans completed, exiting
從輸出的信息中,能夠看到搜索到一個子域。該子域名爲www.google.com,IP地址爲173.194.127.51。該命令默認是從google.com網站搜索,若是不能鏈接google.com網站的話,執行以上命令將會出現Unable to connect: Socket Connect Error錯誤信息本文選自Kail Linux滲透測試實訓手冊。