You vs. The Moose: Defusing a Binary Bomb

This assignment is an adaptation of Aaron Bauer's adaption of this lab developed for the Carnegie Mellon University's 15-213 (Introduction to Computer Systems) course, which is the course for which our textbook was written.

Goals

Rubric

Scoring on this one is a little complicated, and this rubric won't make a lot of sense until you read the rest of the assignment.

Maximum score: 30 points

6 - defusing phase 1 6 - defusing phase 2 6 - defusing phase 3 3 - defusing phase 4 3 - defusing phase 5 3 - defusing phase 6 3 - explanation for any of the 6 phases

That is, there are 27 points for defusing bomb phases, and 18 points available for explaining bomb phases, but your maximum score is 30. Want to try to get all the defusings and all the explanations? Go wild. But I'll cap your score at 30 anyway.

Good explanations will be similar to good answers to last week's puzzle assignment: succinct paragraphs describing what the phase is computing with your input at a high level of abstraction, plus notes about key features of the assembly code that correspond to the high-level computation.

If you are unable to defuse a phase, your explanation of that phase is unlikely to be clear or persuasive.

The upshot of this weird scoring system is that there are several ways to try to get the full 30 points. For example, you could defuse phases 1-4 and explain phases 1-3. Or you could defuse all six phases and explain just one.

Although phases get progressively harder to defuse, the expertise you gain as you move from phase to phase should offset this difficulty. However, the later phases will likely take quite a bit of time to work through, so don't wait until the last minute to start.

Background

The nefarious supervillain The Moose, working (and grazing on foliage) in her secret mountain lair, is plotting world domination. With her legendary team of cyber-ungulates, she has planted a collection of "binary bombs" on our class server.

Each of The Moose's bombs is a program that consists of a sequence of phases. Each phase expects you to input a particular string. If you type the correct string, then the phase is defused and the bomb proceeds to the next phase. Otherwise, the bomb explodes by printing "BOOM!!!". and then terminating. You can fully defuse the bomb by defusing every phase.

There are too many bombs for us to deal with, so I am giving each student a different bomb to defuse. Your mission, should you choose to accept it (i.e. should you wish to acquire the associated points and enhance your knowledge of assembly language and debugging in the process), is to defuse your bomb before the due date. Good luck, and welcome to the bomb squad!

Step 1: Get your bomb

You can obtain your bomb by filling out the form at http://cs208.mathcs.carleton.edu:55057.

You will need to be on campus or connected to the Carleton VPN to access this page. Once you have filled out and submitted the form, the server will build your bomb and and return it to your browser in a file named bombN.tar, where N is the unique ID of your bomb.

Upload bombN.tar to your account on mantis.mathcs.carleton.edu using whatever file transfer technique you prefer. On Unix systems, including the Windows Subsystem for Linux (WSL), I generally use scp ("secure copy"), like so:

scp bombN.tar YOURUSERNAME@mantis.mathcs.carleton.edu:/Accounts/YOURUSERNAME/wherever

where "wherever" is the path to whatever directory you want to store the file in. On Windows, I personally always set up WSL, but if you're not so inclined, the WinSCP application is ancient and effective.

Put bombN.tar wherever you want to work with it, and then un-tar it in the usual way:

in the mantis file system, and
tar xvf bombN.tar

(x=extract, v=verbose, f=filename)

This will create a directory called bombN with the following files:

If for some reason you request multiple bombs from the web form, this is not a problem. Choose one bomb to work on and delete the rest.

Step 2: Defuse your bomb

Your job for this lab is to defuse your bomb. What this means in practice is that you will accumulate a sequence of input strings, one per phase, that defuses that phase.

For each defusing string you discover, put it in your defuse.txt file. If you defuse all six phases, defuse.txt should have six non-blank lines (note that the bomb ignores blank lines, so you may space out your defusing strings if you wish).

You must do the assignment on Linux. There is a rumor that The Moose is evil enough to have tamper-proofing devices into the bomb.

You can use many tools to help you defuse your bomb. See the Suggestions section below for details.

Step 3: Write your descriptions

See the Rubric section above for a description of descriptions. As noted there, you're looking for a short description of "what is this code doing" analogous to the work you did last week in the puzzles assignment.

Put your descriptions in descriptions.txt. (Please do *not* write your descriptions in .docx, .pdf, .rtf, or other formatted text file types. Just give me the text of what you want to say, with clear headings for each described phase.)

Step 4: Submit your work

Suggestions and hints

Tools you can use

There are many tools which are designed to help you figure out both how programs work, and what is wrong when they don't work. Here is a list of some of the tools you may find useful in analyzing your bomb, and hints on how to use them.

Have fun!