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:
|
functions:
|
||||||
suid:
|
suid:
|
||||||
- code: |
|
- code: |
|
||||||
LFILE=file_to_change
|
LFILE=file_to_change
|
||||||
./chmod 0777 $LFILE
|
./chmod 6777 $LFILE
|
||||||
sudo:
|
sudo:
|
||||||
- code: |
|
- code: |
|
||||||
LFILE=file_to_change
|
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:
|
functions:
|
||||||
suid:
|
suid:
|
||||||
- code: |
|
- code: |
|
||||||
|
LFILE=file_to_change
|
||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
install -m 4755 `which sh` $TF
|
./install -m 6777 $LFILE $TF
|
||||||
$TF -p
|
|
||||||
sudo:
|
sudo:
|
||||||
- code: |
|
- code: |
|
||||||
|
LFILE=file_to_change
|
||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
sudo install -m 4755 `which sh` $TF
|
sudo install -m 6777 $LFILE $TF
|
||||||
$TF -p
|
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user