pwndbg_mprotect
Change memory permissions on a target process by invoking the mprotect syscall, enabling writable or executable regions during exploit development.
Instructions
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/
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>",
"addr": "<addr>",
"length": "<length>",
"prot": "<prot>"
},
"name": "pwndbg_mprotect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| addr | Yes | ||
| length | Yes | ||
| prot | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |