GDB Test Drive

Published: July 20, 2023Updated: December 9, 2025

Description

Practice GDB: break at `main+99`, run, and jump to `main+104` to skip a delay and print the flag.

Make the binary executable (`chmod +x gdbme`).

Launch gdb, set the layout, breakpoint, and run the program.

Use `jump *(main+104)` to bypass the sleep and immediately print the flag.

chmod +x gdbme
gdb gdbme <<'GDB' layout asm break *(main+99) run jump *(main+104) GDB

Solution

  1. Step 1Set up the breakpoint
    The instructions provided in the challenge description are enough: break at main+99, run, then jump to main+104.
  2. Step 2Skip the wait
    Jumping to main+104 avoids the sleep call and reveals `picoCTF{...}` immediately.

Flag

picoCTF{d3bugg3r_dr1v3_197c3...}

Great intro to gdb’s `jump` command for skipping instructions.