· 3 min read · by Eav Puthcambo
When the provided solver is a trap
A Windows crackme ships two "reference" scripts that reimplement its VM. Both are wrong, because they hardcode a seed that real startup code computes. The fix is to stop reimplementing and emulate the real thing.
cr4ck 3 (Serial), LYKN CTF 2026 (reversing)
Serial.exe is a Windows dialog app: type a serial of the form LYKNCTF{ + 24 chars + }, hit a button, get a verdict. Behind it is a bytecode VM gated by a self-hash of its own .text section.
What makes this one interesting is that the challenge shipped two Python scripts that reimplement the VM statically, crack.py and debug.py, as if to help you. They're both broken.
Why the reference scripts never work
Brute-forcing against those scripts never produces a match. Tracing them shows a keystream desync and a wrong per-character offset, but the real root cause is deeper: both scripts hardcode the VM's initial seed (r15d = 0xc499790f), and that's simply wrong.
The real seed is derived from a global constant, 0xB16B00B5, written by startup code that runs before main. If you only emulate the check function in isolation, that code never executes, so the seed is never set correctly. The reachable value for position 0 just doesn't contain the target under the hardcoded seed, no matter what byte you try. The provided "help" is a dead end by design.
Emulate the real binary instead
Rather than keep patching a broken reimplementation, I built a Unicorn emulator of the actual executable and used it as an oracle:
- map the PE, a stack, and a fake TEB/PEB (the check does a PEB anti-debug probe internally, so the emulation has to not crash on it)
- stub
GetDlgItemTextAto hand back my candidate serial, andMessageBoxAto capture the verdict - drive the dialog procedure directly with a synthetic "button pressed" message instead of running a real message loop
This runs the genuine startup code too, so the seed is correct without me ever having to figure out its formula.
The progress oracle
The VM runs in constant time per character, so timing tells you nothing. But the outer comparison loop bails at the first wrong character and writes that index to a fixed global. That global is exactly "how many leading characters are correct", which is all a character-by-character brute force needs:
for pos in range(24):
for ch in printable: # 0x20..0x7e
serial[pos] = ch
prog, ok = run(serial)
if ok: break
if prog > best: best, keep = prog, ch
serial[pos] = keep
24 positions, about 95 candidates each, one emulator run per try. A few minutes, fully deterministic, no guessing:
Dyn4m1c_0nly_LYKN_2026!!
The flag is a wink at the lesson: the static reference was broken, and solving it meant going dynamic. When a challenge hands you a reimplementation, the reimplementation can lie. The real binary can't.
📂 Full writeup with the Unicorn oracle and the brute force: ctf-writeups/reverse/…/cr4ck 3
Read more 
Beating the final bosses of a 12-level crackme series
The last two levels of Lack's Windows crackme series add anti-debug tricks, a jump-table VM, and a 152-part license key. All of it falls to reading the code instead of running it.
Don't reverse the VM, just run it
A reversing challenge hides its password check inside a bytecode VM dispatched through a SIGTRAP handler. Instead of decoding it by hand, emulate it and watch which bytes each constraint touches.
Skipping a 6-day puzzle by emulating the last 3 numbers
An ARM64 Mach-O crackme gates its flag behind a dozen conditions across six in-game days. The flag builder only reads three small integers, so you can emulate it and ignore the puzzle entirely.