台灣血管外科學會 AFD - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2019-01165
  •  發信 Vendor: 台灣血管外科學會
  • Title: 台灣血管外科學會 AFD
  • Introduction: AFD

處理狀態

目前狀態

公開
Last Update : 2019/12/15
  • 新提交
  • 已審核
  • 已通報
  • 已修補
  • 已複測
  • 公開

處理歷程

  • 2019/10/06 20:05:53 : 新提交 (由 SomeApple 更新此狀態)
  • 2019/10/06 20:25:13 : 新提交 (由 SomeApple 更新此狀態)
  • 2019/10/06 20:25:37 : 新提交 (由 SomeApple 更新此狀態)
  • 2019/10/06 22:47:12 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2019/10/07 14:18:23 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2019/10/07 14:18:23 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2019/10/07 14:18:23 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2019/12/04 11:58:21 : 複測申請中 (由 組織帳號 更新此狀態)
  • 2019/12/14 23:10:23 : 確認已修補 (由 SomeApple 更新此狀態)
  • 2019/12/15 03:00:05 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2019-01165
  • 通報者:jk82421 (SomeApple)
  • 風險:中
  • 類型:任意檔案下載 (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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

https://www.tsvs.org/dowfile.php?file=/etc/passwd&name=passwd

敘述

進到 download 的頁面後
把 URL 改成 https://www.tsvs.org/dowfile.php?file=/etc/passwd&name=passwd
即可下載系統檔案甚至 php 原始碼,還可以載入資料庫帳號密碼,極其危險
圖片
圖片
圖片

修補建議

1. 不透過 php 讓使用者下載檔案, 類似用靜態檔案的方式下載,例如: https://www.tsvs.org/download/file.pdf
2. 用白名單方式過濾路徑去下載
3. 用 id 的方式去下載, 別用路徑下載 類似 https://www.tsvs.org/dowfile.php?fileId=1 (但記得要阻擋 sql injection 不然也沒用)

擷圖

留言討論

聯絡組織

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