Question: Problem 6 . ( 1 2 points ) : Recently, Microsoft's SQL Server was hit by the SQL Slammer worm, which exploits a known buffer
Problem points:
Recently, Microsoft's SQL Server was hit by the SQL Slammer worm, which exploits a known buffer
overflow in the SQL Resolution Service. Today, we'll be writing our own Slammer that exploits the
vulnerability introduced in bufbomb, the executable used in your Lab assignment. And as such, Gets
has the same functionality as in Lab except that it strips off the newline character before storing the input
string.
Consider the following exploit code, which runs the program into an infinite loop:
infinite.o: file format elf
Disassembly of section text:
text:
: fc b ff be push $xbfffbfc
: c ret
: mov sesi, besi
Here is a disassembled version of the getbuf function in bufbomb, along with the values of the relevant
registers and a printout of the stack before the call to Gets
gclb disas
Dump of assembler code for function getbuf:
:: esp ebp, esi Oxfffffff Problem points:
This problem tests your understanding of both control flow and multidimensional array layout. Consider
the following assembly code for a procedure moo :
moo:
pushebp
mov spebp
push itedi
pushesi
push ivebx
mov $ secx
mov $arr sedi
mov $arr qesi
mov qebp qeax
leal eax qebx
L:
leal secx secx seax
sal $ seax
mov itebx,
mov iedx, seax sedi
incl ecx
cmpl $ gecx
jle L
mov fecx, feax
pop iebx
pop iesi
pop isedi
popl itebp
ret
Page of
Based on the assembly code, fill in the blanks below in moo's C source code. Note: you may only use
symbolic variables from the source code in your expressions belowdo not use register names. Hint: First
figure out what the loop variable i is in the assembly and what the value of is
fdefine
fiefine
int arrlMN;
int arrMN;
int moo int
i
int i;
for
i
arr
I
arr
return
;
int ;
unsigned ;
and initialized to some unknown value. You should formulate your counterexamples in
terms of the word size We have given the first answer as an example. You may assume
right shift is arithmetical.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
