12 / case study
Binary Bomb Reverse Engineering
Reverse-engineered an x86-64 executable by reconstructing its input-validation logic from assembly, runtime state, and memory. Working in a two-person team, solved all six required phases and uncovered and completed the hidden secret phase, finishing first and topping the course leaderboard.
- category
- Systems / Reverse engineering
- with
- Computer Systems Organization, Khalifa University
- year
- 2025
- role
- Reverse Engineering Specialist
- tools
- x86-64 · GDB · objdump
why this exists
The binary bomb exposed its behavior through machine instructions rather than source code. Each phase accepted a narrowly constrained input, with incorrect values reaching a shared failure routine. Solving it required recovering the program's underlying algorithms and data structures: distinguishing an input from the value it indexed, understanding register and stack usage, and tracing how branches and recursive returns encoded a decision. Completing the visible phases was only part of the investigation; the hidden phase required finding an additional execution path inside the post-defusal logic.
how it came together
- 01Mapped the executable with objdump, grouping each phase with its helper functions to follow the control flow. Used GDB breakpoints at phase entry points, helper routines, and the shared failure function, then inspected registers, stack values, and memory to test the logic behind each condition.
- 02Recovered the early validation rules by examining string addresses, input format strings, and arithmetic comparisons. Reconstructed a six-number recurrence from indexed stack accesses, then decoded a jump table to identify the valid selector, character, and integer combinations accepted by another phase.
- 03Analyzed a recursive binary-search function by following its arguments and return-value calculations. Separately reconstructed a table walk in which each retrieved value became the next index, deriving the required traversal length and accumulated sum rather than treating the table as a simple list of numbers.
- 04Rebuilt the linked-list phase from memory: identified node values and pointers, traced how the input selected and relinked nodes, and derived the permutation that placed their stored values in descending order. This resolved the distinction between sorting the input numbers and ordering the structures they referenced.
- 05Investigated the post-defusal routine to uncover a hidden trigger that reparsed an earlier input. Followed that path into the secret phase, examined its recursive binary-search-tree logic, and verified an accepted value in GDB. Documented the phase-by-phase reasoning with disassembly, debugger observations, and successful test inputs.
what came out of it
Our two-person team was the first to complete all six regular phases and the hidden secret phase, finishing at the top of the course leaderboard. The project demonstrated practical x86-64 analysis, memory inspection, recursive reasoning, and reconstruction of higher-level algorithms from compiled code.