Skip to content
RCE Write-up Advanced

Undisclosed CVE-2019–19484,CVE-2019–19486,CVE-2019–19487

The login page's 'p' parameter allowed an open redirect, and a command configuration file had insufficient sanitisation, enabling an attacker to bypass directory traversal and escapeshellcmd checks and execute arbitrary commands. This chained into remote code execution, allowing an attacker to upload a PHP shell.

medium.com

Published on medium.com

Last year on October 2019 after one week Centreon 19.04 (version Oct. 16, 2019) release, I manage to found few vulnerabilities that chained together that that produce remote code execution(RCE).

mucomplex, on medium.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 login parameter 'p' was not validated for redirects, and the command configuration file used incomplete sanitisation (urldecode, str_replace, path checks, escapeshellcmd) that could be bypassed with paired quotes and encoded ampersands.

Impact

An attacker could execute arbitrary commands and upload a PHP shell, leading to remote code execution on versions 19.04.4 and below.

What the attacker needed

Victim clicks a link; target runs Centreon 19.04.4 or below

The fix

The vulnerabilities were fixed in Centreon Web 19.04.5.

How it was found

  1. Access the login page with parameter 'p' set to a URL, which remains after login.
  2. Encode the ampersand as %26 to pass additional parameters like 'p2'.
  3. Craft a command_line value using paired quotes to bypass directory traversal and escapeshellcmd checks.
  4. Send a link containing the crafted payload to a victim via email.
  5. The payload downloads a file from an attacker-controlled server and saves it as a PHP shell on the target.

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.

The login page had a hidden parameter that could send users to another site. A configuration file that builds system commands did not properly clean user input, so an attacker could sneak in extra commands. Together, these let an attacker run their own code on the server.

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.