Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Software Analysis ,I don't know how to do part C ! Problem 2 A. (2 points) What is wrong with the following code? Indicate the

image text in transcribed

Software Analysis ,I don't know how to do part C !

Problem 2 A. (2 points) What is wrong with the following code? Indicate the line(s) and why it is wrong #include void foo ) char buf 5] printf("%p Please gets (buf) enter a command. ", buf); int main 0 foo O B. ( point) What is one way we could fix this eode? C. (6 points) If we wanted to exploit this code, what would we send to the program for input? Assume the return address you will want to use to execute your shelleode is 0x80000, and all stack smashing protections have been disabled for this process. Assume that invalid shellcode bytes that contain null characters will still work in this example For partial credit, specify what string should be sent to the terminal to crash the program. For full credit, specify a valid exploit string that contains all the necessary components to execute shelleode (your shelleode can be no-operation commands (NOPs) whicharx). Explain why the erash or exploit occurs Problem 2 A. (2 points) What is wrong with the following code? Indicate the line(s) and why it is wrong #include void foo ) char buf 5] printf("%p Please gets (buf) enter a command. ", buf); int main 0 foo O B. ( point) What is one way we could fix this eode? C. (6 points) If we wanted to exploit this code, what would we send to the program for input? Assume the return address you will want to use to execute your shelleode is 0x80000, and all stack smashing protections have been disabled for this process. Assume that invalid shellcode bytes that contain null characters will still work in this example For partial credit, specify what string should be sent to the terminal to crash the program. For full credit, specify a valid exploit string that contains all the necessary components to execute shelleode (your shelleode can be no-operation commands (NOPs) whicharx). Explain why the erash or exploit occurs

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions