Skip to content
Access control Write-up Advanced

GOG Galaxy Client Local Privilege Escalation Deuce

The GOG Galaxy Client's privileged service accepted commands from any local process that could present a valid HMAC-signed message, and the signing key was embedded in the client. An attacker with low-privilege access could inject a DLL into the legitimate client process to send such messages and execute arbitrary commands as SYSTEM.

positronsecurity.com

Published on positronsecurity.com

I reported a serious local privilege escalation flaw in GOG Galaxy Client on April 28, 2020, but my follow-up investigation (detailed below) found the vendor’s fix to be insufficient. By updating the proof-of-concept exploit code, it is possible to execute arbitrary commands as SYSTEM in GOG Galaxy Client v2.0.13…

The author, on positronsecurity.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

Likely the privileged service authenticated clients using a shared secret key embedded in the client, rather than verifying the caller's identity through a secure mechanism such as OS-level process checks.

Impact

An attacker with low-privilege access could escalate to SYSTEM and effectively become an administrator, although the attack requires the machine to be already compromised.

What the attacker needed

Low-privilege access to the machine; GOG Galaxy Client installed

The fix

The text does not confirm a proper fix; GOG released v2.0.20 claiming to add DLL checks, but the proof-of-concept still worked unmodified.

How it was found

  1. Start the GalaxyClientService.
  2. Launch GalaxyClient.exe and obtain its process ID.
  3. Inject a custom DLL into the GalaxyClient.exe process.
  4. Connect to the service's named pipe and send a signed command with arguments and working directory.
  5. The service executes the command as SYSTEM, allowing creation of a new local user and addition to the Administrators group.

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 Windows service running with high privileges (SYSTEM) was supposed to accept commands only from the official GOG Galaxy client. However, it trusted any program that could sign a message with a secret key, and that key was stored inside the client. A normal user could therefore trick the service into running commands as an administrator.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.