Skip to content
RCE Write-up Advanced

How to Decrypt Manage Engine PMP Passwords for Fun and Domain Admin - a Red Teaming Tale

An internet-exposed ManageEngine Password Manager Pro instance was vulnerable to a pre-authentication deserialisation flaw, allowing remote code execution. After gaining a shell, the authors reverse-engineered the password encryption to decrypt stored credentials and escalate to Domain Admin.

Abdel Adim Oisfi Follow

Published on shielder.com

During a recent Red Teaming assessment we have found an internet-exposed instance of ManageEngine’s Password Manager Pro which was vulnerable to a pre-authentication Remote Code Execution (CVE-2022-35405). After gaining code execution we reverse engineered the password encryption/decryption routine to decrypt all the…

smaury (@smaury92), TheZero (@Th3Zer0), on shielder.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 XML-RPC handler accepted Java serialised objects and deserialised them without validation, and the password manager used a hardcoded key and a server-side decryption design that exposed all secrets to anyone with code execution.

Impact

An attacker could execute arbitrary code on the server and decrypt all stored passwords, potentially leading to full domain compromise.

What the attacker needed

Internet-exposed PMP instance; vulnerable version (pre-patch); network access to the XML-RPC endpoint

How it was found

  1. Identify the ManageEngine Password Manager Pro version and find a known vulnerability.
  2. Craft a serialised payload using ysoserial and send it to the XML-RPC endpoint to test gadgets.
  3. Use the working gadget to obtain a reverse shell on the server.
  4. Read the database_params.conf file and the pmp_key.key file from the server.
  5. Decrypt the database password and connect to the PostgreSQL database.
  6. Retrieve the master key from the Ptrx_NotesInfo table and decrypt stored passwords.

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.

A password manager stores many passwords in encrypted form. The bug let an attacker run commands on the server without logging in. Once on the server, the attacker could read the keys used to encrypt the passwords and decrypt them all.

What is RCE?

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

More from Zoho (ManageEngine)

View all

The newest disclosed reports for this program.

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.