CompOrg Fall 2003 Homework #3

CompOrg Binary Bomb Squad

Due Date: 10/28/2003 (by 11:59:59PM)
Submit to WebCT

Late Penalty: 10% per day

This counts for two homeworks!

Assignment

You have been selected to be a member of an elite group of cyber-techno-digi-gurus who are needed to defuse some binary bombs. Your have been selected due to your expertise in IA32 assmembly language, your knowledge of data representation and computer arithmetic, and your extensive knowledge of how to read an ASCII reference chart.

You will be given a "binary bomb" which you must defuse. If you are not capable of defusing the bomb, one of two possible things will happen:

  1. You will get a bad grade on this assignment.
  2. The world will end.

I can't remember which will actually happen... feel free to use whichever one provides you with more motivation.

Binary Bomb

A binary bomb is an executable program (FreeBSD executable) that consists of six phases. Each phases expects the user to enter a particular string (via stdin). If the expected string is entered, the phase has been defused and the progam moves on to the next phase. If the expected string is not entered, the program explodes (prints "BOOM" and quits). Your job is to defuse as many phases as possible.

Each phase tests a different aspect of machine language programs:

Phase 1:comparison
Phase 2: loops
Phase 3: conditionals/switches
Phase 4: recursive calls and the stack discipline
Phase 5: pointers
Phase 6: linked lists/pointers/structs

There is also a challenging "secret phase"... (but it's a secret)

Each student will get a unique bomb, the solution to your bomb (the sequence of expected strings) is different than everyone else's. Feel free to help each other with general concepts (you can work together), but you are not allowed to submit solutions to your bomb unless you determined the solutions. In other words - if you need help, feel free to ask Dave or the TAs or anyone else to help you get started, but you must have a complete understanding of how to figure out what the solution is (you will certainly need this ability on a test!).

The phases are ordered in increasing difficulty, and phase 1 is pretty easy. Don't underestimate the project just because you can solve the first phase - the subsequent phases get harder!

How to get your bomb

Bombs are available on the web, all you need to do is click on the link below and save the file to your computer. It is expected that you move the bomb to your CS account and use freebsd.remote.cs.rpi.edu to work on the bomb.

Click here to get your bomb

Your bomb will be sent in a zip file that includes:

We assume that you can handle a zip file! Under Windows you can use WinZip (available at www.winzip.com). Under Unix you can use unzip to unzip a zip file.

NOTE: The "bomb server" that sends you a binary bomb (when you click on one of the above icons) will make sure that your bomb is not available to anyone else! It is not acceptable that two students submit the same bomb ID - everyone needs to download a unique bomb (with a unique solution!). Each student needs only one bomb, so please don't download lots of them (there are a fixed number of bombs pre-made, and if the server runs out this will inconvience other students who have not yet received one bomb!). Although every bomb is different, they are all comparable in difficulty, so there is no reason to get more than one bomb.

How to submit

Submission of your homework is to Webct (webct.rpi.edu), the general idea is to submit a file containing the strings that defuse your bomb, and to submit your bomb ID file (that you got from the bomb server).

Your submission must include the following:

Don't send your bomb program in your submission! These programs are dangerous and we certainly don't want to be messing with them (that's why we have you experts handing things...).

Grading

Grades will be determined by the number of phases you are able to solve:

It is possible to get partial credit for a phase (up to 1/2 the points). To get extra credit you need to include a description of how far you got figuring out the phase (show us the assembly code and describe what you think is happening, etc). Partial credit points will not be awarded if we can't understand your description (you need to make sure that you convince us that you have some understanding of what is happening in the code for the phase).

HINTS: