The pandemic has seen organizations around the world allow their employees to work from home (opens in new tab) and many are using VPN (opens in new tab) services to connect to their corporate networks. However, the growing reliance on VPNs has led to increased interest from cybercriminals who wish to exploit vulnerabilities found in popular VPN software.
While Cympton security researcher Chen Erlich recently discovered a privilege escalation vulnerability in HotSpot Shield's Windows client (opens in new tab), his latest blog post (opens in new tab) shows that consumer VPN vendors aren't a lone weak point as enterprise VPNs also contain vulnerabilities that can be exploited by cybercriminals. In fact, Erlich recently discovered multiple privilege escalation and elevation of privilege vulnerabilities in Citrix's widely used business VPN (opens in new tab) solution, Citrix Gateway Plug-In for Windows.
The Citrix Gateway Client installs a “Citrix Gateway Service” on a user's computer that runs as SYSTEM and this service executes automatically on-boot. When the service runs, it executes a periodic PowerShell script, executed as SYSTEM, every five minutes. However, as powershell.exe is being invoked by file name only, Windows searches through numerous directories to find it.
- We've put together a list of the best business VPN solutions (opens in new tab)
- Secure your entire network with one of the best VPN routers (opens in new tab)
- We've also highlighted the best Windows 10 VPN (opens in new tab)
To exploit this vulnerability, an attacker could create a malicious file, name it powershell.exe and copy it to every directory they have access to. This would allow them to achieve elevation of privileges on system's running the Citrix Gateway Plug-In for Windows.
Privilege escalation vulnerabilities
When PowerShell runs uninterrupted, it verifies saved VPN configurations and writes to a file called intune.log in the following location: C:\ProgramData\Citrix\AGEE\intune.log. This target directory has permissive permissions set to Full Control even for unprivileged users.
When intune.log is about to be written, if Windows finds the intune.log.backup in the current directory, it overwrites it and writes a new intune.log file. However, if a backup exists as a directory, intune.log will be copies to this directory. To exploit this vulnerability, an attacker with a standard account can create a symlink between the C:\ProgramData\Citrix\AGEE\intune.log.backup\intune.log file and any destination file that SYSTEM can write to. Then when the scheduled privileged PowerShell scrip runs it will move the intune.log file as the backup is a directory and not a file. Erlich also discovered an AppData privilege escalation that can lead to arbitrary file writing and creation.
According to a security update from Citrix (opens in new tab), Citrix Gateway Plug-in 13.0 for Windows before 64.35, Citrix Gateway Plug-in 12.1 for Windows before 59.16 and Citrix Gateway Plug-in 12.1 for Windows before 55.190 are all affected. Thankfully though, the company has already issued fixes for the vulnerabilities discovered by Erlich which can be found here (opens in new tab).
As businesses now rely on VPN services to support their remote workers, keeping them up to date is an essential step to avoid falling victim to any potential attacks that could exploit known vulnerabilities.
- Also check out our complete list of the best VPN (opens in new tab) services