PwnSTDIO2026 · Easy

Wakeup // Dream Monitor

STDIO2026_Pwn_Wakeup_Buffy

I solved this in competition, but leaned on AI to get there. This lab is me actually learning how it works.
The big idea

When a program checks a condition and acts on it later, the gap between "check" and "use" is where the bug lives.

Every console shares one server-side session. The WAKE command checks "am I at depth 0?" at one moment, but uses that decision later when you submit a name — a TOCTOU bug. Open two consoles: arm WAKE on B at depth 0, then DIVE on A to push the shared depth to 1 while B's name prompt is still open. The check already passed, the kick misses, and you drop into a BusyBox shell.

Interactive lab

  1. 1Arm WAKE at depth 0
  2. 2Win the race: depth 1 while armed
  3. 3Submit the name shell + flag
Hint: The naive path (SLEEP DIVE DIVE WAKE) is rejected. Win by splitting the check from the use: A: SLEEP B: WAKE A: DIVE B: submit name. Or hit auto-solve to watch it.
shared session depth
0
0
1
2
3
wake check
allowed
Console A
Console B
Two consoles, ONE shared dream. WAKE only works at depth 0.
Goal: land a shell as user1 and read /home/user1/flag1.
The race, in one picture
time ──>
A: SLEEP ──── DIVE ───────────────> idle
B: ──── WAKE ──────── submit "tester" ─> shell
└ check passes └ depth now 1, kick misses
depth 0 (check) ───────> depth 1 (use)
The flag
STDIO2026{2261d535-80f4-4369-a06b-27db4167ca08_[TEAMHASH]}
Next write-up
Songkran Photo Gallery
SecDigest | CyberSec & Tech Intelligence