# Machine and c programing | Computer Science homework help

Machine problem 2: Binary bomb Objectives 1. Learn to use GDB and other command line debugging utilities 2. Practice debugging and tracing binary executables 3. Learn to read and understand x86 assembly, including: addressing modes procedure call conventions control structure implementation Introduction The nefarious Dr. Evil has planted a slew of “binary bombs” on our class machines. A binary bomb is a program that consists of a sequence of phases. Each phase expects you to type a particular string on standard input. 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. The bomb is defused when every phase has been defused. There are too many bombs for us to deal with, so we are giving each student a bomb to defuse. Your mission, which you have no choice but to accept, is to defuse your bomb before the due date. Good luck, and welcome to the bomb squad! Step 1: Get Your Bomb

:+,)\$’) #\$%& %&’ 2+33.4; <)’(-.2\$45 =>[email protected] #\$%& 1+,) +#4 ,”’)4.3’AB !” #\$%& %&’ ()’*\$+,” -./0 “%.)% /1 2-.\$3\$45 1+,) )'(+”\$%+)1 +4 6\$%7,/ *\$. %&’ \$4\$%.%\$+4 -\$48 !9%e) .22′(%\$45 \$%0 2-+4′ 1+,) )'(+”\$%+)1 +4

2/1/2021 Machine problem 2: Binary bomb

2/3

The ﬁrst four phases are worth 6 points each. Phases 5 and 6 are a little more difﬁcult, so they are worth 8 points each. So the maximum score you can get is 40 points. Although phases get progressively harder to defuse, the expertise you gain as you move from phase to phase should offset this difﬁculty. However, the last phase will challenge even the best students, so please don’t wait until the last minute to start. The bomb ignores blank input lines. If you run your bomb with a command line argument, for example,

> ./bomb psol.txt

2/1/2021 Machine problem 2: Binary bomb

3/3

For online documentation, type “help” at the gdb command prompt, or type “man gdb”, or “info gdb” at a Unix prompt. Some people also like to run gdb under gdb-mode in emacs. objdump -t This will print out the bomb’s symbol table. The symbol table includes the names of all functions and global variables in the bomb, the names of all the functions the bomb calls, and their addresses. You may learn something by looking at the function names! objdump -d Use this to disassemble all of the code in the bomb. You can also just look at individual functions. Reading the assembler code can tell you how the bomb works. Although objdump -d gives you a lot of information, it doesn’t tell you the whole story. Calls to system-level functions are displayed in a cryptic form. For example, a call to sscanf might appear as:

8048c36:  e8 99 fc ff ff  call   80488d4 <_init+0x1a0>

To determine that the call was to sscanf, you would need to disassemble within gdb. strings This utility will display the printable strings in your bomb. Looking for a particular tool? How about documentation? Don’t forget, the commands apropos, man, and info are your friends. In particular, man ascii might come in useful. info gas will give you more than you ever wanted to know about the GNU Assembler. If you get stumped, feel free to ask for help.

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

# Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.