pwndbg-lldb-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pwndbg-lldb-mcp load /tmp/buffer and check heap chunks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pwndbg-lldb-mcp
An MCP server that exposes pwndbg commands running under LLDB as tools for AI assistants. This enables AI-driven binary analysis, exploit development, and reverse engineering through pwndbg's enhanced debugging capabilities.
Features
146 tools spanning 18 categories of pwndbg and LLDB functionality
Session isolation — each debugging session runs in its own LLDB process, identified by UUID
Async PTY communication — commands are sent over a pseudo-terminal with prompt detection and 30-second timeouts
Escape hatch — the
pwndbg_commandtool can run any pwndbg or LLDB command directly
Tool Categories
Category | Examples |
Session Management | start, terminate, list sessions |
Program Loading | load executable, attach to process, load core dump |
Execution Control | run, step, next, finish, continue, nextjmp, nextcall, nextret |
Breakpoints & Watchpoints | set, delete, enable/disable |
Context & Display | pwndbg context — registers, disassembly, stack, backtrace |
Memory Inspection | telescope, hexdump, vmmap, search, read/write |
Registers & CPU State | read/write registers, FPU, CPUID |
Disassembly | nearpc, pdisass, emulate (Unicorn) |
Stack & Arguments | argv, retaddr, dumpargs, canary, backtrace |
ELF / Binary Analysis | checksec, GOT/PLT, PIE offsets, ELF headers |
Heap Analysis | glibc ptmalloc2 — arena, bins, chunks, tcache |
Exploit Development | cyclic patterns, ROP gadgets, patching, assembler, XOR |
Process Information | procinfo, ASLR, auxv, libc info, errno |
WinDbg Compatibility | db, dw, dd, dq memory dump commands |
Darwin / macOS | commpage, plist |
Configuration & Meta | config, theme, tips, version |
LLDB Native | expression eval, type lookup, image list |
Kernel Debugging | kchecksec, ksymbol, slab, paging (via QEMU/kgdb) |
Related MCP server: gdb_mcp
Quick Start
Prerequisites
Python 3.10+
An MCP-compatible AI client (e.g. Claude Desktop, Claude Code)
Install
git clone https://github.com/Micro-Evaluation-Group/pwndbg-lldb-mcp.git
cd pwndbg-lldb-mcp
uv syncThis creates a .venv/ with all dependencies installed. The MCP server must be
run using this venv's Python binary so that mcp and other dependencies are
available. If you're already running inside the activated venv, you can use
python directly; otherwise, use the full path to the venv binary.
Claude Code
Add the MCP server to your project, using the venv's Python binary:
claude mcp add pwndbg-lldb -- /path/to/pwndbg-lldb-mcp/.venv/bin/python /path/to/pwndbg-lldb-mcp/pwndbg_lldb_mcp.pyOr add it globally (available in all projects):
claude mcp add --scope user pwndbg-lldb -- /path/to/pwndbg-lldb-mcp/.venv/bin/python /path/to/pwndbg-lldb-mcp/pwndbg_lldb_mcp.pyClaude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json,
pointing to the venv's Python binary:
{
"mcpServers": {
"pwndbg-lldb": {
"command": "/path/to/pwndbg-lldb-mcp/.venv/bin/python",
"args": ["/path/to/pwndbg-lldb-mcp/pwndbg_lldb_mcp.py"]
}
}
}Usage
Once connected, the AI assistant can:
Start a session —
pwndbg_startspawns an LLDB+pwndbg processLoad a binary —
pwndbg_loadloads an executable for analysisSet breakpoints —
pwndbg_breaksets breakpoints by symbol or addressRun and step —
pwndbg_run,pwndbg_step,pwndbg_next, etc.Inspect state — registers, memory, stack, heap, disassembly
Exploit development — ROP gadgets, cyclic patterns, patching, shellcode
Documentation
Read the docs online — built automatically on every push to main.
Quick Start — installation, configuration, usage
Architecture — PTY communication, session model, tool categories
API Reference — all 146 tools with full docstrings
Build locally
pip install -e ".[docs]"
make -C docs html
open docs/_build/html/index.htmlLicense
MIT
Available Tools
153 toolspwndbg_arenaB
Print the contents of a malloc arena.
pwndbg command: arena Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Shows the malloc_state structure fields including top chunk, bins, system_mem, and other arena metadata. Defaults to the current thread's arena.
Args: session_id: The UUID of the session. addr: Optional arena address (default: current thread's arena).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr. Returns: result
pwndbg_arenasB
List all arenas in the process.
pwndbg command: arenas Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required). Returns: result
pwndbg_argcA
Print the argument count (argc) of the running program.
pwndbg command: argc Source: pwndbg/commands/argv.py Category: Linux/libc/ELF
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/argv/
Inputs: session_id (required). Returns: result
pwndbg_argvA
Print the argument vector (argv) of the running program.
pwndbg command: argv Source: pwndbg/commands/argv.py Category: Linux/libc/ELF
Args: session_id: The UUID of the session. index: Optional specific argv index to print.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/argv/
Inputs: session_id (required), index. Returns: result
pwndbg_aslrA
Check or set the ASLR status.
pwndbg command: aslr Source: pwndbg/commands/aslr.py Category: Linux/libc/ELF
Without arguments, shows the current ASLR setting. With "on" or "off", changes it for the current debugging session.
Args: session_id: The UUID of the session. state: Optional "on" or "off" to change ASLR state.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/aslr/
Inputs: session_id (required), state. Returns: result
pwndbg_asmB
Assemble shellcode into bytes.
pwndbg command: asm Source: pwndbg/commands/asm.py Category: Misc
Assembles the given assembly code and outputs the resulting bytes in the requested format.
Args: session_id: The UUID of the session. shellcode: Assembly code to assemble (e.g. "nop; ret"). format: Output format — "hex" or "string" (default: "hex").
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/asm/
Inputs: session_id (required), shellcode (required), format. Returns: result
pwndbg_attachB
Attach to a running process by PID.
Args: session_id: The UUID of the session. pid: Process ID to attach to.
Inputs: session_id (required), pid (required). Returns: result
pwndbg_auxvA
Print the ELF Auxiliary Vector.
pwndbg command: auxv Source: pwndbg/commands/auxv.py Category: Linux/libc/ELF
Shows the auxiliary vector passed to the process by the kernel, containing info like page size, entry point, platform, UID/GID, etc.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/auxv/
Inputs: session_id (required). Returns: result
pwndbg_backtraceB
Show call stack backtrace (LLDB native).
Args: session_id: The UUID of the session. full: If True, show all frames including library frames. limit: Optional limit on frame count.
Inputs: session_id (required), full, limit. Returns: result
pwndbg_binsA
Print all bin contents — fast, small, large, unsorted, and tcache.
pwndbg command: bins Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Displays a unified view of all bin types in the ptmalloc2 allocator.
Args: session_id: The UUID of the session. addr: Optional arena address. tcache_addr: Optional tcache address.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr, tcache_addr. Returns: result
pwndbg_breakpoint_deleteA
Delete a breakpoint by its ID number.
Args: session_id: The UUID of the session. breakpoint_id: The numeric breakpoint ID to delete.
Inputs: session_id (required), breakpoint_id (required). Returns: result
pwndbg_breakpoint_listA
List all breakpoints in the current session.
Args: session_id: The UUID of the session.
Inputs: session_id (required). Returns: result
pwndbg_breakpoint_list_parsedA
List all breakpoints with structured, machine-parseable output.
Returns a JSON-formatted list of breakpoints, each with: id, name, address, module, resolved, hit_count, auto_continue, enabled
This is more reliable than parsing raw breakpoint list text output,
especially for module-relative breakpoints which have inconsistent
formatting across lldb versions.
Args: session_id: The UUID of the session.
Inputs: session_id (required). Returns: result
pwndbg_bugreportB
Generate a bug report with environment information.
pwndbg command: bugreport Source: pwndbg/commands/version.py Category: Pwndbg
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/version/
Inputs: session_id (required). Returns: result
pwndbg_canaryA
Display the stack canary value.
pwndbg command: canary Source: pwndbg/commands/canary.py Category: Stack
Shows the current stack canary (stack guard) value. The canary is used by stack-smashing protection (SSP / -fstack-protector) to detect buffer overflows.
Args: session_id: The UUID of the session. show_all: If True, show canary for all threads.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/canary/
Inputs: session_id (required), show_all. Returns: result
pwndbg_checksecA
Check binary security properties (RELRO, NX, canary, PIE, RPATH, etc.).
pwndbg command: checksec Source: pwndbg/commands/checksec.py Category: Misc
Analyzes the ELF binary for security mitigations. Shows RELRO level, stack canary, NX (non-executable stack), PIE (position-independent), RPATH/RUNPATH, Fortify, and other compiler/linker security features.
Args: session_id: The UUID of the session. file: Optional path to check (default: loaded binary).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/checksec/
Inputs: session_id (required), file. Returns: result
pwndbg_commB
Add or view comments on assembly addresses.
pwndbg command: comm Source: pwndbg/commands/comments.py Category: Misc
Without arguments, lists all comments. With an address and comment, annotates that address.
Args: session_id: The UUID of the session. addr: Optional address to comment. comment: Optional comment text to add.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/comments/
Inputs: session_id (required), addr, comment. Returns: result
pwndbg_commandA
Execute an arbitrary LLDB or pwndbg command (escape hatch).
Use this for any command not exposed as a dedicated tool. Both native LLDB commands and pwndbg-registered commands are supported.
Args: session_id: The UUID of the session. command: The full command string to execute.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/dbg/lldb/
Inputs: session_id (required), command (required). Returns: result
pwndbg_command_batchA
Execute multiple LLDB/pwndbg commands sequentially in a single call.
This avoids multiple MCP round-trips for setup operations like setting several breakpoints, configuring settings, or running a sequence of inspection commands.
Args: session_id: The UUID of the session. commands: List of command strings to execute in order.
Returns: Combined output from all commands, with clear separators.
Inputs: session_id (required), commands (required). Returns: result
pwndbg_commpageA
Dump values from the macOS commpage.
pwndbg command: commpage Source: pwndbg/commands/commpage.py Category: Darwin/libsystem/Mach-O
The commpage is a shared memory page on macOS that contains kernel-provided data accessible from userspace without syscalls (CPU features, timestamps, etc.).
Args: session_id: The UUID of the session. verbose: If True, show all commpage fields.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/commpage/
Inputs: session_id (required), verbose. Returns: result
pwndbg_configC
Show or set pwndbg configuration options.
pwndbg command: config Source: pwndbg/commands/config.py Category: Pwndbg
Without arguments, shows all pwndbg configuration options. With a filter, shows only matching options.
Args: session_id: The UUID of the session. filter_pattern: Optional pattern to filter config options.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/config/
Inputs: session_id (required), filter_pattern. Returns: result
pwndbg_contextA
Display the pwndbg context — registers, disassembly, stack, backtrace, etc.
pwndbg command: context (alias: ctx) Source: pwndbg/commands/context.py Category: Context
This is pwndbg's signature command. It shows a unified view of the current debugger state including registers, nearby disassembly, stack contents, backtrace, and any additional context sections configured by the user.
Args: session_id: The UUID of the session. sections: Optional space-separated list of sections to show (e.g. "regs disasm stack backtrace").
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/context/
Inputs: session_id (required), sections. Returns: result
pwndbg_contextoutputB
Configure where a context section's output is sent.
pwndbg command: contextoutput (alias: ctx-out) Source: pwndbg/commands/context.py Category: Context
Args: session_id: The UUID of the session. section: The context section name (e.g. "regs", "disasm", "stack"). value: The output target or configuration value.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/context/
Inputs: session_id (required), section (required), value (required). Returns: result
pwndbg_contextunwatchB
Remove a watched expression from the context display.
pwndbg command: contextunwatch (alias: ctx-unwatch, cunwatch) Source: pwndbg/commands/context.py Category: Context
Args: session_id: The UUID of the session. num: The watch number to remove.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/context/
Inputs: session_id (required), num (required). Returns: result
pwndbg_contextwatchA
Add a watched expression to the context display.
pwndbg command: contextwatch (alias: ctx-watch, cwatch) Source: pwndbg/commands/context.py Category: Context
Adds an expression that will be evaluated and displayed every time the context refreshes.
Args: session_id: The UUID of the session. expression: The expression to watch (e.g. "$rax", "(int)$rsp"). cmd: Optional command to use for display (e.g. "hexdump", "telescope").
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/context/
Inputs: session_id (required), expression (required), cmd. Returns: result
pwndbg_continueA
Continue program execution until the next breakpoint or exit.
Blocks until the process stops or times out. Streams intermediate debugger output as MCP progress/log notifications.
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait for the process to stop (default 30).
Inputs: session_id (required), timeout. Returns: result
pwndbg_cpsrA
Display ARM CPSR / xPSR / PSTATE register bits.
pwndbg command: cpsr (aliases: xpsr, pstate) Source: pwndbg/commands/cpsr.py Category: Register Arch: ARM, AArch64 only
Decodes the ARM condition flags register into individual flag bits with human-readable names.
Args: session_id: The UUID of the session. cpsr_value: Optional CPSR value to decode (default: read from register).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/cpsr/
Inputs: session_id (required), cpsr_value. Returns: result
pwndbg_cyclicA
Generate or look up a cyclic (De Bruijn) pattern for offset calculation.
pwndbg command: cyclic Source: pwndbg/commands/cyclic.py Category: Misc
Generates patterns where every N-byte subsequence is unique, making it easy to determine crash offsets. Can also look up a value in the pattern to find the offset.
Args: session_id: The UUID of the session. length: Length of pattern to generate (mutually exclusive with lookup). lookup: Value to look up in the pattern (finds offset). detect: If True, auto-detect the crash offset from registers. count: Pattern element count (default: 100).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/cyclic/
Inputs: session_id (required), length, lookup, detect, +1 more. Returns: result
pwndbg_daC
Dump a string at address (WinDbg-style).
pwndbg command: da Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. address: Address of the string. max_len: Maximum length to display (default: 256).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), address (required), max_len. Returns: result
pwndbg_dbC
Dump N bytes at address (WinDbg-style).
pwndbg command: db Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. address: Address to dump. count: Number of bytes (default: 64).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), address (required), count. Returns: result
pwndbg_dcC
Hexdump with ASCII at address (WinDbg-style).
pwndbg command: dc Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. address: Address to dump. count: Number of entries (default: 8).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), address (required), count. Returns: result
pwndbg_ddB
Dump N dwords (4-byte) at address (WinDbg-style).
pwndbg command: dd Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. address: Address to dump. count: Number of dwords (default: 16).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), address (required), count. Returns: result
pwndbg_ddsA
Dump pointers and resolve symbols at address (WinDbg-style).
pwndbg command: dds (aliases: kd, dps, dqs) Source: pwndbg/commands/windbg.py Category: WinDbg
Shows pointer-sized values with symbol resolution, similar to telescope but in WinDbg format.
Args: session_id: The UUID of the session. addr: Address to dump.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), addr (required). Returns: result
pwndbg_disassembleC
Disassemble code using LLDB's native disassembler.
Args: session_id: The UUID of the session. location: Function name or address to disassemble. count: Number of instructions (default: 10).
Inputs: session_id (required), location, count. Returns: result
pwndbg_distanceA
Calculate the distance between two addresses.
pwndbg command: distance Source: pwndbg/commands/distance.py Category: Memory
If only one argument is given, prints the offset from the address's page base. Useful for calculating offsets for exploits.
Args: session_id: The UUID of the session. a: First address or expression. b: Optional second address or expression.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/distance/
Inputs: session_id (required), a (required), b. Returns: result
pwndbg_dqB
Dump N qwords (8-byte) at address (WinDbg-style).
pwndbg command: dq Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. address: Address to dump. count: Number of qwords (default: 8).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), address (required), count. Returns: result
pwndbg_dtA
Dump type information, optionally overlaid on a memory address.
pwndbg command: dt Source: pwndbg/commands/dt.py Category: Misc
Displays the fields, offsets, and sizes of a struct/type. If an address is provided, reads the memory at that address and displays actual values for each field.
Args: session_id: The UUID of the session. typename: The type name to inspect (e.g. "struct malloc_chunk"). address: Optional memory address to overlay the type onto.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/dt/
Inputs: session_id (required), typename (required), address. Returns: result
pwndbg_dumpargsA
Dump determined arguments for the current call/syscall instruction.
pwndbg command: dumpargs (alias: args) Source: pwndbg/commands/dumpargs.py Category: Misc
Automatically detects the calling convention and displays function arguments with their resolved values at the current call site.
Args: session_id: The UUID of the session. force: If True, force argument dumping even if not at a call site.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/dumpargs/
Inputs: session_id (required), force. Returns: result
pwndbg_dwC
Dump N words (2-byte) at address (WinDbg-style).
pwndbg command: dw Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. address: Address to dump. count: Number of words (default: 32).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), address (required), count. Returns: result
pwndbg_ebC
Write hex bytes at address (WinDbg-style).
pwndbg command: eb Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. address: Address to write to. data: Space-separated hex bytes (e.g. "90 90 90").
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), address (required), data (required). Returns: result
pwndbg_edC
Write hex dwords at address (WinDbg-style).
pwndbg command: ed Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. address: Address to write to. data: Space-separated hex dwords.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), address (required), data (required). Returns: result
pwndbg_elfsectionsB
Print ELF section mappings from the binary header.
pwndbg command: elfsections Source: pwndbg/commands/elf.py Category: Linux/libc/ELF
Shows all ELF sections (.text, .data, .bss, .got, .plt, etc.) with their addresses, sizes, and flags.
Args: session_id: The UUID of the session. no_rebase: If True, show file offsets instead of rebased addresses.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/elf/
Inputs: session_id (required), no_rebase. Returns: result
pwndbg_emulateA
Disassemble with instruction emulation to predict register/memory state.
pwndbg command: emulate Source: pwndbg/commands/nearpc.py Category: Disassemble
Like nearpc but with emulation enabled by default. Shows what registers and memory values would be after each instruction executes, without actually executing them.
Args: session_id: The UUID of the session. address: Address to start emulation (default: $pc). lines: Number of instructions to emulate.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/nearpc/
Inputs: session_id (required), address, lines. Returns: result
pwndbg_entryA
Start the program and stop at its ELF entry point address.
pwndbg command: entry Source: pwndbg/commands/start.py Category: Start
Unlike 'start' (GDB-only), 'entry' works on LLDB. It sets a temporary breakpoint at the binary's entry point and runs.
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait (default 30).
Inputs: session_id (required), timeout. Returns: result
pwndbg_envpA
Print environment variables of the running program.
pwndbg command: envp (aliases: env, environ) Source: pwndbg/commands/argv.py Category: Linux/libc/ELF
Args: session_id: The UUID of the session. name: Optional specific environment variable name.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/argv/
Inputs: session_id (required), name. Returns: result
pwndbg_eqC
Write hex qwords at address (WinDbg-style).
pwndbg command: eq Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. address: Address to write to. data: Space-separated hex qwords.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), address (required), data (required). Returns: result
pwndbg_errnoA
Convert errno to its string representation.
pwndbg command: errno Source: pwndbg/commands/errno.py Category: Linux/libc/ELF
Without arguments, shows the current errno value. With a number, shows the name and description for that error code.
Args: session_id: The UUID of the session. err: Optional error code to look up.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/errno/
Inputs: session_id (required), err. Returns: result
pwndbg_examineB
Examine memory at an address with a specified format (LLDB native).
Args: session_id: The UUID of the session. expression: Address expression to examine. format: Format — x (hex), d (decimal), u (unsigned), o (octal), t (binary), i (instruction), c (char), f (float), s (string). count: Number of elements to display.
Inputs: session_id (required), expression (required), format, count. Returns: result
pwndbg_expressionC
Evaluate an expression in the current frame (LLDB native).
Args: session_id: The UUID of the session. expression: The expression to evaluate.
Inputs: session_id (required), expression (required). Returns: result
pwndbg_fastbinsA
Print the contents of an arena's fastbins.
pwndbg command: fastbins Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Fastbins are singly-linked LIFO free lists for small allocations (up to 0x80 bytes on 64-bit). Shows each fastbin index with its chain.
Args: session_id: The UUID of the session. addr: Optional arena address. verbose: If True, show extended details.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr, verbose. Returns: result
pwndbg_find_fake_fastA
Find fake fastbin chunk candidates near a target address.
pwndbg command: find_fake_fast Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Searches memory near the target for byte sequences that could be interpreted as valid fastbin chunk headers. Used to find targets for fastbin attacks (e.g. overwriting __malloc_hook).
Args: session_id: The UUID of the session. target_address: Address to search near.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), target_address (required). Returns: result
pwndbg_finishA
Execute until the current function returns.
Blocks until the function returns or times out. Streams intermediate debugger output as MCP progress/log notifications.
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait (default 30).
Inputs: session_id (required), timeout. Returns: result
pwndbg_frame_infoB
Get detailed information about a stack frame (LLDB native).
Args: session_id: The UUID of the session. frame_index: Frame index (0 = current frame).
Inputs: session_id (required), frame_index. Returns: result
pwndbg_get_eventsA
Query debugger events recorded for a session.
Returns events such as breakpoint hits, signals, crashes, and process exits detected during command execution or by the background monitor.
Args: session_id: The UUID of the session. limit: Maximum number of events to return (default 50). event_type: Filter by event type (e.g. "breakpoint_hit", "signal", "crash", "exited", "stopped"). None returns all types.
Inputs: session_id (required), limit, event_type. Returns: result
pwndbg_gotB
Show the state of the Global Offset Table.
pwndbg command: got Source: pwndbg/commands/got.py Category: Linux/libc/ELF
Displays GOT entries with their current values, showing which entries point to the PLT stub (unresolved) vs actual library addresses (resolved).
Args: session_id: The UUID of the session. filter_str: Optional filter string to match symbol names.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/got/
Inputs: session_id (required), filter_str. Returns: result
pwndbg_gotpltB
Print symbols found in the .got.plt section.
pwndbg command: gotplt Source: pwndbg/commands/elf.py Category: Linux/libc/ELF
Shows the GOT/PLT entries with their current resolved values. Useful for identifying which library functions have been resolved by the dynamic linker.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/elf/
Inputs: session_id (required). Returns: result
pwndbg_heapA
Iteratively print chunks on a heap.
pwndbg command: heap Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Walks the heap and prints each chunk's metadata (size, flags, fd/bk pointers for freed chunks). Defaults to the current thread's active heap.
Args: session_id: The UUID of the session. addr: Optional arena or heap address. verbose: If True, show extended chunk details.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr, verbose. Returns: result
pwndbg_heap_configB
Show heap-related pwndbg configuration.
pwndbg command: heap-config Source: pwndbg/commands/config.py Category: Pwndbg
Args: session_id: The UUID of the session. filter_pattern: Optional pattern to filter config options.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/config/
Inputs: session_id (required), filter_pattern. Returns: result
pwndbg_helpB
Get help for a command (LLDB native or pwndbg).
Args: session_id: The UUID of the session. command: Optional command name to get help for.
Inputs: session_id (required), command. Returns: result
pwndbg_hex2ptrA
Convert a space-separated hex string to a little-endian address.
pwndbg command: hex2ptr Source: pwndbg/commands/hex2ptr.py Category: Misc
Args: session_id: The UUID of the session. hex_string: Hex bytes separated by spaces (e.g. "41 42 43 44").
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/hex2ptr/
Inputs: session_id (required), hex_string (required). Returns: result
pwndbg_hexdumpB
Hex dump memory at the specified address.
pwndbg command: hexdump Source: pwndbg/commands/hexdump.py Category: Memory
Shows memory in canonical hex+ASCII format, similar to xxd/hexdump.
Args: session_id: The UUID of the session. address: Address or register to dump from (default: $sp). count: Number of bytes to dump. code: Output format — "py" for Python bytes literal, "c" for C array.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/hexdump/
Inputs: session_id (required), address, count, code. Returns: result
pwndbg_hiA
Display heap information for a specific chunk address.
pwndbg command: hi Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Shows which bin a chunk belongs to, its neighbors, and allocation status.
Args: session_id: The UUID of the session. addr: Address of the chunk. verbose: If True, show extended details.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr (required), verbose. Returns: result
pwndbg_hijack_fdA
Replace a file descriptor of the debugged process.
pwndbg command: hijack-fd Source: pwndbg/commands/hijack_fd.py Category: Misc
Redirects an open file descriptor to a new file or socket, useful for redirecting stdin/stdout/stderr during exploitation.
Args: session_id: The UUID of the session. fdnum: File descriptor number to replace. newfile: New file path or socket specification.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/hijack_fd/
Inputs: session_id (required), fdnum (required), newfile (required). Returns: result
pwndbg_info_registersB
Display CPU registers.
Args: session_id: The UUID of the session. register: Optional specific register name to read.
Inputs: session_id (required), register. Returns: result
pwndbg_kbaseA
Show the kernel base address.
pwndbg command: kbase Source: pwndbg/commands/kbase.py Category: Kernel
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/kbase/
Inputs: session_id (required). Returns: result
pwndbg_kchecksecC
Check kernel security configuration (KASLR, SMEP, SMAP, etc.).
pwndbg command: kchecksec Source: pwndbg/commands/kchecksec.py Category: Kernel
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/kchecksec/
Inputs: session_id (required). Returns: result
pwndbg_kcmdlineC
Show the kernel command line.
pwndbg command: kcmdline Source: pwndbg/commands/kcmdline.py Category: Kernel
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/kcmdline/
Inputs: session_id (required). Returns: result
pwndbg_kconfigC
Show kernel config options.
pwndbg command: kconfig Source: pwndbg/commands/kconfig.py Category: Kernel
Args: session_id: The UUID of the session. filter_str: Optional pattern to filter config entries.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/kconfig/
Inputs: session_id (required), filter_str. Returns: result
pwndbg_kdmesgC
Show kernel log messages (dmesg).
pwndbg command: kdmesg Source: pwndbg/commands/kdmesg.py Category: Kernel
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/kdmesg/
Inputs: session_id (required). Returns: result
pwndbg_killB
Kill the running process.
Args: session_id: The UUID of the session.
Inputs: session_id (required). Returns: result
pwndbg_kmodB
Show loaded kernel modules.
pwndbg command: kmod Source: pwndbg/commands/kmod.py Category: Kernel
Args: session_id: The UUID of the session. filter_str: Optional pattern to filter modules.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/kmod/
Inputs: session_id (required), filter_str. Returns: result
pwndbg_ksyscallsB
Show syscall table information.
pwndbg command: ksyscalls Source: pwndbg/commands/ksyscalls.py Category: Kernel
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ksyscalls/
Inputs: session_id (required). Returns: result
pwndbg_ktaskB
Show kernel task/process information.
pwndbg command: ktask Source: pwndbg/commands/ktask.py Category: Kernel
Args: session_id: The UUID of the session. pid: Optional PID to show info for.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ktask/
Inputs: session_id (required), pid. Returns: result
pwndbg_kversionA
Show kernel version.
pwndbg command: kversion Source: pwndbg/commands/kversion.py Category: Kernel
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/kversion/
Inputs: session_id (required). Returns: result
pwndbg_largebinsA
Print the contents of an arena's large bins.
pwndbg command: largebins Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Large bins hold chunks >= 0x400 bytes (64-bit) in doubly-linked lists sorted by size within each bin.
Args: session_id: The UUID of the session. addr: Optional arena address. verbose: If True, show extended details.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr, verbose. Returns: result
pwndbg_leakfindA
Attempt to find a pointer leak chain from a starting address.
pwndbg command: leakfind Source: pwndbg/commands/leakfind.py Category: Memory
Walks pointer chains to find paths from a controlled region to interesting targets (libc, stack, etc.). Extremely useful for exploit development.
Args: session_id: The UUID of the session. address: Starting address (default: $sp). page_name: Target page name to reach. max_depth: Maximum chain depth (default: 4).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/leakfind/
Inputs: session_id (required), address, page_name, max_depth. Returns: result
pwndbg_libcinfoA
Show information about the loaded libc (version, build, offsets).
pwndbg command: libcinfo Source: pwndbg/commands/libcinfo.py Category: Linux/libc/ELF
Displays the libc version, build ID, and paths. Useful for identifying the exact libc for exploit development.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/libcinfo/
Inputs: session_id (required). Returns: result
pwndbg_linkmapA
Show the dynamic linker's link map (loaded shared objects).
pwndbg command: linkmap Source: pwndbg/commands/linkmap.py Category: Linux/libc/ELF
Displays the linked list of loaded shared objects maintained by the dynamic linker (ld.so), showing base addresses and file paths.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/linkmap/
Inputs: session_id (required). Returns: result
pwndbg_list_sessionsA
List all active pwndbg sessions with their IDs, targets, and working directories.
Inputs: no named parameters. Returns: result
pwndbg_lnA
List the symbols nearest to the provided value.
pwndbg command: ln Source: pwndbg/commands/windbg.py Category: WinDbg
Args: session_id: The UUID of the session. value: Address or value to look up symbols near.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/windbg/
Inputs: session_id (required), value. Returns: result
pwndbg_loadC
Load a program into the debugger.
Sets the target executable and optional arguments. The program path is resolved relative to the session's working directory if not absolute.
Args: session_id: The UUID of the session. program: Path to the executable. arguments: Optional list of program arguments.
Inputs: session_id (required), program (required), arguments. Returns: result
pwndbg_load_coreB
Load a core dump file for post-mortem analysis.
Args: session_id: The UUID of the session. program: Path to the executable that generated the core. core_path: Path to the core dump file.
Inputs: session_id (required), program (required), core_path (required). Returns: result
pwndbg_malloc_chunkC
Display detailed information about a specific malloc chunk.
pwndbg command: malloc_chunk Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Shows the chunk header fields (prev_size, size, flags) and for freed chunks, the fd/bk pointers.
Args: session_id: The UUID of the session. addr: Address of the malloc chunk.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr (required). Returns: result
pwndbg_mmapA
Call the mmap syscall to allocate new memory in the target process.
pwndbg command: mmap Source: pwndbg/commands/mmap.py Category: Memory
Directly invokes mmap(2) on the target. Useful for creating executable shellcode regions or scratch memory during exploitation.
Args: session_id: The UUID of the session. addr: Desired address (0 for OS-chosen). length: Size of mapping (default: 0x1000). prot: Protection flags (default: "7" = rwx). flags: mmap flags (default: "0x22" = MAP_PRIVATE | MAP_ANONYMOUS).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/mmap/
Inputs: session_id (required), addr, length, prot, +1 more. Returns: result
pwndbg_mpA
Print the mp_ (malloc parameters) struct contents.
pwndbg command: mp Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Shows global malloc tuning parameters like mmap_threshold, trim_threshold, top_pad, etc.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required). Returns: result
pwndbg_mprotectA
Call the mprotect syscall to change memory permissions.
pwndbg command: mprotect Source: pwndbg/commands/mprotect.py Category: Memory
Directly invokes mprotect(2) on the target process. Useful for making regions writable or executable during exploit development.
Args: session_id: The UUID of the session. addr: Address of the memory region. length: Length of the region in bytes. prot: Protection flags (e.g. "7" for rwx, "5" for r-x).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/mprotect/
Inputs: session_id (required), addr (required), length (required), prot (required). Returns: result
pwndbg_nearpcB
Disassemble instructions near the PC with enhanced annotation.
pwndbg command: nearpc (aliases: pdisass, u) Source: pwndbg/commands/nearpc.py Category: Disassemble
pwndbg's enhanced disassembler that shows resolved symbols, register values, memory dereferences, and branch target annotations inline with the disassembly.
Args: session_id: The UUID of the session. address: Address to disassemble at (default: $pc). lines: Number of instructions to show. emulate: If True, emulate instructions to show predicted register values.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/nearpc/
Inputs: session_id (required), address, lines, emulate. Returns: result
pwndbg_nextA
Step over the next source line or instruction (does not enter calls).
Args: session_id: The UUID of the session. instructions: If True, step over a single machine instruction (ni) instead of a source line (n).
Inputs: session_id (required), instructions. Returns: result
pwndbg_nextcallA
Break at the next call instruction, optionally filtered by symbol regex.
pwndbg command: nextcall Source: pwndbg/commands/next.py Category: Step/Next/Continue
Args: session_id: The UUID of the session. symbol_regex: Optional regex to match the call target symbol name. timeout: Maximum seconds to wait (default 30).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/next/
Inputs: session_id (required), symbol_regex, timeout. Returns: result
pwndbg_nextjmpA
Break at the next jump instruction.
pwndbg command: nextjmp (alias: nextjump) Source: pwndbg/commands/next.py Category: Step/Next/Continue
Continues execution until the next jump-type instruction (jmp, je, jne, etc.) is reached, which is useful for tracing control flow decisions.
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait (default 30).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/next/
Inputs: session_id (required), timeout. Returns: result
pwndbg_nextproginstrA
Break at the next instruction belonging to the running program.
pwndbg command: nextproginstr Source: pwndbg/commands/next.py Category: Step/Next/Continue
Useful for skipping over library code to reach the next instruction that belongs to the main binary.
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait (default 30).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/next/
Inputs: session_id (required), timeout. Returns: result
pwndbg_nextretA
Break at the next return-like instruction (ret, retf, iret, sysret).
pwndbg command: nextret Source: pwndbg/commands/next.py Category: Step/Next/Continue
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait (default 30).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/next/
Inputs: session_id (required), timeout. Returns: result
pwndbg_nextsyscallA
Break at the next syscall instruction (without taking branches).
pwndbg command: nextsyscall (alias: nextsc) Source: pwndbg/commands/next.py Category: Step/Next/Continue
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait (default 30).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/next/
Inputs: session_id (required), timeout. Returns: result
pwndbg_onegadgetA
Find one-gadget (magic gadget) RCE gadgets in libc.
pwndbg command: onegadget Source: pwndbg/commands/onegadget.py Category: Linux/libc/ELF Arch: x86-64, i386, aarch64
Searches for single-gadget code paths in libc that directly call execve("/bin/sh", ...). These are the holy grail for exploitation since overwriting a single function pointer gives a shell.
Args: session_id: The UUID of the session. verbose: If True, show constraint details.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/onegadget/
Inputs: session_id (required), verbose. Returns: result
pwndbg_p2pB
Pointer-to-pointer chain search across memory mappings.
pwndbg command: p2p Source: pwndbg/commands/p2p.py Category: Memory
Finds chains of pointers between different memory regions, useful for discovering pivot chains in exploit development.
Args: session_id: The UUID of the session. mapping_names: Optional comma-separated list of mapping name ranges to search.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/p2p/
Inputs: session_id (required), mapping_names. Returns: result
pwndbg_pagewalkB
Walk page tables for a virtual address.
pwndbg command: pagewalk Source: pwndbg/commands/paging.py Category: Kernel
Shows the full page table walk: PGD → P4D → PUD → PMD → PTE, with the physical frame number and page flags at each level.
Args: session_id: The UUID of the session. address: Virtual address to walk.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/paging/
Inputs: session_id (required), address (required). Returns: result
pwndbg_parse_seccompA
Parse a seccomp BPF filter from memory and dump its rules.
pwndbg command: parse-seccomp Source: pwndbg/commands/parse_seccomp.py Category: Linux/libc/ELF
Reads a struct sock_fprog from memory and disassembles the BPF filter program to show which syscalls are allowed/denied.
Args: session_id: The UUID of the session. addr: Address of the sock_fprog structure.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/parse_seccomp/
Inputs: session_id (required), addr (required). Returns: result
pwndbg_patchA
Patch an instruction at the given address with new code or bytes.
pwndbg command: patch Source: pwndbg/commands/patch.py Category: Misc
Assembles the given instruction and writes the bytes at the target address. Useful for live-patching binaries during analysis.
Args: session_id: The UUID of the session. address: Address to patch. instruction: Assembly instruction or hex bytes to write.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/patch/
Inputs: session_id (required), address (required), instruction (required). Returns: result
pwndbg_patch_listB
List all applied patches.
pwndbg command: patch-list Source: pwndbg/commands/patch.py Category: Misc
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/patch/
Inputs: session_id (required). Returns: result
pwndbg_patch_revertB
Revert a patch at the given address.
pwndbg command: patch-revert Source: pwndbg/commands/patch.py Category: Misc
Args: session_id: The UUID of the session. address: Address of the patch to revert.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/patch/
Inputs: session_id (required), address (required). Returns: result
pwndbg_pidA
Get the PID of the running process.
pwndbg command: pid (alias: getpid) Source: pwndbg/commands/procinfo.py Category: Process
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/procinfo/
Inputs: session_id (required). Returns: result
pwndbg_piebaseA
Calculate the virtual address from a PIE-relative offset.
pwndbg command: piebase Source: pwndbg/commands/pie.py Category: Linux/libc/ELF
For PIE binaries, converts a file offset (RVA) to a runtime virtual address by adding the PIE base.
Args: session_id: The UUID of the session. offset: Offset from PIE base to calculate (default: 0 = show base). module: Optional module name (default: main binary).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/pie/
Inputs: session_id (required), offset, module. Returns: result
pwndbg_plistA
Dump elements of a linked list structure.
pwndbg command: plist Source: pwndbg/commands/plist.py Category: Misc
Walks a linked list starting at path, following the next field,
and displaying each element.
Args: session_id: The UUID of the session. path: Starting address or expression for the list head. next_field: Name of the 'next' pointer field. count: Optional maximum number of elements to show.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/plist/
Inputs: session_id (required), path (required), next_field (required), count. Returns: result
pwndbg_pltB
Print symbols found in Procedure Linkage Table sections.
pwndbg command: plt Source: pwndbg/commands/elf.py Category: Linux/libc/ELF
Args: session_id: The UUID of the session. all_symbols: If True, show all PLT symbols including internal ones.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/elf/
Inputs: session_id (required), all_symbols. Returns: result
pwndbg_printB
Print value of an expression (LLDB native).
Args: session_id: The UUID of the session. expression: The expression to evaluate and print.
Inputs: session_id (required), expression (required). Returns: result
pwndbg_probeleakA
Pointer-scan memory for possible information leaks.
pwndbg command: probeleak Source: pwndbg/commands/probeleak.py Category: Memory
Scans memory at the given address for values that look like pointers into known regions (stack, heap, libc, binary, etc.), which could indicate exploitable information leaks.
Args: session_id: The UUID of the session. address: Address to start scanning (default: $sp). count: Number of bytes to scan (default: 0x40). max_distance: Maximum distance for pointer matching (0 = unlimited).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/probeleak/
Inputs: session_id (required), address, count, max_distance. Returns: result
pwndbg_process_infoC
Get LLDB process status and info (LLDB native).
Args: session_id: The UUID of the session.
Inputs: session_id (required). Returns: result
pwndbg_procinfoC
Display detailed process information.
pwndbg command: procinfo Source: pwndbg/commands/procinfo.py Category: Process
Shows process details including PID, executable path, architecture, endianness, and other metadata.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/procinfo/
Inputs: session_id (required). Returns: result
pwndbg_pwndbgB
List all available pwndbg commands.
pwndbg command: pwndbg Source: pwndbg/commands/pwndbg_.py Category: Pwndbg
Shows a categorized list of all registered pwndbg commands with brief descriptions.
Args: session_id: The UUID of the session. filter_pattern: Optional pattern to filter commands.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/pwndbg_/
Inputs: session_id (required), filter_pattern. Returns: result
pwndbg_r2A
Execute a radare2 command on the current binary.
pwndbg command: r2 Source: pwndbg/commands/radare2.py Category: Integrations
Requires radare2 (r2) to be installed. Passes the command to r2 for analysis of the loaded binary.
Args: session_id: The UUID of the session. args: radare2 command arguments.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/radare2/
Inputs: session_id (required), args. Returns: result
pwndbg_retaddrB
Print stack addresses that contain return addresses.
pwndbg command: retaddr Source: pwndbg/commands/retaddr.py Category: Stack
Scans the stack for values that look like return addresses (pointers into executable regions), useful for finding ROP pivot targets.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/retaddr/
Inputs: session_id (required). Returns: result
pwndbg_ropC
Find ROP gadgets using ROPgadget.
pwndbg command: rop (alias: ropgadget) Source: pwndbg/commands/rop.py Category: Integrations
Searches the loaded binary for useful ROP gadgets. Requires ROPgadget to be installed.
Args: session_id: The UUID of the session. grep: Optional regex to filter gadgets.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/rop/
Inputs: session_id (required), grep. Returns: result
pwndbg_runA
Run the loaded program from the beginning.
Blocks until the process stops (breakpoint, signal, exit) or times out. Streams intermediate debugger output as MCP progress/log notifications.
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait for the process to stop (default 30).
Inputs: session_id (required), timeout. Returns: result
pwndbg_run_until_stopA
Run or continue the program and block until it stops or exits.
Waits until the process reaches a stopped state (breakpoint, crash, signal) or exits, then returns the stop reason along with register context. Streams intermediate debugger output as MCP progress/log notifications so the client can observe execution in real-time.
Args: session_id: The UUID of the session. action: "run" to start from beginning, "continue" to resume. timeout: Maximum seconds to wait for the process to stop.
Inputs: session_id (required), action, timeout. Returns: result
pwndbg_rzB
Execute a Rizin command on the current binary.
pwndbg command: rz Source: pwndbg/commands/rizin.py Category: Integrations
Requires Rizin to be installed.
Args: session_id: The UUID of the session. args: Rizin command arguments.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/rizin/
Inputs: session_id (required), args. Returns: result
pwndbg_searchA
Search process memory for byte sequences, strings, pointers, or integers.
pwndbg command: search Source: pwndbg/commands/search.py Category: Memory
Searches all mapped memory regions for the given value. Supports multiple search types and can be filtered to specific permission regions.
Args: session_id: The UUID of the session. value: The value to search for. type: Search type — "bytes", "byte", "short", "dword", "qword", "pointer", "string". hex_encoded: If True, interpret value as hex-encoded bytes. executable: If True, only search executable regions. writable: If True, only search writable regions.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/search/
Inputs: session_id (required), value (required), type, hex_encoded, +2 more. Returns: result
pwndbg_set_breakpointA
Set a breakpoint at the given location, optionally with a condition.
Args: session_id: The UUID of the session. location: Function name, address, or file:line to break at. condition: Optional condition expression for the breakpoint.
Inputs: session_id (required), location (required), condition. Returns: result
pwndbg_set_breakpoint_advancedA
Set a breakpoint with full control over address, module, auto-continue, and naming.
Supports all common breakpoint styles:
By function name: name="CreateXmlReader"
By address: address="0x10027cacc"
By module+offset: module="Xmllite", offset="0x3cf8"
By file+line: address="file.c:42"
Args: session_id: The UUID of the session. address: Address or file:line expression. Mutually exclusive with name. name: Symbol name to break on. Mutually exclusive with address. module: Restrict breakpoint to this module (e.g., "Xmllite"). offset: Module-relative offset (hex string). Requires module to be set. auto_continue: If True, breakpoint auto-continues (counts hits without stopping). bp_name: Assign a human-readable name to the breakpoint for later reference. condition: Optional condition expression (breakpoint only fires if true). one_shot: If True, breakpoint is deleted after first hit.
Inputs: session_id (required), address, name, module, +5 more. Returns: result
pwndbg_setflagB
Modify a CPU flag in the flags register.
pwndbg command: setflag (alias: flag) Source: pwndbg/commands/flags.py Category: Register
Allows setting individual flag bits (ZF, CF, SF, OF, etc.) without modifying the entire flags register.
Args: session_id: The UUID of the session. flag: Flag name (e.g. "ZF", "CF", "SF", "OF"). value: Value to set (0 or 1).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/flags/
Inputs: session_id (required), flag (required), value (required). Returns: result
pwndbg_sigreturnA
Display the SigreturnFrame at a specific address.
pwndbg command: sigreturn Source: pwndbg/commands/sigreturn.py Category: Misc Arch: x86-64, i386, aarch64, arm
Parses and displays a sigreturn frame structure, which is used in SROP (Sigreturn-Oriented Programming) exploits.
Args: session_id: The UUID of the session. address: Address of the sigreturn frame (default: auto-detect).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/sigreturn/
Inputs: session_id (required), address. Returns: result
pwndbg_slabC
Display kernel slab cache information.
pwndbg command: slab Source: pwndbg/commands/slab.py Category: Kernel
Args: session_id: The UUID of the session. cache_name: Optional slab cache name to inspect.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/slab/
Inputs: session_id (required), cache_name. Returns: result
pwndbg_smallbinsA
Print the contents of an arena's small bins.
pwndbg command: smallbins Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Small bins hold chunks from 0x20 to 0x3F0 bytes (64-bit) in doubly-linked lists sorted by size.
Args: session_id: The UUID of the session. addr: Optional arena address. verbose: If True, show extended details.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr, verbose. Returns: result
pwndbg_sprayA
Spray memory with cyclic pattern values.
pwndbg command: spray Source: pwndbg/commands/spray.py Category: Misc
Writes cyclic() generated values to memory, useful for identifying which offset in a buffer overwrites a target.
Args: session_id: The UUID of the session. addr: Address to start spraying. length: Number of bytes to spray (0 = auto).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/spray/
Inputs: session_id (required), addr (required), length. Returns: result
pwndbg_stackB
Show stack contents using telescope-style dereference display.
pwndbg command: stack Source: pwndbg/commands/telescope.py Category: Stack
Equivalent to telescope $sp with extra stack-aware formatting.
Args: session_id: The UUID of the session. count: Number of entries to show (default: 8). offset: Offset from $sp in pointer-sized units.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/telescope/
Inputs: session_id (required), count, offset. Returns: result
pwndbg_stackfB
Show the entire current stack frame contents.
pwndbg command: stackf Source: pwndbg/commands/telescope.py Category: Stack
Dereferences the stack from $sp to $bp, showing the entire current stack frame.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/telescope/
Inputs: session_id (required). Returns: result
pwndbg_startA
Start a new LLDB session with pwndbg loaded.
Spawns an LLDB process, optionally loads pwndbg via command script import,
and returns a session ID for subsequent commands.
Args:
lldb_path: Path to the LLDB binary (default: "lldb").
working_dir: Working directory for the session.
pwndbg_path: Path to pwndbg's lldbinit.py entry point. If provided,
pwndbg will be loaded automatically via command script import.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/dbg/lldb/
Inputs: lldb_path, working_dir, pwndbg_path. Returns: result
pwndbg_start_monitorA
Start the background event monitor for a session.
The monitor watches for asynchronous debugger events (breakpoint hits, signals, crashes) between tool calls. Events are recorded in the session's event log and trigger MCP resource-updated notifications.
This is optional — all core debugging functionality works without the monitor. The monitor is useful for long-running programs where events may occur outside of active tool calls.
Args: session_id: The UUID of the session.
Inputs: session_id (required). Returns: result
pwndbg_stepA
Step into the next source line or instruction.
Args: session_id: The UUID of the session. instructions: If True, step a single machine instruction (si) instead of a source line (s).
Inputs: session_id (required), instructions. Returns: result
pwndbg_stepoverB
Set a breakpoint on the instruction after the current one and continue.
pwndbg command: stepover (alias: so) Source: pwndbg/commands/next.py Category: Step/Next/Continue
This is pwndbg's enhanced step-over that works at the instruction level by setting a breakpoint on the next instruction address.
Args: session_id: The UUID of the session. addr: Optional address to step over at (defaults to current PC). timeout: Maximum seconds to wait (default 30).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/next/
Inputs: session_id (required), addr, timeout. Returns: result
pwndbg_stepretA
Step to the next return instruction (single-steps until ret is found).
pwndbg command: stepret Source: pwndbg/commands/next.py Category: Step/Next/Continue
Unlike nextret which sets a breakpoint, this command single-steps through every instruction until a return instruction is reached.
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait (default 30).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/next/
Inputs: session_id (required), timeout. Returns: result
pwndbg_stepsyscallA
Step to the next syscall instruction (follows branches).
pwndbg command: stepsyscall (alias: stepsc) Source: pwndbg/commands/next.py Category: Step/Next/Continue
Unlike nextsyscall, this follows branches by single-stepping through all instructions until a syscall is found.
Args: session_id: The UUID of the session. timeout: Maximum seconds to wait (default 30).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/next/
Inputs: session_id (required), timeout. Returns: result
pwndbg_stepuntilasmA
Step until a specific assembly instruction is reached.
pwndbg command: stepuntilasm Source: pwndbg/commands/next.py Category: Step/Next/Continue
Single-steps until an instruction matching the given mnemonic (and optionally operand string) is found. This can be slow, so the default timeout is 60s.
Args: session_id: The UUID of the session. mnemonic: The instruction mnemonic to match (e.g. "syscall", "call", "mov"). op_str: Optional operand string to match. timeout: Maximum seconds to wait (default 60).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/next/
Inputs: session_id (required), mnemonic (required), op_str, timeout. Returns: result
pwndbg_stop_monitorC
Stop the background event monitor for a session.
Args: session_id: The UUID of the session.
Inputs: session_id (required). Returns: result
pwndbg_stringsA
Extract ASCII strings from readable memory pages.
pwndbg command: strings Source: pwndbg/commands/strings.py Category: Linux/libc/ELF
Scans all readable memory pages for printable ASCII strings, similar
to the strings Unix utility but operating on the live process memory.
Args: session_id: The UUID of the session. n: Minimum string length (default: 4).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/strings/
Inputs: session_id (required), n. Returns: result
pwndbg_tcacheB
Print tcache contents for the current thread.
pwndbg command: tcache Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Thread-local caching (tcache) was introduced in glibc 2.26. Each thread has 64 singly-linked bins for small allocations, providing fast thread-local allocation without arena locks.
Args: session_id: The UUID of the session. addr: Optional tcache address.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr. Returns: result
pwndbg_tcachebinsB
Print tcache bin entries (free list chains per size class).
pwndbg command: tcachebins Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Args: session_id: The UUID of the session. addr: Optional tcache address. verbose: If True, show extended details.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr, verbose. Returns: result
pwndbg_telescopeA
Recursively dereference pointers starting at an address (default: $sp).
pwndbg command: telescope Source: pwndbg/commands/telescope.py Category: Memory
Telescope is one of pwndbg's most useful commands. It reads pointer-sized values from memory and follows the chain of dereferences, showing the ultimate value (string, address, symbol, etc.).
Args: session_id: The UUID of the session. address: Starting address or register (default: $sp). count: Number of pointer-sized entries to show. reverse: If True, show entries in reverse order.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/telescope/
Inputs: session_id (required), address, count, reverse. Returns: result
pwndbg_terminateA
Terminate a pwndbg session and free all resources.
Args: session_id: The UUID of the session to terminate.
Inputs: session_id (required). Returns: result
pwndbg_themeB
Show or set pwndbg theme/color configuration.
pwndbg command: theme Source: pwndbg/commands/config.py Category: Pwndbg
Args: session_id: The UUID of the session. filter_pattern: Optional pattern to filter theme options.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/config/
Inputs: session_id (required), filter_pattern. Returns: result
pwndbg_thread_listC
List all threads in the current process (LLDB native).
Args: session_id: The UUID of the session.
Inputs: session_id (required). Returns: result
pwndbg_threadsA
List all threads with pwndbg's enhanced formatting.
pwndbg command: threads Source: pwndbg/commands/tls.py Category: Linux/libc/ELF
Shows threads with their IDs, names, and current PC locations using pwndbg's enhanced display format.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/tls/
Inputs: session_id (required). Returns: result
pwndbg_thread_selectB
Select a specific thread and show its backtrace.
Args: session_id: The UUID of the session. thread_id: The thread index to select.
Inputs: session_id (required), thread_id (required). Returns: result
pwndbg_tipsB
Show pwndbg usage tips.
pwndbg command: tips Source: pwndbg/commands/tips.py Category: Misc
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/tips/
Inputs: session_id (required). Returns: result
pwndbg_tlsC
Print the Thread Local Storage (TLS) base address.
pwndbg command: tls Source: pwndbg/commands/tls.py Category: Linux/libc/ELF
Shows the TLS base address and optionally the full TLS structure contents. The TLS contains thread-local variables, the stack canary, and other per-thread data.
Args: session_id: The UUID of the session.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/tls/
Inputs: session_id (required). Returns: result
pwndbg_top_chunkA
Print information about the top chunk (wilderness) of an arena.
pwndbg command: top_chunk Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
The top chunk is the last chunk in the heap, used to service allocations when no suitable freed chunk is available.
Args: session_id: The UUID of the session. addr: Optional arena address.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr. Returns: result
pwndbg_try_freeA
Simulate what would happen if free() were called on an address.
pwndbg command: try_free Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Walks through glibc's free() logic and reports which checks would pass or fail. Invaluable for debugging heap exploits — shows exactly why a crafted chunk would or wouldn't pass free()'s validation.
Args: session_id: The UUID of the session. addr: Address to simulate freeing.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr (required). Returns: result
pwndbg_unsortedbinA
Print the contents of an arena's unsorted bin.
pwndbg command: unsortedbin Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
The unsorted bin is a doubly-linked list where freed chunks go before being sorted into small/large bins. A key target for heap exploits.
Args: session_id: The UUID of the session. addr: Optional arena address. verbose: If True, show extended details.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr, verbose. Returns: result
pwndbg_valistB
Dump the arguments of a va_list (variadic argument list).
pwndbg command: valist Source: pwndbg/commands/valist.py Category: Misc
Args: session_id: The UUID of the session. addr: Address of the va_list structure. count: Number of arguments to dump (default: 8).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/valist/
Inputs: session_id (required), addr (required), count. Returns: result
pwndbg_vis_heap_chunksB
Visualize heap chunks with a colorful graphical representation.
pwndbg command: vis_heap_chunks (alias: vis) Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Renders heap chunks as a visual map with color-coded regions showing chunk boundaries, headers, and data. One of pwndbg's most distinctive features for heap analysis.
Args: session_id: The UUID of the session. addr: Optional starting address.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Inputs: session_id (required), addr. Returns: result
pwndbg_vmmapA
Print the virtual memory map of the process.
pwndbg command: vmmap (aliases: lm, address, vprot, libs) Source: pwndbg/commands/vmmap.py Category: Memory
Shows all memory regions with their start/end addresses, permissions, and mapped file names. Can be filtered by address, module name, or permission flags.
Args: session_id: The UUID of the session. filter_str: Optional filter — an address or module name substring. writable: If True, only show writable regions. executable: If True, only show executable regions.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/vmmap/
Inputs: session_id (required), filter_str, writable, executable. Returns: result
pwndbg_watchpointA
Set a watchpoint on a memory address or variable.
Args: session_id: The UUID of the session. expression: The variable or address expression to watch. watch_type: Type of access to watch — "read", "write", or "read_write".
Inputs: session_id (required), expression (required), watch_type. Returns: result
pwndbg_xinfoB
Show extended information about an address — offsets from useful locations.
pwndbg command: xinfo Source: pwndbg/commands/xinfo.py Category: Memory
Displays what memory region the address belongs to, along with offsets from the base of the containing page, binary, stack, heap, etc.
Args: session_id: The UUID of the session. address: Address to inspect (default: $pc).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/xinfo/
Inputs: session_id (required), address. Returns: result
pwndbg_xorB
XOR memory at the given address with a key.
pwndbg command: xor Source: pwndbg/commands/xor.py Category: Memory
XORs count bytes at address with the repeating key byte(s).
Useful for decoding XOR-encoded payloads in memory.
Args: session_id: The UUID of the session. address: Address of the data to XOR. key: XOR key (hex string). count: Number of bytes to XOR.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/xor/
Inputs: session_id (required), address (required), key (required), count (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 153 tools
Many tools have overlapping purposes (e.g., multiple bin types: fastbins, smallbins, largebins, unsortedbin, tcachebins, plus generic bins). Also, numerous stepping/next commands (nextcall, nextjmp, nextret, etc.) have subtle distinctions that are hard to differentiate. An agent would frequently misselect.
All tools follow a consistent 'pwndbg_' prefix with lowercase and underscores, matching the original pwndbg command names. However, there is no verb-noun pattern; most are simple nouns (e.g., pwndbg_heap, pwndbg_arena). This is acceptable but slightly less predictable.
153 tools is excessive for an MCP server. While pwndbg is feature-rich, exposing every command as a separate tool overwhelms agents. Many tools are niche (e.g., pwndbg_tips, pwndbg_bugreport) and could be combined or omitted. A typical debugger server should have 10-30 tools.
The tool set covers most pwndbg features, including heap analysis, kernel debugging, memory inspection, and stepping. However, some fundamental debugger operations are missing (e.g., direct register write beyond flags, or a generic memory write tool). There are also redundant equivalents (e.g., both LLDB native and pwndbg versions of thread listing).
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
MCP server for AI dialogue using various LLM models via AceDataCloud
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that exposes GDB debugging as tools. An AI assistant can set breakpoints, run programs, step through code, inspect variables and memory, and examine registers — all via structured tool calls. Reverse debugging with rr is also supported.343MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to control GDB debugging sessions, including breakpoint management, thread analysis, and variable inspection, using the GDB/MI protocol.221MIT
- AlicenseAqualityCmaintenanceA multi-backend MCP server that exposes binary analysis capabilities from IDA Pro and Ghidra, allowing LLMs to directly drive reverse-engineering tools via natural language.11180Apache 2.0
- AlicenseBqualityDmaintenanceMCP server that wraps gdb to enable LLMs to drive live debugging sessions, including starting sessions on binaries, attaching to processes, and running commands.71,840 PyPI4MIT