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/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| addr | Yes | ||
| length | Yes | ||
| prot | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |