$ cat writeup.md…
$ cat writeup.md…
asisctf2026
Task: a custom QEMU-based architecture boots a ROM that validates a 44-byte flag through a bespoke 16-bit VM transform. Solution: recover the ISA from the emulator, lift the 10-round algorithm, and invert the full target state instead of abusing the lossy final checksum.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
No separate organizer description was preserved in the local task files.
The challenge ships two artifacts: challenge.rom and qemu-asisarch. The goal is to understand the custom architecture well enough to recover the scoreboard-valid flag, not just any locally accepted collision.
The task title already suggests a custom architecture challenge, and the provided emulator confirms it. The important starting point was the ROM loader inside qemu-asisarch.
The emulator main validates the ROM header before execution:
AARQ0x020x10000rom[0x20:] seeded with 0x31415926That immediately shows this is not a normal firmware blob for a known CPU. The ROM payload is copied into a 64 KiB guest memory region and execution begins at guest PC 0x0000.
The recovered machine state layout was:
0x100100x100120x100180x0000So the architecture is a compact 16-bit VM implemented inside a stripped x86-64 QEMU binary.
Instructions are stored in encrypted 4-byte form. The emulator decrypts and dispatches them with three key tables:
.rodata+0x140 / VA 0x2140.rodata+0x160 / VA 0x2160.data.rel.roThe permutation rows are:
[0,1,2,3] [2,0,3,1] [3,2,1,0] [1,3,0,2]
Recovering the decode path was enough to rebuild the ISA used by the ROM.
From the emulator and ROM disassembly, the useful instructions were:
...
$ grep --similar