高雄市立楠梓國民中學 反射型 XSS - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2017-00167
  • Vendor: 高雄市立楠梓國民中學
  • Title: 高雄市立楠梓國民中學 反射型 XSS
  • Introduction: 反射型 XSS

處理狀態

目前狀態

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

處理歷程

  • 2017/02/19 05:21:54 : 新提交 (由 鄉民 更新此狀態)
  • 2017/02/19 21:46:53 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2017/03/02 03:12:12 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2017/03/02 03:12:12 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2017/04/21 03:00:01 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2017-00167
  • 通報者:鄉民
  • 風險:低
  • 類型:反射型跨站腳本攻擊 (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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

http://www.ntjh.kh.edu.tw/main_01.php?month=02&year=2017
http://www.ntjh.kh.edu.tw/main_02.php?month=02&year=2017&page=lunch_list.php

敘述

未正確過濾不適當符號,就直接將資料顯示於頁面上,尤其日期格式應是固定的,應以白名單方式過濾。

  1. http://www.ntjh.kh.edu.tw/main_01.php?month=02&year=2017
    漏洞發生於「行事曆區塊」(圖1),
    將year或month直接替換任意的代碼即可:
    http://www.ntjh.kh.edu.tw/main_01.php?month=02&year=<script>alert(123)</script> (圖2)

  2. http://www.ntjh.kh.edu.tw/main_02.php?month=02&year=2017&page=lunch_list.php
    此為營養午餐菜單的介面,同樣發生在日期的部分 (圖3),
    直接插入於year或month即可:
    http://www.ntjh.kh.edu.tw/main_02.php?month=02&year=<script>alert(123)</script>&page=lunch_list.php (圖4)

擷圖

留言討論

;