Quiz 1 (10pt) - Disassembling binary and patching

From this exercise, we aim to run the basics of binary reverse engineering to find a secret from binary, modify its value, and change the execution.

Exercise description

[Step 0] Set-up your environment (Ubuntu VM)

    sudo apt update
    sudo apt install libc6-i386
  1. Install necessary tools

  2. Download binaries from the folliwng links crackme0x00, crackme0x01, crackme0x02

[Part 1 - 3pt] Find the secret

[Part 2 - 3pt] Modify binary to change the secret

For crackme0x00 and crackme0x01 payloads, you will modify binaries to change the secret values. The new secret value will be specific to your net_id. The following will give you new secret value.

$ export m=$(echo "<your_net_id>" |md5sum |cut -d ' ' -f 1|tr '[:lower:]' '[:upper:]') ;echo "obase=10; ibase=16; ${m: -4}"|bc

Modified binaries will be named as below.


[Part 3 - 4pt] Modify binary to change execution

For crackme0x01 and crackme0x02 payloads, overwrite an instruction so as to print success message regardless of its inputs. Modified binary will be named as below.


[Extra] other tools?


Tar/gzip your outputs using the following command and upload it to eLearning. For each part, please add simple description regarding how did you get the result.

tar cvzf cs6332q01.tgz README.md crackme0x0?_*