Skip to content
RCE Write-up Advanced

SonicWall WXA – Authentication Bypass and Remote Code Execution Vulnerability

The SonicWall WXA appliance's dispatcher service authenticated API requests using a hardcoded secret key, allowing anyone who reverse-engineered the service to authenticate to any WXA instance. After authenticating, an argument injection flaw in a wget-invoking endpoint let an attacker write arbitrary files as root, which was used to overwrite the dig binary and achieve root code execution.

Adam Crosser Follow

Published on praetorian.com

In an effort to safeguard our customers, we perform proactive vulnerability research with the goal of identifying zero-day vulnerabilities that are likely to impact the security of leading organizations. Recently, we were looking at the list of available OVA appliances from SonicWall and identified the WXA appliance…

Justin Copeland, on praetorian.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

The dispatcher service used a hardcoded secret key to authenticate API requests, and a post-authentication endpoint passed attacker-controlled input to wget without sanitisation, enabling argument injection and arbitrary file write as root.

Impact

An attacker could authenticate to any WXA appliance and achieve arbitrary code execution as the root user, though the vendor considers the appliance end of life and the real-world risk low.

What the attacker needed

Access to the WXA appliance web interface; ability to reverse engineer the dispatcher service; network access to the appliance

The fix

The appliance was end of life and the download was removed; the underlying issue should be fixed by removing hardcoded secrets and sanitising input passed to shell commands.

How it was found

  1. Set up the WXA appliance and enumerate the exposed services.
  2. Reverse engineer the dispatcher service and recover the hardcoded secret used for authentication.
  3. Compute a valid hash from a chosen rand value and the secret, and send it in the Authorization header to bypass authentication.
  4. Use the argument injection in the wget-invoking endpoint to overwrite /usr/bin/dig with a malicious binary.
  5. Invoke the dig action in the interfaceStatus module to run the malicious binary as root.
  6. Connect to the resulting root bindshell.

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 appliance checked that a request was legitimate by comparing a value in the request against a secret password that was baked into the software itself. Because that secret was the same on every appliance, anyone who read the software could work out the password and log in. Once logged in, a feature that downloaded files could be tricked into saving a malicious program over a system tool, and when that tool was run the attacker got full control of the device.

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 Adam Crosser

View all

8 more disclosed reports, best first.

More from SonicWall

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.