squ1rrel CTF 2025
比赛地址:squ1rrel CTF 2025
比赛时间:5 Apr 2025 7:00 CST - 7 Apr 2025 1:00 CST
复现的题目用🔁标注
Misc
🔁Pretty Please 🥺
Challenge
misc/Pretty Please 🥺
author: lemonlad
This friendly little fellow is guarding the flag! Employ your wits and wiles to convince him to give it to you.
Solution

打开开发者工具抓包发现我们向服务器发送了所有的历史消息
1  | {  | 
因此我们可以进行上下文欺骗攻击——给这个接口发送伪造的上下文信息(脚本来自这篇writeupsqu1rrelctf2025-writeups)
1  | import requests  | 
response 如下:
1  | f:{"messageId":"msg-iLPn6303nA2O06FZkKoV8Cpy"}  | 
1  | squ1rrel{w0w_s0_p0lit3}  | 
🔁Chicken Treasure Hunt
Challenge
misc/Chicken Treasure Hunt
asbestos
Chicken has given you a treasure map to find the flag!
Hint: Chicken’s favorite color is red Hint 2: A treasure map tells you where to look Hint 3: Count non-white pixels as black


Solution
脑洞有点大,我一开始还误以为是要用 Steg Solver 的 Image Combiner 解题
根据提示1要猜到信息藏在红色通道的最低有效位中
根据提示2要猜到只处理图片 suspicious_chicken 中在图片 treasure map 黑色部分对应位置的像素点
提示3暗示图片 treasure map 的像素点是非黑即白的
exp 代码来自Discord的群消息

1  | import cv2  | 

1  | squ1rrelctf{why_w0u1d_u_fo11ow_4_chicken}  | 
web
emojicrypt
Challenge
web/emojicrypt
author: nisala
Passwords can be more secure. We’re taking the first step.
Solution
这题要求我们注册一个账户。密码由后端生成,我们需要“猜”出生成的密码才能登录并获取 flag 。通过审查后端代码,我们发现 generate_salt() 函数使用了 random 库来生成盐值。众所周知,没有明确指定种子时,random库默认使用当前时间戳作为种子,这里显然存在漏洞。  
利用策略如下:
- 首先,使用 
/register接口创建一个新用户,并记录注册时的时间戳。 - 然后,枚举注册时间戳前后 60 秒内的每一秒。
 - 对于每个候选时间戳:  
- 使用 
random.seed(seed)将其设置为随机种子 - 重新生成盐和随机密码
 - 尝试使用生成的密码登录
 
 - 使用 
 - 如果响应页面包含关键字
squ1rrel,立即终止暴力破解。 
exp 如下:
1  | import requests  | 
然后得到以下输出:
1  | [+] User Ar1st0re registered successfully.  | 

1  | squ1rrel{turns_out_the_emojis_werent_that_useful_after_all}  | 
acorn clicker
Challenge
web/acorn clicker
author: kyle
Click acorns. Buy squirrels. Profit.
Solution
在代码审计过程中,我发现 flag 存储在变量 FLAG 中。进一步调查显示,获取 flag 需要消耗 999999999999999999 Acorns 购买极其昂贵的 flag_squirrel 。  
Acorn 的获取方式是通过点击 “Acorn” 按钮向 /api/click 发送请求。但分析 /api/click 接口代码发现, amount 参数被限制为 ≤10 的整数。编写脚本暴破显然不现实,于是我尝试通过设置 amount 为 -1 来触发整数溢出漏洞。  
首先需要注册账号并登录以获取包含认证令牌的请求头。

exp 如下:
1  | import requests  | 

然后我们可以购买flag_squirrel来获取flag。  

1  | squ1rrel{1nc0rr3ct_d3s3r1al1zat10n?_1n_MY_m0ng0?}  | 
- 标题: squ1rrel CTF 2025
 - 作者: Aristore
 - 创建于 : 2025-04-11 22:30:00
 - 更新于 : 2025-11-03 19:54:39
 - 链接: https://www.aristore.top/posts/squ1rrelCTF2025/
 - 版权声明: 版权所有 © Aristore,禁止转载。