Skip to content

Simple bof

Run nc thekidofarcrania.com 35235 to observe the interface and IO \ Run cat bof.c to observe the source code

Observations:

  1. There is a secret variable whose value is 0xdeadbeef which matches (reverse ('cause STACK) of) the red part of the visualization. This indicates the buffer has to be overflowed precisely to reach and modify the red part.
  2. In the source code, secret is compared with 0x67616c66, which is galf in ASCII, so we have to end the buffer overflow with flag.
  3. On prompt at interface, enter any ASCII character 48 times, followed by "flag", e.g., aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaflag