跳至主要内容

SQL Injection Stationer Success

前言

  • 本文是 https://zeroday.hitcon.org/vulnerability/ZD-2025-01101 的延伸
  • 目標: https://xl-stationer.com.tw/_Models/mItemList.asp?ClsId=1&ClsUpId=&Name=123123&PriceMax=&PriceMin=0&RoomId=&orderby=2&page=1&sty=
  • 可控制每個參數
  • 這個 API 回傳的是 JSON 列表,有機會達成 UNION SELECT

學到的東西

  1. top 100 percent => 等於全選
  2. 不能用 (, ), =, >, < 的情況,可以用以下方式來提取資料
  • column_name LIKE '%25SearchString%25'
  • 1/not-number-column_name
  1. 不能用 . 的情況,可以用 SELECT name FROM sysobjects WHERE xtype LIKE 'U' 來提取 table_name