Skip to main content
Challenges Mini-VM: serial-checking bytecode
Reverse engineering Expert Disassembling custom stack-VM bytecode and reverse-engineering the serial check Solves: 3

Mini-VM: serial-checking bytecode

Author: CyberSamSU
Points
160

Legacy software from the SamSU laboratory verifies its license serial in its own small virtual machine (SamVM). The program source is lost; only the bytecode file serial_check.svm remains. If the serial is valid, the VM itself prints the service key (flag); if invalid, it only outputs NO. Do not trust ready-made strings inside the file: some were left behind solely as decoys.

File format (little-endian): 'SVM1' | u16 code_len | u16 data_len | code | data. VM memory is 0x400 bytes: data is loaded starting at address 0x000, the entered serial is placed starting at 0x200 (14 ASCII characters XXXX-XXXX-XXXX, where X is an uppercase Latin letter or digit, followed by a 0 byte), and the region from 0x300 onward is free working memory. The program starts at address 0. Stack elements are 32-bit unsigned integers (all arithmetic is modulo 232). A two-operand instruction takes b (top of stack) and a, and returns a OP b. Shift and rotation amounts are b & 31.

CodeNameOperandMeaning
00NOP-hech narsa
01PUSHu32sonni stekka qo'yish
02POP-stek uchini tashlash
03DUP-stek uchini takrorlash
04SWAP-ikki yuqori elementni almashtirish
05..0AADD SUB MUL XOR AND OR-a OP b
0B 0C 0DSHL SHR ROL-a ni b (mod 32) ga chapga/o'ngga siljitish / chapga aylantirish
10 / 12LDB / LDW-manzilni olib, bayt / 32 bit (LE) o'qish
11 / 13STB / STW-manzilni (uch), qiymatni (undan keyingi) olib yozish
14EQ-a == b ? 1 : 0
20 / 21 / 22JMP / JZ / JNZu16o'tish (JZ/JNZ stek uchini olib shartni tekshiradi)
30OUT-stek uchini bayt sifatida chop etish
31HALT-to'xtatish

Task: find the valid serial, run the VM (in an emulator you write yourself) with that serial, and submit the printed flag. Flag format: BAYROQ{MINI_VM_BYTECODE_xxxxxxxxxxxxxxxx} (the last 16 characters are lowercase hex). Writing the disassembler and emulator with stdlib is sufficient; z3 is optional.

Attached files
serial_check.svm Log in to download
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −16 pts Log in
Hint 2 −32 pts Log in
Hint 3 −48 pts Log in
To submit a flag, log in.

First solvers

1. Odam 25.11.2026
2. Mirjaxon Qaxxarov 25.11.2026
3. Ulugʻbek 26.11.2026