Writeup: reversing a custom VM in last weekend's CTF
The rev challenge implemented a small stack VM with 23 opcodes. Here's how I recovered the instruction set in Ghidra and wrote a disassembler in ~80 lines of Python.
Spoilers ahead if you haven't solved it yet.