buffer overflow
to format string bug
is easy
- Now we're able to trigger format string bug once using 27 bytes charecters at most.
- It's obvious that if we hijack exit@got to superSecretFunc, we will get flag.
So the task can be completed with the following steps:
- hijack exit@got to superSecretFunc and fix retaddr to call exit.
- hijack exit@got to superSecretFunc and the bianry will call exit(0) at the end of main.
- the length of payload is less than 27-byte.
Here is my exp