GDB Test Drive

Challenge Overview

Can you get the flag?

Download this binary.

Here's the test drive instructions:

  • $ chmod +x gdbme
  • $ gdb gdbme
  • (gdb) layout asm
  • (gdb) break *(main+99)
  • (gdb) run
  • (gdb) jump *(main+104)

Solution

wget https://artifacts.picoctf.net/c/85/gdbme

After getting the file it is really just running the commands that they said in the instructions.

  • sudo chmod +x gdbme
  • gdb gdbme
  • (gdb) layout asm
  • (gdb) break *(main+99)

image

  • (gdb) run
  • (gdb) jump *(main+104)

image

Then the flag is presented after you jump to main+104 skipping the sleep.

Flag: picoCTF{d3bugg3r_dr1v3_197c3...}