SQL Injection - Blind - Boolean-Based注入思路

靶机:bWAPP

bug:SQL Injection - Blind - Boolean-Based

难度等级:low


  1. 这是基于布尔型的盲注。首先使用“Man of Steel”、“Man of Steel' and 1=1#”测试发现,返回的信息都为“The movie exists in our database!”,当输入“Man of Steel' and 1=2#”,返回 “The movie does not exist in our database!”,说明此处存在注入。除此之外还说明后台对单引号、井号、空格、等于号没有进行过滤。
  2. 爆破数据库名称  。首先猜解出数据库名称的长度。“Man of Steel' and length(database())=1#”,可以结合burpsuite自动化猜解数据库名称的长度。知道数据库名称的长度后,猜解数据库的名字。“Man of Steel' and ascii(substring(database(),1,1))=50#”,对每数据库的每一位字符进行猜解。(本想使用“Man of Steel' and substring(database(),1,1)=a#”,结果老是出错,查阅资料发现加入ascii函数后能解决这个问题。)
  3. 爆破表名称。“Man of Steel' and exists(select * from tables_name)#”,结合burpsuite以及常用数据库表名字典,破解出存在users表。
  4. 爆破列名。“Man of Steel' and exists(select column_name from users)#”,结合burpsuite以及常用列名称字典,破解出存在id、password、login、admin、secret等列名。
  5. 猜解列对应的值(以password为例)。首先猜解出password有多少位,“Man of Steel' and (select length(password) from users limit 1)=length of password#”,表中第一条记录中password的位数。位数猜解出来后,按位猜解每一位的字符,“Man of Steel' and (select ascii(mid(password,1,1)) from users limit 1)=2#”,猜解每一位字符对应的ASCII码。
  6. 同第五步,可以猜解出其他列。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值