@@ -90,6 +90,8 @@ def initialize(info={})
90
90
@info_receiver_page = rand_text_alpha ( 5 )
91
91
@exploit_receiver_page = rand_text_alpha ( 6 )
92
92
@noscript_receiver_page = rand_text_alpha ( 7 )
93
+ @flash_receiver_page = rand_text_alpha ( 8 )
94
+ @flash_swf = rand_text_alpha ( 9 )
93
95
94
96
register_options (
95
97
[
@@ -331,6 +333,11 @@ def process_browser_info(source, cli, request)
331
333
332
334
# Gathering target info from the detection stage
333
335
case source
336
+ when :flash
337
+ # Flash version detection
338
+ parsed_body = CGI ::parse ( Rex ::Text . decode_base64 ( request . body ) || '' )
339
+ version_info = 'FLASH VERSION HERE'
340
+ update_profile ( target_info , :flash , version_info )
334
341
when :script
335
342
# Gathers target data from a POST request
336
343
parsed_body = CGI ::parse ( Rex ::Text . decode_base64 ( request . body ) || '' )
@@ -411,6 +418,15 @@ def get_detection_html(user_agent)
411
418
"vuln_test" : <%= js_vuln_test %>
412
419
};
413
420
421
+ if (d["flash"]) {
422
+ // Load SWF for accurate Flash detection
423
+ // This SWF needs to send the Flash version info as a POST request to BES sort of like this:
424
+ // <%=get_resource.chomp("/")%>/<%=@info_receiver_page%>/
425
+ var flashObject = document.createElement("object");
426
+ flashObject.setAttribute("data", "Flash location from the @flash_swf instance variable");
427
+ document.body.appendChild(flashObject); // Do you actually need to do this?
428
+ }
429
+
414
430
<% if os.match(OperatingSystems::Match::WINDOWS) and client == HttpClients::IE %>
415
431
d['office'] = ie_addons_detect.getMsOfficeVersion();
416
432
d['mshtml_build'] = ScriptEngineBuildVersion().toString();
@@ -468,6 +484,11 @@ def cookie_header(tag)
468
484
cookie
469
485
end
470
486
487
+ def load_swf_detection
488
+ # Your SWF loads here
489
+ ''
490
+ end
491
+
471
492
472
493
# Handles exploit stages.
473
494
#
@@ -492,6 +513,15 @@ def on_request_uri(cli, request)
492
513
html = get_detection_html ( ua )
493
514
send_response ( cli , html , { 'Set-Cookie' => cookie_header ( tag ) } )
494
515
516
+ when /#{ @flash_swf } /
517
+ swf = load_swf_detection
518
+ send_response ( cli , swf )
519
+
520
+ when /#{ @flash_receiver_page } /
521
+ vprint_status ( "Received information from Flash" )
522
+ process_browser_info ( :flash , cli , request )
523
+ send_not_found ( cli )
524
+
495
525
when /#{ @info_receiver_page } /
496
526
#
497
527
# The detection code will hit this if Javascript is enabled
0 commit comments