Skip to content
RCE Write-up Advanced

Busting Cisco’s Beans :: Hardcoding Your Way to Hell

Cisco DCNM used a hardcoded cryptographic key to generate SSO tokens, allowing an attacker to forge a valid token and bypass authentication. The attacker could then reach a SOAP endpoint with a SQL injection in the sort parameters, leading to remote code execution as SYSTEM or root.

srcincite.io

Published on srcincite.io

After the somewhat dismay of reporting to Cisco some other vulnerabilities in their Prime Infrastructure product, I decided to perform an audit on the Cisco Data Center Network Manager (DCNM) product. What I found should not only SHOCK you, but relive that 90’s remote root era that you all have been craving.

The author, on srcincite.io

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 a hardcoded secret key used to sign authentication tokens, plus unsafe concatenation of user-controlled sort parameters into a SQL query.

Impact

An unauthenticated attacker could achieve remote code execution as SYSTEM on Windows or root on Linux, giving complete control of the product.

What the attacker needed

Network access to the SOAP endpoints; no authentication needed

How it was found

  1. Generate a forged SSO token using the hardcoded key and chosen username, session ID and timestamp.
  2. Send a SOAP request with the forged token to the user administration endpoint to create a global admin account.
  3. Send a SOAP request to the inventory endpoint with a crafted sort field and sort type to trigger the SQL injection.
  4. Use the SQL injection to write a JSP shell to a web-accessible path.
  5. Request the JSP shell to execute commands as SYSTEM or 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.

The software used a secret key that was written directly into its code, so anyone who read the code could create a valid login token. Separately, a web service took user input and put it into a database query without proper cleaning, letting an attacker run their own database commands. Together these let an outsider take 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.

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.