SSD Advisory – Cisco UCS Platform Emulator Remote Code Execution

Credit to Author: SSD / Maor Schwartz| Date: Wed, 01 Nov 2017 05:08:10 +0000

Want to get paid for a vulnerability similar to this one?
Contact us at: sxsxdx@xbxexyxoxnxdxsxexcxuxrxixtxy.xcom
See our full scope at: https://blogs.securiteam.com/index.php/product_scope

Vulnerabilities Summary
The following advisory describes two remote code execution vulnerabilities found in Cisco UCS Platform Emulator version 3.1(2ePE1).

Cisco UCS Platform Emulator is the Cisco UCS Manager application bundled into a virtual machine (VM). The VM includes software that emulates hardware communications for the Cisco Unified Computing System (Cisco UCS) hardware that is configured and managed by Cisco UCS Manager. For example, you can use Cisco UCS Platform Emulator to create and test a supported Cisco UCS configuration, or to duplicate an existing Cisco UCS environment for troubleshooting or development purposes.

The vulnerabilities found in Cisco UCS Platform Emulator are:

  • Unauthenticated remote code execution
  • Authenticated remote code execution

Credit
An independent security researcher has reported this vulnerability to Beyond Security’s SecuriTeam Secure Disclosure program

Vendor response
The vendor has released patches to address this vulnerability and issue the following CVE:

  • CVE-2017-12243

Vulnerabilities details
Unauthenticated remote code execution
User controlled input is not sufficiently sanitized when passed to IP/settings/ping function. An unauthenticated attacker can inject commands via PING_NUM and PING_IP_ADDR parameters. Those commands will run as root on the remote machine.

Proof of Concept

By sending one of the above requests the Cisco UCS will response with:

Authenticated remote code execution
Cisco UCS Platform Emulator is vulnerable to format string vulnerability that leads to remote code execution.

Cisco UCS Platform Emulator runs an SSH server by default, and users who log-in via ssh runs the following command:

Get the following response:

By execute the ssh “show sel %x” command we overwriting got entry for _ZN7clidcos15CommandEmulator16cli_param_filterEPKc function from libsamvsh.so with libc system.

Proof of Concept
In order to exploit the vulnerability, please follow the following instructions:

Install ucspe on vm (setup all 3 network cards) with the following user and password:

  • Default ucspe user : ucspe
  • Default ucspe pass : ucspe

Run the ucspe and write down the ip address of the ucspe (visible in console “Connected to IP: ….”)

In this Proof of Concept we will use IP – 192.168.1.43

Open up two terminals on some other machine (kali for example).

On the first terminal:

  1. Create poc directory, put poc4_ucspe_3.1.2e.py in the poc directory. change current directory to poc
  2. Create fifo1:
  3. Create output directory:”
  4. Run ssh with stdin redirected from fifo1 and stdout redirected to output/log file:

On the second terminal (terminal2):

  1. Change current directory to poc
  2. Run the poc4_ucspe_3.1.2e.py

The output should be:

TERMINAL1

TERMINAL2

poc4_ucspe_3.1.2e.py

Print Friendly, PDF & Email

https://blogs.securiteam.com/index.php/feed