The BinaryGame is a open-source resource designed to help students learn reverse engineering at their own pace through an iterative, guided design. The game consists of ten levels that increase in difficulty, help pages on GDB, and supports three flavors of assembly language. Modeled after concepts covered in each of the first nine sections of the Assembly chapters in the free online textbook, Dive into Systems, the levels are: (0) predefined C functions; (1) basic string matching; (2,3) arithmetic operations; (4,5) loops; (6) recursion; (7) arrays; (8) matrices; and (9) structs.
In order to compile the BinaryGame, you must ensure that you install the latest instance of Python3 and Linux's build-essentials.
- build-essential
$ sudo apt update $ sudo apt upgrade $ sudo apt install build-essential
- Python3
$ sudo apt update $ sudo apt install python3
- Clone the repo
git clone https://github.com/suzannejmatthews/binaryGame.git
To create the game's executable and the object files for linking, type make
in the /binaryGame/src
directory. The BinaryGame executable is stored in the aforementioned directory. To clean the directory of the created object files and executable, navigate back to the /binaryGame/src
directory and type make clean
.
To begin reverse engineering the executable, type gdb ./reverse
within the /binaryGame/src
directory, launching the executable in GNU's portable debugger. Type run
to start the program in the debugger. Use various break points throughout the code to halt the execution of the program for analysis:
$ gdb ./reverseGame
.
.
.
(gdb) break main
Breakpoint 1 at 0x2129
(gdb) run
Starting program: /home/user/binaryGame/src/reverseGame
.
Breakpoint 1, 0x0000000008002129 in main ()
.
(gdb) disas
...
If you get stuck, access the help pages by typing ./reverseGame help me!
the /binaryGame/src
directory, providing guidance on GDB, registers, and the game itself. Furthermore, if you get a question wrong, you can respond yes
to the hints prompt and receive helpful information on how to solve that particular level.
For more information on the GNU Debugger (GDB), please refer to the Documentation
D'Angelo Gourdine - dangelo.gourdine@westpoint.edu
Suzanne J. Matthews - suzanne.matthews@westpoint.edu