Shodan搜索引擎介紹

         修碼的馬修        ·        2014/06/30 15:35


from:http://www.exploit-db.com/wp-content/themes/exploit/docs/33859.pdf


0x00 概要


這篇文章可以作爲***測試人員和安全工作者運用Shodan搜索引擎的指南,同時有助於理解其工作原理和達到安全審計目的。文章也列舉出找到大量有 風險的互聯網服務及其設備的步驟和方法。同時介紹了Shodan能用初級篩選語法以及Shodan和其他工具的聯合運用。主要適用於***測試的數據收集階 段。

0x01 介紹


Shoudan是一個用於幫助發現主要的互聯網系統漏洞(包括路由器,交換機,工控系統等)的搜索引擎。它在圈子裏就像google一樣出名。它主要攔截從服務器到客戶端的元數據來工作,目前提供超過50個端口的相關搜索。

Shodan能找到的設備:

1.服務器
2.路由器
3.交換機
4.公共ip的打印機
5.網絡攝像頭
6.加油站的泵
7.Voip電話和所有數據採集監控系統

Shodan能做的:

1.用戶搜索制定的項目
2.Shodan尋找端口並攔截數據
3.Shodan爲攔截的數據設置索引
4.顯示結果

Shodan和google的區別:

Google的爬蟲/蜘蛛 抓取網頁數據併爲網頁內容創建索引,然後更具page rank顯示結果。Shoudan主要尋找端口並抓取攔截到的信息,然後爲它們建立索引,最後顯示結果。Shoudan並不像google那樣爲網頁內容建立索引,因此它是一個基於攔截器的搜索引擎。

0x02 基礎用法


City:用於尋找位於指定城市的設備。例:

iis city:New York

County:用於尋找位於指定國家的設備。例:

iis country: United States

Port:限定指定的端口。例:

https port:443

Os:用於尋找特定的操作系統。例:

microsoft-iis os:"windows 2003"

Geo:根據經緯度和指定的半徑來返回結果。只能有2個或3個參數,第三個參數是半徑,默認數值之5km。例:

 apache geo:42.9693,-74.1224

Net:用於尋找指定ip地址和子網掩碼的設備。例:

 iis net:216.0.0.0/16

Hostname:用於搜索包含指定域名的主機。例:

Akamai  hostname:.com

After and Before: 幫助找到指定日期範圍的設備。格式:dd/mm/yyyy dd-mm-yy 例:

apache before:1/01/2014       
nginx after:1/01/2014

注意:登陸後大多數參數都能運作。

0x03 Shodan和其他工具的結合


1.和Maltego的結合

需要:從http://www.paterva.com/web6/products/download.php下載Matlego。

https://static.Shodan.io/downloads/Shodan-maltego-entities.mtz

下載Shodan的matlego目錄

用法:

1.安裝maltego之後,選擇‘Manage tab’裏的 ‘Manage Entities’ ,然後選擇‘import’。
2.選擇 ‘transforms’ 然後是‘advanced’

enter p_w_picpath description here

3.現在可以添加Shodan的鏈接https://cetas.paterva.com/TDS/runner/showseed/Shodan

enter p_w_picpath description here

4.最後我們可以看到安裝成功的窗口

enter p_w_picpath description here

注意:需要你有Shodan的API keys,可以在maltgo進行Shodan的使用,API keys在你登陸Shodan賬戶時候是可以獲得的。

2.和metasploit的結合

用法:

1.在Kail/Backtrack Box中打開Metasploit framework

enter p_w_picpath description here

2.在命令行中輸入show auxiliary

enter p_w_picpath description here

3.使用 auxiliary/gather/Shodansearch 模塊

enter p_w_picpath description here

4.現在,你可以用show options命令來查看模塊需要的參數

enter p_w_picpath description here

5.我們需要指定iis來搜索iis服務器,還需要登陸Shodan賬戶後得到的API key。現在我們可以用Run command 來執行命令。

enter p_w_picpath description here

enter p_w_picpath description here

一般來說 auxiliary/gather/Shodan_search模塊通過API向數據庫查詢前50個ip 地址。50個ip地址的限制可以通過購買無限制API key來擴大到查詢10000個ip地址

0x04 Shodan的組件


1.Exploits:Shodan Exploits 能夠用於在ExploitDB 或Metasploit尋找針對不同系統、服務器、平臺、應用的的exploits。

enter p_w_picpath description here

2.Maps:這是個付費功能,我們能在地圖上直觀地看到Shodan提供的結果。提供三種視圖:衛星,街景(淺),街景(深)。可以同時在屏幕展示超過1000個結果。

enter p_w_picpath description here

3.)Scanhub:Shodan Scanhubs可以用於創建陌生網絡的搜索,它支持Nmap 和 Masscan類似的工具。要使用Scanhub,我們首先要設置好工具,輸出一個XML格式的文件並上傳到Scanhub的庫裏以獲得結果。不幸的是這 也是一個付費功能。

0x05 一些測試的例子


1. Netgear設備

enter p_w_picpath description here

2. 網絡攝像頭

enter link description here

3. 比特幣服務器

enter p_w_picpath description here

4. Ruby on Rails Vulnerable Server(CVE-2013-0156 and CVE-2013-0155)

enter p_w_picpath description here

5. Windfarms:

enter p_w_picpath description here

6. DNS 服務:

enter p_w_picpath description here

0x06 一些另外的cheat sheet 鏈接


http://www.Shodanhq.com/?q=bitcoin-mining-proxy (Bitcoin proxy mining) http://www.Shodanhq.com/search?q=port%3A11 (Systat) http://www.Shodanhq.com/search?q=port%3A8089+splunkd (Splunk servers on tcp/8089) http://www.Shodanhq.com/search?q=port%3A17(Search for quote of the day) http://www.Shodanhq.com/search?q=port%3A123(Ntp monlist) http://www.Shodanhq.com/search?q=port%3A5632 (Vnc) http://www.Shodanhq.com/search?q=port%3A1434 ((MS-SQL (1434)) http://www.Shodanhq.com/search?q=OpenSSL%2F1.0.1 (Servers running OpenSSL/1.0.1) http://www.Shodanhq.com/search?q=port%3A79 (Finger protocol) http://www.Shodanhq.com/search?q=port%3A15 (Netstat) http://www.Shodanhq.com/?q=telemetry+gateway (Telemetry gateway)
http://www.Shodanhq.com/?q=port:161+country:US+simatic (Simatic automation system o 161 running in US)

           收藏                    

           


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章