pwndbg_hijack_fd
Redirect any open file descriptor to a new file or socket, enabling stdin/stdout/stderr manipulation during exploit development.
Instructions
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/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| fdnum | Yes | ||
| newfile | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |