Tax Calculator

hi i am bob, a middle aged unkle trying to calculate my taxes but i learned this language c from my father and i builded this cool application to help with paying my taxes

Format string + Canary bypass ret2win challenge

Firstly I went to disassemble this in IDA.

From this screenshot, I found that there is a flag function, so I went to find the address of it.

After this i went to find the ret address

Thus we have found the flag address (0x000000000040154b) and the ret address (0x0000000000401016), however what about the offset?

I decided to write a script to check for the canary by bruteforcing it.

After running this script, we see

Thus we have found the offset

After referring to a few writeups like the following

I came up with my solve script

Output

Thus the flag is GCTF24{74x_3v4510n_my_b3l0v3d}

Last updated