Skip to content
RCE Write-up Advanced

Expand file tree

The Cisco Nexus Dashboard Fabric Controller (formerly DCNM) had an unsafe Java object deserialization vulnerability in its Flex AMF endpoint, allowing unauthenticated remote code execution as the fmserver user. Combined with insecure sudo permissions for the sysadmin user, an attacker could escalate to root.

Pedro Ribeiro Follow

Published on github.com

History

Pedro Ribeiro (@pedrib1337), on github.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 application used an outdated BlazeDS library that deserialises untrusted AMF data without restricting allowed classes, and granted the sysadmin user sudo rights to tcpdump, which can be abused to run commands as root.

Impact

An unauthenticated attacker could execute arbitrary commands as the fmserver user and then escalate to root, completely compromising the appliance.

What the attacker needed

Network access to the DCNM web interface; no authentication required for initial exploit; Java 8 to compile the exploit

The fix

Upgrade to Cisco Nexus Dashboard Fabric Controller version 11.5(4) or later.

How it was found

  1. Send an HTTP POST request with random data to /fm/messagebroker/amfsecure to confirm the AMF endpoint.
  2. Start a web server serving a compiled Exploit class.
  3. Build a gadget chain and send it inside an AMF message body to /fm/messagebroker/amfsecure.
  4. The gadget chain activates and runs the COMMAND in the Exploit class as the fmserver user.
  5. Read the encrypted sysadmin password and decryption key from configuration files.
  6. Decrypt the password and use the tcpdump sudo technique to escalate to root.

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.

This report describes two security holes in a Cisco network management product. The first lets an attacker run commands on the server without logging in, because the server accepts specially crafted data that it then executes. The second lets a logged-in low-privilege user become the all-powerful root user because of a misconfigured sudo rule. Together they give full control of 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.

More from Cisco

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.