牧陽能控股份有限公司 資訊洩漏達成 RCE - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2024-00017
  •  發信 Vendor: 牧陽能控有限公司
  • Title: 牧陽能控股份有限公司 資訊洩漏達成 RCE
  • Introduction: 掃出 config.py 可以進一步地利用來達成 RCE

處理狀態

目前狀態

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

處理歷程

  • 2024/01/11 19:20:17 : 新提交 (由 Marco 更新此狀態)
  • 2024/01/16 16:08:41 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/01/18 16:55:04 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/01/18 16:55:04 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/01/18 16:55:04 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/01/19 13:37:52 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/01/19 13:37:52 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/01/19 13:37:52 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/01/25 17:03:01 : 複測申請中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2024/01/25 18:10:10 : 確認已修補 (由 Marco 更新此狀態)
  • 2024/01/29 03:00:11 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2024-00017
  • 通報者:mlgzackfly (Marco)
  • 風險:嚴重
  • 類型:遠端命令執行 (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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

http://www.greenshepherd.com.tw/manifest.json
https://storage.googleapis.com/static.greenshepherd.com.tw/

敘述

先看 http://www.greenshepherd.com.tw/manifest.json 的 Response

{
   "theme_color":"#44b273",
   "name":"牧陽能控",
   "gcm_sender_id":"482941778795",
   "start_url":"/afu.html",
   "gcm_sender_id_comment":"Do not change the GCM Sender ID",
   "background_color":"#44b273",
   "icons":[
      {
         "src":"https://storage.googleapis.com/static.greenshepherd.com.tw/img/logo.png",
         "type":"image/png",
         "sizes":"128x128"
      },
      {
         "src":"https://storage.googleapis.com/static.greenshepherd.com.tw/img/logo.png",
         "type":"image/png",
         "sizes":"256x256"
      }
   ],
   "short_name":"牧陽能控",
   "display":"fullscreen"

可以注意到 logo 的儲存位置為https://storage.googleapis.com/static.greenshepherd.com.tw/

再連結到該網址,注意到有 config.py 檔案,可以透過 https://storage.googleapis.com/static.greenshepherd.com.tw/config.py 將檔案下載
圖片

下載後查看檔案內容能夠得知資料庫詳細資訊
圖片

可以透過 sql shell 做進一步的使用來達成 RCE

擷圖

留言討論

聯絡組織

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