Question: Buffer Overflow [40 points] Question 1: Draw and explain a function stack frame for the following C function similar to the slides 12-15 in the

Buffer Overflow [40 points] Question 1: Draw and explain a function stack frame for the following C function similar to the slides 12-15 in the teaching materials. [20 point]

main ()

{

int value;

value = bof (12345678910);

}

int bof (char *str)

{

char buffer [10];

strcpy (buffer, str);

return 1;

}

Answer: Question 2: Is this following code segment safe? Explain why or why not? [10 points]

int bof (char *str, int size) {

char *buffer = (char *) malloc (size);

strcpy (buffer, str);

return 1; }

Notes: malloc is a C library function that allocates space of a specific size

Question 3: Why does ASLR make buffer-overflow attack more difficult? [10 points]

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!