Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2022-00004
- Vendor: 塔魚手札
- Title: 塔魚手札網站參數存在SQL injection
- Introduction: 網站參數存在SQL injection
處理狀態
目前狀態
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2022/01/04 23:55:19 : 新提交 (由 P@ssw0rd 更新此狀態)
- 2022/01/04 23:56:38 : 新提交 (由 P@ssw0rd 更新此狀態)
- 2022/02/16 22:39:22 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/02/18 15:43:10 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/02/18 15:43:10 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/02/18 15:43:10 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/03/20 03:00:04 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2022-00004
- 通報者:wucy0612 (P@ssw0rd)
- 風險:高
- 類型:資料庫注入攻擊 (SQL Injection)
參考資料
漏洞說明: OWASP - SQL Injection
https://www.owasp.org/index.php/SQL_Injection
漏洞說明: OWASP - Top 10 - 2017 A1 - Injection
https://www.owasp.org/index.php/Top_10-2017_A1-Injection
漏洞說明: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
https://cwe.mitre.org/data/definitions/89.html
防護方式: OWASP - SQL Injection Prevention Cheat Sheet
https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet
相關網址
https://www.towerfish.tw/towerfish_admin/plug/CKEdit/ckfinder/ckfinder.html
https://www.towerfish.tw/upload/files/20220104.txt
敘述
https://www.towerfish.tw/news_detail.php?id=2%27
帶入sqlmap驗證
Parameter: #1* (URI)
2個資料庫
towerfis_db
information_schema
資料表
管理者帳密(密碼未完成解密)
那試試看帳密如有設一樣有沒有可能呢? 果真.... 不要再用相同的密碼(annie0618)囉
與sqlmap得到的兩組帳號一樣
可以新增管理者帳號towerfish
目錄瀏覽(原則上都.....沒有限制)
https://www.towerfish.tw/images/
https://www.towerfish.tw/dist/
....
管理區亦可以目錄瀏覽
https://www.towerfish.tw/towerfish_admin/plug/
於是找到這個檔案 無須登入亦可以上傳檔案(如文字檔及圖檔)
https://www.towerfish.tw/towerfish_admin/plug/CKEdit/ckfinder/ckfinder.html
上傳檔案成功一個文字檔案
https://www.towerfish.tw/upload/files/20220104.txt
修補建議
1.處理SQLI: 參數過濾及禁止
2.目錄瀏覽: 關閉目錄瀏覽功能,查查 apache / nginx 的 disable directory 的方式
3.管理區非請勿入: 限制只有內網可以存取目錄
4.弱密碼: 管理者帳號annie0618為弱密碼(與帳號一樣),強烈建議改掉
5.套件安全性: CKFinder應該在管理者登入後才能使用,強烈建議進行權限判斷
6.刪除測試檔案20220104.txt及測試管理者帳號towerfish