hiCTF 2026Reverse Engineering
The Inner Engine
Nim ELF / custom VM / Z3 constraints
- Competition
hiCTF 2026
- Category
- Reverse EngineeringHard · estimated
- Analysis status
- Flag recovered (prior chat)
- Document
- Original PDF
01Challenge analysis
The problem
The challenge supplied a compiled Nim ELF using a custom virtual-machine-like validator. The checker imposed constraints over a 24-character secret rather than embedding a direct plaintext comparison.
02Exploit or recovery path
How I solved it
- 01
I inspected the native binary to locate the validation path and separate Nim runtime scaffolding from the challenge-specific bytecode logic.
- 02
I reconstructed the behavior of the virtual machine, including the relevant data transformations and conditional checks.
- 03
I translated the resulting conditions into constraints for Z3, preserving the intended byte widths and arithmetic semantics.
- 04
I solved the 24-character constraint system and converted the model output into a candidate input string.
- 05
I executed the original checker with the candidate; the recorded local validation accepted it and revealed the final flag.
Result
RECOVERED FLAG
hiCTF{vm_byt3c0d3_1nn3r_3ng1n3_unw0und!}
Flag recovered (prior chat)
- Local Verification
- Previously reported as locally verified against the original Nim checker.
- Evidence Limitation
- The complete original Z3 script and bytecode offsets are not retained in the retrieved conversation snippet.