From cb695abfa6f260d97d71f437d62324e09a296f6c Mon Sep 17 00:00:00 2001 From: Emilio Pinna Date: Wed, 5 Sep 2018 17:59:07 +0100 Subject: [PATCH] Add chmod and chown as suggested in #20 --- _gtfobins/chmod.md | 12 ++++++++++++ _gtfobins/chown.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 _gtfobins/chmod.md create mode 100644 _gtfobins/chown.md diff --git a/_gtfobins/chmod.md b/_gtfobins/chmod.md new file mode 100644 index 0000000..f61b194 --- /dev/null +++ b/_gtfobins/chmod.md @@ -0,0 +1,12 @@ +--- +description: This can be run with elevated privileges to change permissions and then read, write, or execute a file. +functions: + suid-enabled: + - code: | + LFILE=file_to_change + ./chmod 0777 $LFILE + sudo-enabled: + - code: | + LFILE=file_to_change + sudo chmod 0777 $LFILE +--- diff --git a/_gtfobins/chown.md b/_gtfobins/chown.md new file mode 100644 index 0000000..0414645 --- /dev/null +++ b/_gtfobins/chown.md @@ -0,0 +1,12 @@ +--- +description: This can be run with elevated privileges to change ownership and then read, write, or execute a file. +functions: + suid-enabled: + - code: | + LFILE=file_to_change + ./chown $(id -un):$(id -gn) $LFILE + sudo-enabled: + - code: | + LFILE=file_to_change + sudo chown $(id -un):$(id -gn) $LFILE +---