1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-11-08 07:49:17 +01:00

Add chmod and chown as suggested in #20

This commit is contained in:
Emilio Pinna 2018-09-05 17:59:07 +01:00
parent f2ab6a6283
commit cb695abfa6
2 changed files with 24 additions and 0 deletions

12
_gtfobins/chmod.md Normal file

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

12
_gtfobins/chown.md Normal file

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