Assignment 6: Reverse Engineering with GDB


Objective

In this assignment, you will reverse engineer a binary executable using GDB to discover a hidden password. The goal is to practice debugging and reverse engineering techniques.


Instructions

Tools and Commands

  • objdump: Disassemble the binary to get the assembly code.
       objdump -d -M intel assignment6 > assignment6.asm

  • GDB: Debug the binary to inspect its execution.

Steps

  1. Start GDB and load the binary:
    gdb ./assignment6

  2. Set a breakpoint at the main function:
    (gdb) break main

  3. Run the program:
    (gdb) run

  4. Disassemble the current function:
    (gdb) disas

  5. Use GDB commands like disas, info registers, x, and step to analyze the binary and understand its behavior.


Submission

Submit a report detailing the steps you took to reverse engineer the binary and the discovered password.


Extra Credit

Recreate the binary in the language of your choice.