smith&hsu存在反射型跨站腳本攻擊 - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2017-00775
  •  發信 Vendor: 御匯有限公司
  • Title: smith&hsu存在反射型跨站腳本攻擊
  • Introduction: 因GET參數未做過濾而產生反射型跨站腳本攻擊

處理狀態

目前狀態

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

處理歷程

  • 2017/09/14 00:08:23 : 新提交 (由 garytan 更新此狀態)
  • 2017/09/16 13:08:26 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2017/09/16 20:32:31 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2017/09/16 20:32:31 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2017/11/14 03:00:03 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2017-00775
  • 通報者:garytan (garytan)
  • 風險:中
  • 類型:反射型跨站腳本攻擊 (Reflected Cross-Site Scripting)

參考資料

攻擊者可經由該漏洞竊取使用者身份,或進行掛碼、轉址等攻擊行為。

漏洞說明: OWASP - Cross-site Scripting (XSS)
https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)

防護原則: OWASP - XSS (Cross Site Scripting) Prevention Cheat Sheet
https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet

防禦繞過方式: OWASP - XSS Filter Evasion Cheat Sheet
https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

https://www.smithandhsu.com/tw/list_promotion.php?opt_type=product&opt_name=%C6%F7%C3%F3
https://www.smithandhsu.com/tw/teadetail.php?shopingtype=product&product_no=2304B

敘述

opt_name, shopingtype, product_no
這三個參數皆未做過濾,而又會把內容呈現在html中
導致攻擊者可以利用這特點來插入惡意Javascript代碼
如以下Payload:
https://www.smithandhsu.com/tw/list_promotion.php?opt_type=product&opt_name=%C6%F7%C3%F3<script>alert(1)</script>
https://www.smithandhsu.com/tw/teadetail.php?shopingtype=product&product_no=2304B"><script>alert(1)</script>
圖片

修補建議

若惡意代碼是放置於body中,可以利用html entity的方式將GET的參數encode過,使攻擊者的惡意語法不能夠正常的執行。
若惡意代碼是放置於href中,可以利用URL encode的方式將GET的參數encode過,使攻擊者的惡意語法不能夠正常的執行。

參考連結:https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#XSS_Prevention_Rules_Summary

擷圖

留言討論

聯絡組織

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