Skip to content

Class 03: Software Security/Memory Safety

Homework

Install QEMU (already installed on the virtual machines we provide). If you run your own setup, install from qemu.org If you need help installing or running QEMU, Google searching helps a lot Download the Protostar exploit virtual machine from exploit.education/protostar From the desktop terminal, run the virtual machine with QEMU; typically: qemu-system-x86_64 -boot d -cdrom ~/Downloads/exploit-exercises-protostar-2.iso -m 512 (linux/mac) qemu.exe ~/Downloads/exploit-exercises-protostar-2.iso (windows) Login to the virtual machine; username and password are on the protostar page Navigate to the right directory (instructions on the Protostar page) Run ls; do you see the exercise levels? If not you made a mistake in steps [3-5]

Perform this exercise:

https://exploit.education/protostar/stack-zero/ Try until you get this message: “you have changed the ‘modified’ variable” Explain what happened. How is it that providing an input in the line that reads “gets(buffer)” can change the value of the variable “modified”? What does “Segmentation fault” mean? Perform this exercise:

https://exploit.education/protostar/stack-one/ Try until you get this message: “you have correctly got the variable to the right value” Explain what happened. What does “little endian” mean? Why didn’t you get “Segmentation fault”? Perform this exercise:

https://exploit.education/protostar/stack-three/ How can you input hex values that don’t correspond to keyboard letters? Try until you get this message “code flow successfully changed” Explain what happened. Congratulations! You have successfully hijacked control of a virtual machine!