Recon

  1. The string buffer size is 200 characters
  2. Jacky told me there is a format string vulnerability which it does have
  3. , and lets see what the corresponding output is in the debugger? Couldnt find this…
  4. Note that we want to change the return address to the return address that points to print_flag()
  5. The relative offset for print_flag() is:
  6. The main-function body is seen in the 6th item on the stack when we start running

What we need to do

  1. Leak the base address for print_flag(), the offset for print_flag() is 0x1269
  2. Modify the return address with Format String Exploitation to be the address where print_flag() is located
  3. Leak the Stack Canary and then