Question: 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

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

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

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!