/* * A new bug a new change to hack me * * this one will train ur puzzel ability`s a bit :D * have fun !! * * Rules: * 1. NO RETURN INTO LIBC !!. * 2. Only normal shellcode's are allowed. * * Enjoy the game. * rave[at]dtors * */ #include #include #include #include #include #ifndef true #define true 1 #ifndef false #define false 0 #endif #endif #define x0r 0x2e char me[200]; char *rave(char *src,int len) { int i=0; unsigned int count=1; int oh,yo; unsigned char dst[len]; memset(dst,0x00,len); while(i!= len){ dst[i]=(src [i] ^ x0r) ; if ((dst[i]==0xeb) || (dst[i]==0x90) || (dst[i]==0x80)) { printf("forbidden chars found !");exit(0);} if (!dst[i]) break; i++; } strcpy(me,dst); me[len]='\0'; return me; } int error (int no) { printf("\n\nYou have been trying to get a shellcode in side of me now did u?\n"); printf("You can forget that im not easy and im hell MaD lets fight\n\n"); exit(0); } int main(int argc,char **argv,char **envp) { struct utsname u_uname; char ja[900]; char buffer[128]; int i; for (i=0; envp[i]!=0;i++) memset(envp[i],0x00,strlen(envp[i])); for (i=2; argv[i] !=0;i++) memset(argv[i],0x00,strlen(argv[i])); memset(argv[1],0x1,10); strcpy(ja, rave(argv[1],strlen(argv[1]))); signal(SIGSEGV,&error); if (uname(&u_uname) != -1) { printf("box info: \n"); printf("Name of the operating system: %s\n",u_uname.sysname); printf("Network name of this machine. %s\n",u_uname.nodename); printf("Release level of the operating system. %s\n",u_uname.release); printf("Version level of the operating system. %s\n",u_uname.version); printf("Machine hardware platform: %s\n",u_uname.machine); } else { perror("uname() error"); } strcpy(buffer,ja); printf("yOU dOO DODO X0R : %s\n",buffer); return true; }