CTF校队暑期练习2021.7.10
CTF题目 July. 10th 2021
Glory of the Garden
This garden contains more than it seems.
Hint: What is a hex editor?
下载下来一张.jpg图片:garden.jpg
查看二进制,flag在最末尾。
Super Serial
Try to recover the flag stored on this website
http://mercury.picoctf.net:42449/http://jupiter.challenges.picoctf.org:44924/
Hint: The flag is at ../flag
查看robots.txt文件,里面有个/admin.phps。这个文件并不存在,但他指明了一个后缀:.phps
访问index.phps,又能看见其中有require_once("cookie.php");
和header("Location: authentication.php");
,所以去查看cookie.phps、authentication.phps。
cookie.phps中有检验账号密码的函数,都是预编译,SQL注入不能。
cookie.phps存在一对try-catch,里面有反序列化cookie的login字段的代码,紧接着调用成员方法。在catch部分中打印了一个变量。
authentication.phps中有access_log类,__toString()魔术方法能打印自身成员变量所对应文件的内容。如果我们让它被反序列化,然后因为没有对应的成员方法导致被catch捕捉,打印自己时就会调用__toString()方法。
构造好用来反序列化的字符串O:10:"access_log":1:{s:8:"log_file";s:7:"../flag";}
,然后依次进行Base64编码,URL编码。放在cookie的login字段中用Fiddler发送过去,拿到flag。
Milkslap
这个emoji上有一个网页链接,网站中有一张长图,保存下来:concat_v.png
在Kali下用sudo gem install zsteg
安装zsteg工具。
运行zsteg concat_v.png
拿到flag。
Shop
Best Stuff - Cheap Stuff, Buy Buy Buy… Store Instance: source.
The shop is open for business at
nc mercury.picoctf.net 37799
.
这道题买到Fruitful Flag就能拿到flag。Fruitful Flag价值100,初始金币只有40。
但可以买负数个,花负数的硬币,但有一个限制,所花掉硬币数目的绝对值要小于当前拥有硬币的绝对值。
输入:
1
-2
1
-2
2
1
得到:
Flag is: [112 105 99 111 67 84 70 123 98 52 100 95 98 114 111 103 114 97 109 109 101 114 95 53 57 49 97 56 57 53 97 125]
用CyberChef的From Decimal功能拿到明文。
- Author: HuaHuaY
- Link: https://www.huahuaorz.com/post/CTF%E6%A0%A1%E9%98%9F%E7%BB%83%E4%B9%A0/CTF%E6%A0%A1%E9%98%9F%E6%9A%91%E6%9C%9F%E7%BB%83%E4%B9%A02021.7.10/
- License: This work is under a 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. Kindly fulfill the requirements of the aforementioned License when adapting or creating a derivative of this work.