Skip to content
RCE Write-up Advanced

All Your Cloud Are Belong To Us (CVE-2019-12491)

OnApp cloud orchestration software used SSH agent forwarding when connecting to managed servers, and executed binaries like tput with root privileges. An attacker with a rented server could replace such a binary to relay the management SSH agent and authenticate to other servers in the same cloud, achieving root RCE across the provider.

skylightcyber.com

Published on skylightcyber.com

Many of the greatest discoveries in the world, science, continents and others are credited to chance. Antibiotics, corn flakes, and even the microwave were all discovered while looking for something else entirely.

The author, on skylightcyber.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the management software enabled SSH agent forwarding and executed predictable binaries as root on customer-controlled servers, allowing a customer to relay the agent and authenticate to other servers.

Impact

This could allow an attacker to compromise every server in a cloud provider using OnApp, with root privileges, potentially affecting hundreds of thousands of servers and businesses.

What the attacker needed

A rented or trial server from an OnApp-based provider; access to the provider's control panel; ability to modify files on the rented server

The fix

The vulnerability was fixed by OnApp after responsible disclosure.

How it was found

  1. Rent a server from a hosting provider using OnApp.
  2. Use the control panel's 'Add Local Network' button to trigger the management software to SSH into the server.
  3. Observe via auditctl which binaries the management software executes as root.
  4. Replace one of those binaries (e.g. tput) with a script that uses SSH agent forwarding to connect to a target server and write a flag file.
  5. Trigger the management software again via the control panel.
  6. Confirm the flag file appears on the target server, proving root access.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

SSH agent forwarding lets a server you connect to use your SSH key to log in to other servers without having the key itself. Here, the cloud management software used this feature when logging into customer servers, so a customer who controlled their own server could abuse that forwarded access to log in to other customers' servers as root.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.