Skip to content
RCE Write-up Intermediate

As always in every penetration testing engagements we start by reconnaissance and information gathering, in this step we try to get as much information about the target as possible.

The Exhibitor Web UI's config editor allowed arbitrary shell commands to be injected and executed when ZooKeeper launched, giving a shell as the user running Exhibitor. The attacker then used sudo gcore to dump a root process's memory and extract the root password.

Cyb0rgBytes Follow

Published on infosecwriteups.com

As always in every penetration testing engagements we start by reconnaissance and information gathering, in this step we try to get as much information about the target as possible.

Cyb0rgBytes, on infosecwriteups.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 Exhibitor config editor failed to sanitise user input before passing it to a shell when launching ZooKeeper.

Impact

An attacker could execute arbitrary commands as the Exhibitor user and then escalate to root by extracting the root password from a core dump.

What the attacker needed

Access to the Exhibitor web UI; ability to edit the config; sudo gcore with NOPASSWD

How it was found

  1. Navigate to the Exhibitor web UI on port 8080.
  2. In the config editor, insert a command that starts a reverse shell.
  3. Start a listener on the attacker machine and press Commit.
  4. Receive a shell as the user charles.
  5. Run sudo -l and find that gcore can be run with sudo without a password.
  6. Run sudo gcore on a root process and use strings on the core dump to find the root password.

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 web interface for a service called Exhibitor let users edit configuration files. It did not check what was typed, so an attacker could put a system command in the file and the server would run it. After getting a normal user shell, the attacker used a tool that can copy a running program's memory, which happened to contain the root password.

What is RCE?

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

More by Cyb0rgBytes

View all

1 more disclosed report, best first.

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.