Skip to content
RCE Write-up Intermediate

Icinga 2: From Monitoring to RCE

The Icinga 2 console API allows a client to disable its sandbox and run arbitrary code, so an attacker with API credentials can read secrets such as the MySQL password from memory and modify check commands to execute OS commands. The vendor considers this intentional for console-permission users, but the author argues it is a real RCE path once credentials are compromised.

medium.com

Published on medium.com

In security research, the response “this is not a vulnerability, it’s a documented feature” is a recurring argument used to dismiss design weaknesses.

Itachix0f, 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 console execute-script endpoint trusts a client-supplied 'sandboxed' flag instead of enforcing the sandbox server-side, so any account with console permission can opt out of the restriction.

Impact

An API account with no web or SSH access can read in-memory secrets and, once the scheduler runs a modified check, execute OS commands as the Icinga service account; the author frames this as RCE, while the vendor treats it as intended for console-permission users.

What the attacker needed

Compromised Icinga API credentials; account has console permission; network access to the API on port 5665

How it was found

  1. Obtain credentials for an Icinga API account that has console permission.
  2. Send a console execute-script request with the sandbox disabled to read the IdoMysqlConnection object and recover the cleartext database password.
  3. Send another console execute-script request with the sandbox disabled to overwrite the command of a CheckCommand object with an OS command.
  4. Wait for the scheduler to run the check, which executes the injected command with the Icinga service account's privileges.

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.

Icinga is monitoring software that checks whether servers are alive. Its API lets automation scripts run small programs, and a 'sandbox' is meant to stop those programs from doing dangerous things. Here the API accepts a flag from the caller that turns the sandbox off, so anyone who steals an API password can run commands on the monitoring server itself.

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.