Security
pwndbg
(/paʊnˈdiˌbʌɡ/) is a GDB and LLDB plug-in that makes debugging suck less,
with a focus on features needed by low-level software developers, hardware hackers,
reverse-engineers and exploit developers.
It has a boatload of features, see FEATURES.md and CHEATSHEET (feel free to print it!).
Vanilla GDB and LLDB are terrible to use for reverse engineering and exploit development.
Typing x/g30x $esp
or navigating cumbersome LLDB commands is not fun and often provides
minimal information. The year is 2025, and core debuggers still lack many user-friendly
features such as a robust hexdump command. Windbg users are completely lost when they
occasionally need to bump into GDB or LLDB.
Pwndbg is a Python module which is loaded directly into GDB or LLDB*. It provides a suite of utilities and enhancements that fill the gaps left by these debuggers, smoothing out rough edges and making them more user-friendly.
Many other projects from the past (e.g., gdbinit, PEDA) and present (e.g. GEF) exist to fill some these gaps. Each provides an excellent experience and great features -- but they're difficult to extend (some are unmaintained, and all are a single 100KB, 200KB, or 363KB file (respectively)).
Pwndbg exists not only to replace all of its predecessors, but also to have a clean
implementation that runs quickly and is resilient against all the weird corner cases
that come up. It also comes batteries-included, so all of its features are available
if you run setup.sh
.
Pwndbg supports both GDB and LLDB, and each debugger has its own strengths. Here's a quick guide to help you decide which one to use:
Use Case | Supported Debugger |
---|---|
Debugging Linux binaries or ELF files | GDB, LLDB |
Debugging Mach-O binaries on macOS | LLDB |
Linux kernel debugging (qemu-system) | GDB, LLDB |
Linux user-space emulation (qemu-user) | GDB |
Embedded debugging (ARM Cortex M* or RISC-V/32) | GDB, LLDB |
Pwndbg ensures a consistent experience across both, so switching between them is seamless.
The LLDB implementation in Pwndbg is still in early-stage and may contain bugs or limitations.
Known issues are tracked in GitHub Issues.If you encounter any problems, feel free to report them or discuss on our Discord server.
Feature | Supported Version | Notes |
---|---|---|
pwndbg-gdb | - Python 3.10+ - GDB 12.1+ | Battle-tested on Ubuntu 22.04/24.04 |
pwndbg-lldb | - Python 3.12+ - LLDB 19+ | Experimental/early-stage support |
qemu-user | QEMU 8.1+ | vFile API is needed for vmmap |
qemu-system | QEMU 6.2+ | Supported version since ubuntu 22.04 |
For a portable version with no external dependencies, scroll down for the Portable Installation section.
nix shell github:pwndbg/pwndbg#pwndbg-lldb
pwndbg-lldb ./your-binary
nix shell github:pwndbg/pwndbg
pwndbg ./your-binary
Or download portable version with no external dependencies, scroll down for the Portable Installation section
Or install from source, instructions below.
Installation from source is straightforward:
git clone https://github.com/pwndbg/pwndbg
cd pwndbg
./setup.sh
Pwndbg is supported on Ubuntu 22.04, and 24.04 with GDB 12.1 and later. We do not test
on any older versions of Ubuntu, so pwndbg
may not work on these versions.
We may accept pull requests fixing issues in older versions on a case by case basis,
please discuss this with us on Discord first. You can also always checkout
an older version of pwndbg
from around the time the Ubuntu version you're interested
in was still supported by Canonical, or you can attempt to build a newer version of GDB from source.
Other Linux distributions are also supported via setup.sh
, including:
If you use any Linux distribution other than Ubuntu, we recommend using the latest available GDB built from source. You can build it as:
cd <gdb-sources-dir>
mkdir build && cd build
sudo apt install libgmp-dev libmpfr-dev libreadline-dev texinfo # required by build
../configure --disable-nls --disable-werror --with-system-readline --with-python=`which python3` --with-system-gdbinit=/etc/gdb/gdbinit --enable-targets=all
make -j7
The portable version includes all necessary dependencies and should work without the need to install additional packages.
Download the portable version from the Pwndbg releases page by selecting the desired version.
Note: For LLDB, only the tarball version is available.
Make sure to select the correct file for your operating system and architecture:
Linux (x86_64, armv7l, aarch64, riscv64):
pwndbg_2025.01.20_amd64.tar.xz
(x86_64 for GDB)pwndbg_2025.01.20_armv7.tar.xz
(armv7l for GDB)pwndbg_2025.01.20_arm64.tar.xz
(aarch64 for GDB)pwndbg_2025.01.20_riscv64.tar.xz
(riscv64 for GDB)pwndbg-lldb_2025.01.20_amd64.tar.xz
(x86_64 for LLDB)pwndbg-lldb_2025.01.20_armv7.tar.xz
(armv7l for LLDB)pwndbg-lldb_2025.01.20_arm64.tar.xz
(aarch64 for LLDB)pwndbg-lldb_2025.01.20_riscv64.tar.xz
(riscv64 for LLDB)macOS (amd64, arm64):
pwndbg-lldb_2025.01.20_macos_amd64.tar.xz
(macOS, Intel/AMD CPUs, for LLDB)pwndbg-lldb_2025.01.20_macos_arm64.tar.xz
(macOS, Apple Silicon/M1/M2/M*, for LLDB)pwndbg_2025.01.20_macos_amd64.tar.xz
(macOS, Intel/AMD CPUs for GDB)pwndbg_2025.01.20_macos_amd64.tar.xz
(macOS, Apple Silicon/M1/M2/M*, for GDB via Rosseta emulation)tar -v -xf ./pwndbg_2025.01.20_amd64.tar.xz
# ./pwndbg/bin/pwndbg
# or ./pwndbg/bin/pwndbg-lldb
dnf install ./pwndbg-2025.01.20.x86_64.rpm
# pwndbg
# and/or pwndbg-lldb
apt install ./pwndbg_2025.01.20_amd64.deb
# pwndbg
# and/or pwndbg-lldb
apk add --allow-untrusted ./pwndbg_2025.01.20_x86_64.apk
# pwndbg
# and/or pwndbg-lldb
pacman -U ./pwndbg-2025.01.20-1-x86_64.pkg.tar.zst
# pwndbg
# and/or pwndbg-lldb
For further info about features/functionalities, see FEATURES.
Pwndbg is an open-source project, maintained by many contributors!
Pwndbg was originally created by Zach Riggle, who is no longer with us. We want to thank Zach for all of his contributions to Pwndbg and the wider security community.
Want to help with development? Read CONTRIBUTING or join our Discord server!
To run tests locally you can do this in docker image, after cloning repo run simply
docker-compose run main ./tests.sh
Disclaimer - this won't work on apple silicon macs.
If you have any questions not worthy of a bug report, feel free to ping anybody on Discord and ask away.