The Return of Raining SYSTEM Shells with Citrix Workspace app
A remote command line injection in the Citrix Workspace update service allowed an attacker to pass arbitrary msiexec arguments, including a malicious MSI transform, while using a signed Citrix MSI from the catalogue. This let an attacker execute commands as SYSTEM on the victim host.
pentestpartners.com
Published on pentestpartners.com
Back in July I documented a new Citrix Workspace vulnerability that allowed attackers to remotely execute arbitrary commands under the SYSTEM account. Well after some further investigation on the initial fix I discovered a new vector that quite frankly should not exist at all since the previous reported vulnerability.
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 update service passed attacker-controlled command line arguments to msiexec without restricting or sanitising them, and the named pipe remained remotely accessible.
Impact
An attacker could execute arbitrary commands as SYSTEM on the victim host, but only while CitrixReceiverUpdate.exe is running.
What the attacker needed
CitrixReceiverUpdate.exe running on victim; Network access to the named pipe; Ability to host files on a network share
The fix
Citrix released a fixed version of Workspace app, though the report notes the remote pipe connectivity was not closed.
How it was found
- Download an official signed Citrix MSI from the update catalogue.
- Generate a malicious MSI transform (MST) that adds a custom action to run a command.
- Place the signed MSI and the MST on a network share.
- Send a crafted JSON message over the named pipe with the MSI path and msiexec arguments including the transform and command.
- Wait for the service to run msiexec as SYSTEM, executing the custom action.
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.
The Citrix Workspace app has a background service that installs updates. It accepted commands from other machines and built a Windows installer command from them without properly checking the extra options. An attacker could add an option that loads a small change file (an MSI transform) to run their own code with the highest Windows privileges.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.