110 likes | 125 Views
The Binary Bomb Lab involves defusing bombs by providing correct input strings. Students reverse engineer to find solutions using tools like objdump and gdb. Learn to disassemble binary files and debug C programs effectively.
E N D
System Level ProgrammingSoftware College of SCU Lab:Binary Bomb 1
Binary Bomb Lab • 1. Lab Discription • 2. Tools to "Defuse" Bombs • 3. Defuse Bomb 1
Lab discription The "binary bomb" is an executable c program provided as a binary object file. Run the program, it prompts the user to type in 6 different strings. If any of these is incorrect, the bomb "explodes" by printing an error message “BOOM!!!”. 1. Lab Discription(1/2)
1. Lab Discription(2/2) The source code for phase_1() and others are not provided. Students will use reverse engineer to find out 6 input string.
Binary Bomb Lab • 1. Lab Discription • 2. Tools to "Defuse" Bombs • 3. Defuse Bomb 1
How to "DEFUSE'' the bomb disassembling the binary object file to assembly instructions disassembler: objdump.exe objdump -d bomb.exe >> bomb.ass disassembling object file bomb.exe and redirect the instructions to plaintext file bomb.ass Refers to objdump_Tutorial.pdf to get more info 2. Tools to "Defuse" Bombs(1/3)
How to "DEFUSE'' the bomb single-step through the instruction in each phase to figure out the "strings" debugger: gdb.exe GDB is the standard debugger that runs on many unix-like systems and works for many programming language including c. Refers to gdb_Tutorial.pdf to get more info 2. Tools to "Defuse" Bombs(2/3)
2. Tools to "Defuse" Bombs(3/3) • GDB 跟踪调试常用命令 • 反汇编:objdump -d bomb • 查看所有寄存器内容:info registers • 打印某一寄存器:p $eip • 打印内存内容: x 0x8049034 • 打印内存内容(以字符串形式):x/s 0x8049034 • 设置断点:b • 设置断点(地址): b*0x8049034 • 运行:run • 执行单步: si
Binary Bomb Lab • 1. Lab Discription • 2. Tools to "Defuse" Bombs • 3. Defuse Phase 1