Untitled

Here's the look when executing the binary

Untitled

The buffer overflow exist after inputing the second question.

Untitled

If we decompile the binary with ghidra, we will see the function that been called when the program start from main function.

Untitled

After the snowman function ended, it call another function named investigate().

Untitled

The buffer of the variable are 64 byte long

Untitled

This is 64 bit executable file, so if we cant to overwrite the return address, we must add extra 8 bytes for EBP.

Untitled

If we check the security with checksec, we can see if the NX are enabled so we couldn't simply put shellcode on it. But the PIE are disabled so we can get the actual address on the program.