Question: Assume that this code runs with a completely random 3 2 - bit stack canary. The stack canary is a value placed between the saved

Assume that this code runs with a completely random 32-bit stack canary. The stack canary is a value placed between the saved ebp and local variables. If the value of stack canary changes, the code will crash before returning and prevent any malicious code from being executed. This is potentially useful as an overflow from a local buffer will overwrite the canary before overwriting the saved eip.
Assume no other memory safety defenses, no exception handlers, no callee saved registers, no compiler optimizations, and that local variables are stored in the stack in order as they appear in the code (for example in the main frame return_code will be at a higher memory address than input).
EvanBot believes that this code is vulnerable to a buffer overflow attack, even with the stack canary enabled.

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!