首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
CS 211编程代做、代写c/c++,Java程序
项目预算:
开发周期:
发布时间:
要求地区:
CS 211 - Computer Architecture
Instructor: Prof. Santosh Nagarakatte
Assignment 4
Disassembling and Defusing a Binary Bomb
March 25, 2024
Due by April 10, 2024 - 5:00PM
dis·as·sem·ble (vt)
take apart: to take something such as a piece of machinery apart.
– Bing Dictionary
0 Overview
The purpose of Assignment 4 (PA4) is for you to become familiar with x86 64 Instruction Set Architecture (ISA).
The nefarious Dr. Evil has planted a slew of ”binary bombs” on our machines. A binary bomb is a program
that consists of a sequence of phases. Each phase expects you to type a particular string on stdin. 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 everyone 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!
1 Instructions
The bombs were constructed specifically for the Linux operating system. You must do this assignment on the iLab
machines. You will not defuse the bomb otherwise and will not get credit.
In fact, there is a rumor that Dr. Evil has ensured the bomb will always blow up if run elsewhere. There are
several other tamper-proofing devices built into the bomb as well, or so they say.
Open an Internet Browser and go to the URL: http://skylake.cs.rutgers.edu:17300. This address is only “visible” when you access it on iLab machines through weblogin. Fill the form up with your NetID
and your email address to get your bomb package. The file that you will get is in the format bombN.tar, where N is
your bomb ID, i.e. ID.
If you haven’t downloaded it in the iLab machines, copy the file to there and untar your bomb into your home
directory.
We recommend that you download no more than two bombs. Copy the bomb that you downloaded into your
iLab account and work with it.
$ tar -xvf bomb
.tar
It will create a directory bomb< ID > that should contain the following files:
1
• bomb: The executable binary bomb
• bomb.c: Source file with the bomb’s main routine
• README: File with the bomb ID and extra information
Your job is to defuse the bomb. You can use many tools to help you with this; please look at the tools section
for some tips and ideas. The best way is to use a debugger to step through the disassembled binary.
The bomb has 9 phases. The phases get progressively harder to defuse, but the expertise you gain as you move
from phase to phase should offset this difficulty. Nonetheless, the latter phases are not easy, so please don’t wait
until the last minute to start. (If you’re stumped, check the hints section at the end of this document.)
The bomb ignores blank input lines. If you run your bomb with a command line argument, for example,
./bomb mysolution.txt
then it will read the input lines from mysolution.txt until it reaches EOF (end of file), and then switch over to
stdin (standard input from the terminal). In a moment of weakness, Dr. Evil added this feature so you don’t have
to keep retyping the solutions to phases you have already defused.
To avoid accidentally detonating the bomb, you will need to learn how to single-step through the assembly code
and how to set breakpoints. You will also need to learn how to inspect both the registers and the memory states.
One of the nice side-effects of doing the lab is that you will get very good at using a debugger. This is a crucial
skill that will pay big dividends the rest of your career.
IMPORTANT: Every time that the bomb explodes, you will lose 0.5 points. It is important that you use
breakpoints and avoid those unnecessary explosions.
2 Resources
There are a number of online resources that will help you understand any assembly instructions you may encounter
while examining the bomb. In particular, the programming manuals for x86 processors distributed by Intel and
AMD can be valuable. They both describe the same ISA, but sometimes one may be easier to understand than the
other.
It is important to realize that the assembly syntax of the instructions on the Intel manual follows the Intel
assembly language, while in the book, in gcc, and in gdb they all use the AT&T assembly language. They are
perfectly interchangable, you can identify the differences in this webpage:
http://asm.sourceforge.net/articles/linasm.html
2.1 Checking your Work
We provided a webpage where you can check your work. Access:
http://skylake.cs.rutgers.edu:17300/scoreboard to verify how many points you have, up to
which phase you have defused the bomb, and so on. You have to be on the iLab machines to access the above link.
3 Tools
There are many ways of defusing your bomb. You can examine it in great detail without ever running the program,
and figure out exactly what it does. This is a useful technique, but it not always easy to do. You can also run it
under a debugger, watch what it does step by step, and use this information to defuse it. This is probably the fastest
way of defusing it.
2
We do make one request, please do not use brute force! You could write a program that will try every possible
key to find the right one, but the number of possibilities is so large that you won’t be able to try them all in time.
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.
• gdb: The GNU debugger is a command line debugger tool available on virtually every platform. You can
trace through a program line by line, examine memory and registers, look at both the source code and
assembly code (we are not giving you the source code for most of your bomb), set breakpoints, set memory
watch points, and write scripts. Here are some tips for using gdb.
– To keep the bomb from blowing up every time you type in a wrong input, you’ll want to learn how to
set breakpoints.
– The CS:APP Student Site has a very handy gdb summary (there is also a more extensive tutorial).
– For other 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 bomb: 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 bomb: 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 may look cryptic. For
example, a call to sscanf might appear as:
8048c36: e8 99 f c ff ff call 80488d4 < init + 0x1a0 >
To determine that the call was to sscanf, you would need to disassemble within gdb.
• strings -t x bomb: This utility will display the printable strings in your bomb and their offset within the
bomb.
Looking for a particular tool? How about documentation? Don’t forget, the commands apropos and man
are your friends. In particular, man ascii is more useful than you’d think. If you get stumped, use the course’s
discussion board on Canvas.
4 Submission
You have to e-submit the assignment using Canvas. Your submission should be a tar file named bomb < ID > .tar
that can be extracted using the command:
tar -xf bomb
.tar
Extracting your tar file must give a directory called bomb < ID >. This directory should contain the same
files that you downloaded, along with the file mysolution.txt to defuse the bomb.
To create the tar file that you will submit after finishing your programming assignment, you will use the following command line, in the parent directory of bomb < ID >:
tar -cvf bomb
.tar bomb
/
3
5 Grading
Your grade will be based on how many stages of the bomb you have defused. Be careful to follow all instructions.
If something doesn’t seem right, ask.
6 Collaboration
You are not supposed to assist your friends or other students in solving the bombs. You are required not to use any
online resource other than ones explicitly described above. If in doubt, ask. Keep in mind that your final will test
you based on the skills learned in this assignment.
4
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写dts207tc、sql编程语言代做
2024-12-25
cs209a代做、java程序设计代写
2024-12-25
cs305程序代做、代写python程序...
2024-12-25
代写csc1001、代做python设计程...
2024-12-24
代写practice test preparatio...
2024-12-24
代写bre2031 – environmental...
2024-12-24
代写ece5550: applied kalman ...
2024-12-24
代做conmgnt 7049 – measurem...
2024-12-24
代写ece3700j introduction to...
2024-12-24
代做adad9311 designing the e...
2024-12-24
代做comp5618 - applied cyber...
2024-12-24
代做ece5550: applied kalman ...
2024-12-24
代做cp1402 assignment - netw...
2024-12-24
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!