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 +---