沙滩,大海,阳光,群岛,海鸥…… 但那和你这个桥梁工程师又有什么关系呢? 题目地址:39.96.19...

Erstellt am: 10. Mai 2026

Beantwortet mit GPT-5.5 Thinking von Chat01

Frage

pwn_bridge.tar.gz

沙滩,大海,阳光,群岛,海鸥……
但那和你这个桥梁工程师又有什么关系呢?
题目地址:39.96.193.120:9999

Gedanke

Exploring potential exploit steps

It looks like disassembly misaligned at 652b, but that’s not a huge issue. Reaching the target ASCII "灰烬岛" seems impossible. Maybe the “unlock by legend” idea with "月球" isn’t working due to the separate "legend list”. I’m thinking using the note menu might not be final, but a code exception could trigger something useful before authentication. Something like throwing a bad cast due to a missing locale facet might be worth considering. It’s definitely tricky, though.

Thought for 24m 42s

Antwort

这题的“桥梁工程师”关系基本确认了:外层是修桥小游戏,目标是把桥修到月球;到达月球后会跳进隐藏 note 菜单,真正 pwn 点在 note 菜单的堆漏洞。

我这里的进展如下:

关键结论

程序保护:

text
PIE + NX + Canary + Full RELRO seccomp 禁止 execve / execveat

所以最终不能 system("/bin/sh"),要走 ORW 读 flag。

启动逻辑里会生成两个随机密码账号:

text
test -> 权限 2 pl1 -> 权限 1 你的注册账号 -> 权限 0

密码由 std::random_device("default") 播种,跑本地每次都变;重复注册 test 也只会得到权限 0,不能直接提权。

游戏逻辑

进入游戏需要权限 > 0。游戏里:

  1. Data Reef 会触发月球传说,并把 月球 置为可建桥目标。
  2. 月球 坐标是固定的,大概是 (20000, 20000),普通建桥费用约 27000,正常材料总量远远不够。
  3. superadmin 岛有“自动工兵”终端,可以免费建一座桥。
  4. 但是输入 月球 时会因为中文字节 isprint() 判定失败,hash 变成 -1,结果优先匹配第一个已解锁中文岛,一般是 灰烬岛,所以终端不能直接连到月球。

隐藏入口在这里:

asm
44d4: cmp ebx, 0x3f ; 当前岛屿 index == 63,即月球 44e4: jne 669d ; 月球已解锁则跳到隐藏逻辑 66b0: call bf20 ; note 菜单

真漏洞:隐藏 note 菜单 UAF / double free

bf20 是隐藏 note 菜单:

text
1.add note 2.delete note 3.view note 4.edit note

漏洞很明确:

c
free(notes[idx]); // 没有 notes[idx] = NULL // size 也没有清掉

所以有:

text
delete 后还能 view -> UAF leak delete 后还能 edit -> UAF write 重复 delete -> double free / tcache poison

利用方向:

text
1. large chunk free 后 view 泄露 libc 2. small chunk free 后 view 泄露 heap / safe-linking key 3. tcache poisoning 做任意地址分配 4. 因为禁了 execve,最后不能打 system,要做 ORW: open("flag", 0) read(fd, buf, size) write(1, buf, size)

目前卡点

我这边无法连通远端:

text
39.96.193.120:9999 -> Connection refused

本地分析确认了隐藏 note 和堆洞,但还没拿到一个完整远端可打通的链。最大的未解点是:如何在没有随机密码的情况下进入游戏,或如何绕过“月球无法正常到达”的逻辑限制。

如果按目前逆向结果看,题目的核心链应该是:

text
拿到/绕过权限 -> 进入修桥游戏 -> Data Reef 解锁月球 -> 设法到达月球 -> 进入隐藏 note -> UAF / tcache poisoning -> seccomp 下 ORW 读 flag

最值得继续挖的点是两处:

text
1. 登录阶段是否能异常跳转到 bf20 0x66b0 前面有隐藏 call bf20,可能和异常/清理路径有关。 2. 游戏里是否能污染 current island index / adjacency matrix 目标是把 current index 变成 63,或者直接造出到月球的边。

我不建议先写堆利用,因为 note 入口还没稳定触达;应先把“权限/到月球”这一步打通。

Diesen Q&A teilen