Attacking SSL VPN - Part 3: The Golden Pulse Secure SSL VPN RCE Chain, with Twitter as Case Study!
Pulse Secure SSL VPN contained a pre-auth arbitrary file read caused by loose path validation introduced with the HTML5 Access feature, plus a post-auth admin command injection in a diagnostic script. Chaining these with stolen session data and a cracked password hash let the researchers read files, bypass 2FA via roaming sessions, and achieve remote code execution on Twitter's VPN.
blog.orange.tw
Published on blog.orange.tw
Hi, this is the last part of Attacking SSL VPN series. If you haven’t read previous articles yet, here are the quick links for you:
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 a path validation routine that mixed up the request URI and the resolved file path after a new feature widened the check, plus a diagnostic script that passed user input into a shell command.
Impact
An unauthenticated attacker could read arbitrary files including credentials and session data, and an admin-level attacker could run commands on the appliance; the authors note 2FA and a restricted management interface limited or slowed the chain until bypassed.
What the attacker needed
Network access to the VPN; roaming sessions enabled for 2FA bypass; WebVPN reachable for admin access; crackable manager password hash
The fix
Pulse Secure fixed all the bugs within a month and released patches on 24 April 2019.
How it was found
- Send a request whose query string ends with the HTML5 access path so the file path check is bypassed
- Repeat the HTML5 access path in the middle of the path to read files with any extension
- Download the session database and forge cookies to log in, bypassing 2FA via roaming sessions
- Use the WebVPN proxy to reach the restricted management interface
- Crack the recovered manager password hash to obtain admin credentials
- Trigger the command injection on the diagnostic page to run code
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.
An SSL VPN is a service that lets staff reach internal systems from outside the office. Here the VPN's own web server could be tricked into handing over files it should never serve, and an admin-only page ran commands built from user input. Together these let an outsider read secrets and eventually run their own code on the appliance.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.