Skip to content
SQL injection Write-up Advanced

SonicWall SRA and SMA vulnerabilties

Several pre-authentication vulnerabilities were found in SonicWall SRA and SMA devices, including a blind SQL injection that could leak session identifiers and a buffer overflow in user-agent parsing that could lead to remote code execution. An attacker could exploit these to gain access to the SSL-VPN or run commands on the device.

blog.scrt.ch

Published on blog.scrt.ch

Last year, Orange Tsai did some awesome research and discovered several vulnerabilities in SSL VPN providers which can allow an attacker to break into a network through the very device which is supposed to protect it. The vulnerable constructors were:

The author, on blog.scrt.ch

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 SQL injection was caused by using an unescaped format specifier in a database query, and the buffer overflow by a memcpy into a fixed-size buffer without bounds checking.

Impact

An attacker could gain access to the SSL-VPN with various privileges or execute arbitrary commands with nobody privileges; on SMA devices, exploit mitigations may prevent code execution.

What the attacker needed

Virtual Assist module enabled; No account required; Network access to the device

How it was found

  1. Send a request to the supportLogin CGI with a crafted customerTID parameter to inject SQL.
  2. Extract session identifiers from the Sessions table via blind SQL injection.
  3. Send a request with a long User-Agent string mimicking Safari to trigger the buffer overflow.
  4. Crash the CGI and brute-force the libc base address to achieve code execution.

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 security holes in SonicWall VPN devices. One hole lets an attacker trick the device into revealing secret session codes by sending specially crafted requests, which could let them log in as other users. Another hole lets an attacker crash the device and possibly run their own commands by sending a very long browser name.

What is SQL injection?

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

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.