pwndbg_patch
Writes assembly instructions or hex bytes to a specified memory address, enabling live-patching of binaries during analysis.
Instructions
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/
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"address": "<address>",
"instruction": "<instruction>"
},
"name": "pwndbg_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| address | Yes | ||
| instruction | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |