Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Topic is Principles of Information Security URGENT!!! Please explain the solution as step-by-step and simply Stack-smashing (20 pts] Assume the following program is compiled in

Topic is Principles of Information Security

URGENT!!! Please explain the solution as step-by-step and simply

image text in transcribed

Stack-smashing (20 pts] Assume the following program is compiled in a file called argcargv.c: int main(int arge, char* argv[) { char bufferl [10] strcpy(bufferl, argv[1]); return 0; } Assume the executable argcargv is run using the following command-line inputs: Jargcargv I am using the command line input Answer the following questions: 1. What data type is argv? [1 pt] 2. What data type is argv[1]? [1 pt] 3. What value does argc take when the program gets invoked? [1 pt] 4. Draw the stack frame for main. Label the following clearly: (1) local vars, function parameters, frame pointer and return address in the correct order; (ii) stack growth direction; (iii) low/high memory address boundaries. [6 pts] 5. Suppose you want to conduct a stack smashing attack to exploit this vulnerable code. Which index in the argv array would you use to pass in your attack code as a command-line argument to argcargv (in place of the example above)? [1 pt] 6. Can you predict the exact location on the stack of the old return address to overwrite? If YES, why? If No, why not? [4 pt] 7. What strategies can you use to increase the possibility of the success of your attack? Be as specific as possible. (6 pts] Please use underscore'_'and pipe 'l' while drawing the stack You can draw the stack on a piece of paper, then you can submit the photo of the paper

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

Students also viewed these Databases questions