Lab 2 - Defusing a binary bomb
Lab 2 was handed out Thursday, Sept 21. It is due 11:59 pm, Wednesday,
Oct. 4. The writeup is available from the course home page.
You can check the
final bomb stats to see how
you and your classmates did.
Notes
-
In order to read and copy the bomb in your individual bomb directory,
you must have a CS Kerberos ticket. If you login to a fish machine
you'll get this ticket automatically. If you want to copy your bomb
while running on an Andrew machine, type "aklog cs.cmu.edu" to get
your ticket, then do the copy. But be careful, rumor has it that the
bombs explode immediately if they are not run on a fish machine.
- The jnl instruction is jump short if not less than. It
is the same as jge.
- To single-step through you binary bomb in gdb,
you will need to use the nexti and stepi commands
(which step through binary instructions)
rather than the next and step commands
(which step through C instructions).
- Here is an updated version of the GDB CheatSheet
(ps,
pdf,
txt)
that includes the useful nexti command.
- Be extremely careful when working on your bomb. ANY explosion will
cost you 1/4 point, even if you mistype a string by mistake or forget to
set a breakpoint.
- Your bomb is only defused when all the inputs to the bomb are
correct. So yes, you could use gdb to alter the contents of the registers
and memory and then jump around the code to generate the phase defused
messages. BUT you only get points for defusing a stage if the input
you used is valid, so I wouldn't recommend doing this.
Dave OHallaron
Last modified: Mon Oct 9 17:00:33 EDT 2000