Reference no: EM133032962
Lab
For both of these binaries, you need to pass a crafted string as the command line argument to the binary. In these cases, you need to pass unprintable values (values that don't correspond to characters on the ASCII table). To do this, you need to leverage another binary or scripting language to print these characters. You can use any language of your choice (within reason) but I would recommend Python. Ultimately, you should be able to run your program like ./lab7-1 $(python2 lab7-1.py)
NOTE: You must disable address randomization in order for you to complete this lab. You can do this using the following command: sudo bash -c 'echo 0 > /proc/sys/kernel/randomize_va_space' - you will have to repeat this command every time you restart your virtual machine.
Part 1: lab7-1
Download the binary lab7-1 Download lab7-1and copy it to your virtual machine.
Using IDA and/or gdb-peda, reverse engineer the binary to determine the argument that causes the 'correct' statement to be printed to screen.
[lab7-1.py] Write a script or source file that when run, prints the argument to standard out so that it can be passed as input to lab7-1.
Part 2: lab7-2
Download the binary lab7-2 Download lab7-2and copy it to your virtual machine.
Using IDA and/or gdb-peda, reverse engineer the binary to determine the argument that causes the 'correct' statement to be printed to screen.
[lab7-2.py] Write a script or source file that when run, prints the argument to standard out so that it can be passed as input to lab7-2.
Questions
For lab7-1, describe how your input alters the execution path of the program.
For lab7-2, draw a diagram of the stack frame for the 'unsafe' function after the call to strcpy(). Highlight how your input alters the execution path of the program.
Attachment:- Lab 7.rar