Skip to content
RCE Write-up Advanced

Attacking SSL VPN - Part 1: PreAuth RCE on Palo Alto GlobalProtect, with Uber as Case Study!

A format string vulnerability in the sslmgr daemon of Palo Alto GlobalProtect SSL VPN allowed unauthenticated attackers to crash the service or, by overwriting a GOT entry, execute arbitrary commands. The authors demonstrated this against Uber's VPN servers, gaining a shell.

blog.orange.tw

Published on blog.orange.tw

SSL VPNs protect corporate assets from Internet exposure, but what if SSL VPNs themselves are vulnerable? They’re exposed to the Internet, trusted to reliably guard the only way to your intranet.

The author, on blog.orange.tw

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 daemon passed the user-supplied value of the scep-profile-name parameter directly as the format string to snprintf.

Impact

An unauthenticated attacker could crash the VPN service or execute arbitrary commands on the VPN appliance; in Uber's case, the compromised server was isolated from core infrastructure, limiting impact.

What the attacker needed

Network access to the VPN's HTTPS port; no authentication required

The fix

The vulnerability was silently fixed by Palo Alto in versions 7.1.19, 8.0.12, and 8.1.3.

How it was found

  1. Send a request to the /sslmgr path with a scep-profile-name parameter containing a format specifier such as %n to crash the service.
  2. To verify without crashing, use a large width specifier like %9999999c and observe the increased response time.
  3. Determine the exact GlobalProtect version by checking the Last-Modified header of static files such as login.css or logo_pan_158.gif.
  4. Craft an exploit that overwrites the strlen entry in the Global Offset Table with the address of system.
  5. Send a request that causes the modified strlen to call system with a command, turning sslmgr into a webshell.

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.

A format string bug happens when a program takes text from a user and uses it as a template for building output, so special characters like %n can make it write to memory or crash. Here, the VPN's login handler did this without asking for a password, so anyone on the internet could trigger it. The researchers turned that into running their own commands on 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.