gdb-pwndbg

Debug authorized binaries with gdb and Pwndbg for crash triage and exploit development.

701|108|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/yv1ing/Z3r0 --skill gdb-pwndbg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gdb-pwndbg
Source: https://github.com/yv1ing/Z3r0/tree/main/sandbox/.agents/skills/gdb-pwndbg
Command: npx skills add https://github.com/yv1ing/Z3r0 --skill gdb-pwndbg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Binary analysis and exploit development require a correctly configured debugger environment, and manually setting up GDB with Pwndbg, choosing the right invocation mode, and capturing crash state is error-prone and slow.

Core Features & Use Cases

  • Pwndbg-integrated GDB: Uses the system gdb with Pwndbg loaded via /root/.gdbinit, so no separate debugger installation is needed.
  • Batch crash triage: Runs bounded batch sessions that capture backtraces, register state, and crash details for provided binaries.
  • Repeatable sessions: Supports gdb command files and pairs debugger output with checksec, strace/ltrace, and pwntools for complete analysis.
  • Use Case: Given a crashing CTF or audit binary, run a batch gdb session to capture the backtrace and registers, confirm mitigations with checksec, and record the crash input for an exploit development report.

Quick Start

Use gdb with Pwndbg to run the provided binary in batch mode and report the backtrace, registers, and crash state.

Frequently Asked Questions about gdb-pwndbg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a binary with gdb and Pwndbg?

Open an interactive session with gdb -q ./binary, which loads Pwndbg automatically through /root/.gdbinit. For quick checks, run gdb in batch mode with -ex commands to capture backtraces and registers without interaction.

How to triage a crashing binary in batch mode with gdb?

Run gdb -q ./binary -ex 'set pagination off' -ex 'run' -ex 'bt' -ex 'info registers' -batch to execute the binary and capture the backtrace and register state non-interactively. Save the crash input and output for later analysis.

Should I use gdb or the pwndbg command for binary debugging?

Both entrypoints work because Pwndbg is sourced into the system gdb via /root/.gdbinit. Use gdb as the standard entrypoint and the pwndbg wrapper when it is more convenient; do not install a separate debugger.

Can gdb attach to a running process for debugging?

Yes, attach to an authorized local process with gdb -q -p <pid>. Only attach to processes explicitly in scope for the engagement, and record the process details in your report.

What tools complement gdb for binary exploit development?

Use checksec for the static mitigation baseline, strace and ltrace for runtime call tracing, and pwntools for repeatable interaction or exploit scripts. These complement the debugger rather than replacing it.