Skip to content
SQL injection Write-up Advanced

Pentesting Cisco SD-WAN Part 1: Attacking vManage

The vManage web interface had a Cypher injection in the group devices endpoint and a stored XSS in the log viewer. An authenticated low-privilege attacker could use the injection to read files and escalate to root, and the XSS to run JavaScript in another user's browser.

Julien Legras Follow

Published on synacktiv.com

Rédigé par Julien Legras, Thomas Etrillard - 25/03/2020 - dans Pentest - Téléchargement

Julien Legras (@Julien_Legras), Thomas Etrillard, on synacktiv.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 groupId parameter was only escaped for single quotes before being inserted into a Cypher query, and log output was rendered as HTML without encoding.

Impact

An authenticated low-privilege user could read sensitive data and files, escalate to root on vManage, and run JavaScript in another user's browser via the stored XSS.

What the attacker needed

Authenticated low-privilege account; network access to vManage

The fix

The vulnerabilities were fixed in SD-WAN Software version 19.2.2.

How it was found

  1. Send a request to the group devices endpoint with a single quote in the groupId parameter and observe a database error.
  2. Use a Cypher injection to make the server load a CSV from an attacker-controlled URL.
  3. Use the same injection with a file URL to read local files such as /etc/passwd.
  4. Read the confd IPC secret file through the injection.
  5. Use the secret with the confd_cli_user binary to obtain a root shell.
  6. For the XSS, request the logfile endpoint with HTML in the lines parameter to poison the logs, then view the logs to execute the script.

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.

vManage is a management dashboard for a network product. A query injection happens when user input is placed into a database query without proper handling, letting an attacker change the query. Here the database was Neo4j, which uses a query language called Cypher. Separately, a stored cross-site scripting (XSS) flaw let malicious HTML saved in logs run as JavaScript when someone viewed the logs.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More by Julien Legras

View all

1 more disclosed report, best first.

More from Cisco

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.