BDSec CTF 2026 pwn writeup — two challenges solved covering Phantom Device a stripped x86-64 ELF menu-driven driver simulator whose duplicate-handle operation copies the descriptor without incrementing the object refcount so releasing one descriptor frees the chunk while the duplicate remains a valid read-write handle giving a use-after-free primitive that after a seven-device tcache-fill grooming sequence overlaps the freed device chunk with a newly-created session then leaks uid and nonce recovers the per-process cookie from checksum1 = rol64(uid ^ cookie, 17) ^ nonce ^ 0xa55aa55aa55aa55a and patches the session role to 0x1337133713371337 with the corrected checksum2, and Muktir Shongket a stripped x86-64 ELF that both verifies and JIT-translates a custom five-opcode bytecode (WAIT SIGNAL ROUTE END FREEDOM) where the verifier walks ROUTE targets only for in-bounds checks while the executor lowers ROUTE to an x86 jmp rel32 allowing a 12-byte hex payload 300220b8b01b4000ffd0c340 to jump into the 8-byte literal of a following SIGNAL order whose bytes decode to mov eax 0x401bb0 call rax ret invoking the internal flag-printing function of the non-PIE binary

BDSec CTF 2026 Pwn Writeup: 2 Challenges Solved

BDSec CTF 2026’s pwn track shipped two 100-point challenges that both hinge on the same class of bug — two components of the same program disagree about the meaning of one operation — but at completely different levels of the stack. Phantom Device is a menu-driven device-driver simulator where the duplicate handle operation copies the descriptor but does not update the object refcount, so release and duplicate disagree about how many live pointers exist. That mismatch drops a stale device handle over a session-object allocation and gives a read/write primitive that leaks the process cookie and forges the privileged role. Muktir Shongket is a custom-bytecode terminal where the verifier and the executor disagree about what a ROUTE order does: the verifier walks past it as metadata, the executor translates it into an x86 jmp rel32. That jump lands inside a later SIGNAL literal, whose bytes were never inspected as instructions, and calls the internal flag.txt printer at a fixed address in the non-PIE binary. ...

July 22, 2026 · 23 min · 4774 words · CyberSecurity Elite Team
Educational content for authorized testing only. · Disclaimer · Editorial Policy · Sitemap