Skip to content
SSRF Write-up Advanced

Executive Summary

Several industrial VPN client products wrap an OpenVPN service with a local back-end that accepts unauthenticated cleartext commands on a localhost TCP port. A malicious website can send a blind POST request to that port to load an attacker-controlled OpenVPN configuration, which can execute commands with SYSTEM privileges and take over the machine.

claroty.com

Published on claroty.com

A virtual private network (VPN) is an encrypted connection over the Internet from a device to a network that secures the transmission of sensitive data. Unauthorized people cannot eavesdrop on the traffic, and—relevant to today's climate—a VPN allows the user to remain at home and securely conduct business remotely.

Sharon Brizinov, on claroty.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 back-end service accepts unauthenticated cleartext commands on a localhost port and passes an attacker-supplied OpenVPN configuration to OpenVPN, which runs with SYSTEM privileges and allows script directives such as up.

Impact

An attacker could achieve remote code execution with SYSTEM privileges and complete takeover of the victim's machine, but full RCE requires the victim's machine to reach the attacker's SMB server, and the browser's Same-Origin Policy prevents the attacker from reading the response.

What the attacker needed

Victim runs the vulnerable VPN client; victim visits attacker's website; victim machine can reach attacker's SMB server

The fix

Vendors should bind listeners to dynamic ports and addresses, require a per-boot secret token with proper ACLs for back-end commands, restrict OpenVPN script execution, avoid running OpenVPN as SYSTEM, and close sessions on unrecognised commands.

How it was found

  1. Set up an SMB server reachable by the victim and place a crafted OpenVPN configuration file on it.
  2. Host a malicious website whose JavaScript sends a blind POST request to the local back-end port with a config command pointing at the remote file.
  3. The victim visits the site and the browser sends the request to localhost.
  4. The back end ignores unparsable HTTP header lines and acts on the valid config command in the body.
  5. OpenVPN starts with the attacker's configuration and runs the up directive, giving code execution as SYSTEM.

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.

These VPN apps have a helper program running in the background that listens for commands on the local machine only. It never checks who is sending those commands, so a web page opened in the victim's browser can quietly send one too. That command tells the VPN software to load a settings file from the attacker, and such a file can run programs, so the attacker ends up controlling the computer.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.