Question: In the code above, gets ( str ) stores the user input into a buffer str while it does not check the boundary of the
In the code above, getsstr stores the user input into a buffer str while it does not check the boundary of the buffer. Now the attack string is composed of three parts from lower address to higher address: padding, address to overwrite the return address of main and attack code payload The address to overwrite the return address of main is the address of a jmp esp instruction.
When the attacker runs the victim program, feeds the attack string into gets and then main returns ie the last line of main has been executed the stack pointer register esp contains
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
