carlosgaldino · home

Defusing a binary bomb with gdb

I have bad news. The series of posts you are looking for is not available anymore. Let me explain why.

First of all the series were about defusing a binary bomb1 by reading its assembly code to find what were the expected inputs that would defuse all stages of the bomb. Each stage taught something about how a C program is executed. At the end of the series you would've seen how several aspects of a C program are represented in machine code, for example: local variables, registers, conditionals, loops, switch statements, arrays, recursion, structs, etc. I'm biased but I thought it was a good reading.

Now you might be wondering if it was good why was it removed?

The binary bomb used in the series came from the excellent book “Computer Systems: A Programmer's Perspective” (CS:APP). This book is used at Carnegie Mellon University (CMU) in one of their courses and the course itself was the reason they wrote the book. A similar binary bomb is used in the course and also by other courses in the world and I was contacted by the authors of the book asking me to remove the content from the blog because having the solutions available could compromise the value of the exercise for both instructors and students using CS:APP.

I thought that by publishing the posts, people who are not students at CMU (or other institution using CS:APP) would read and learn something interesting. Of course it also meant an opportunity for students to cheat and possibly have a different learning experience if he/she read the series instead of trying to solving it by themselves. No one is forcing them to search for my posts and others that are available on the Internet. In the end the students would be fooling themselves instead of the instructors.

Anyway, I decided to comply with the professors' request, first of all, respecting their request and also for their goodwill to make available the material for those who are not enrolled in their class.

I hope you understand my decision and I encourage you, student or not, to try solving the exercise. You will learn quite a bit and have fun at the same time. You won't regret it.

Notes


  1. Definition from the CS:APP website

    A "binary bomb" is a Linux executable C program that consists of six "phases." Each phase expects the student to enter a particular string on stdin. If the student enters the expected string, then that phase is "defused." Otherwise the bomb "explodes" by printing "BOOM!!!". The goal for the students is to defuse as many phases as possible.

Carlos Galdino
@carlosgaldino
github.com/carlosgaldino