CVE-2024-31226

4.9 MEDIUM

📋 TL;DR

This vulnerability in Sunshine game streaming software allows path interception attacks when terminating the service on Windows. Attackers can place malicious executables named 'Program.exe', 'Program.bat', or 'Program.cmd' in the C:\ root directory to execute arbitrary code. Only users running affected versions as a Windows service with manually loosened ACLs on the system drive are impacted.

💻 Affected Systems

Products:
  • Sunshine
Versions: 0.17.0 through 0.22.2
Operating Systems: Windows
Default Config Vulnerable: ✅ No
Notes: Only exploitable when running as a Windows service with manually loosened ACLs on the system drive. Non-English locales may have different executable names.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Arbitrary code execution with the privileges of the Sunshine service account, potentially leading to full system compromise if the service runs with elevated privileges.

🟠

Likely Case

Limited impact due to requirement for manually loosened ACLs; most likely scenario is failed exploitation attempts or no impact on properly configured systems.

🟢

If Mitigated

No impact when proper file system permissions are enforced and executables cannot be written to C:\ root directory.

🌐 Internet-Facing: LOW
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires local file placement and specific ACL misconfigurations. Attack vector depends on user manually loosening system drive permissions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.23.0

Vendor Advisory: https://github.com/LizardByte/Sunshine/security/advisories/GHSA-r3rw-mx4q-7vfp

Restart Required: Yes

Instructions:

1. Download Sunshine version 0.23.0 or later from official repository. 2. Stop the Sunshine service. 3. Install the updated version. 4. Restart the Sunshine service.

🔧 Temporary Workarounds

Application Control Enforcement

windows

Use Windows application control tools to block execution of unauthorized executables from C:\ root directory.

File System Permission Hardening

windows

Set proper ACLs to deny write access to C:\ root directory for non-administrative users.

icacls C:\ /deny Users:(OI)(CI)W

🧯 If You Can't Patch

  • Enforce strict file system permissions to prevent writing executables to C:\ root directory.
  • Monitor for creation of suspicious files named 'Program.exe', 'Program.bat', or 'Program.cmd' in C:\ directory.

🔍 How to Verify

Check if Vulnerable:

Check Sunshine version: if running 0.17.0 through 0.22.2 on Windows as a service, and verify if ACLs on C:\ drive have been manually loosened.

Check Version:

sunshine --version

Verify Fix Applied:

Confirm Sunshine version is 0.23.0 or later using the version check command, and verify service is running properly.

📡 Detection & Monitoring

Log Indicators:

  • Failed service termination events in Windows Event Logs
  • Creation of suspicious files (Program.exe, Program.bat, Program.cmd) in C:\ directory

Network Indicators:

  • Unusual outbound connections from Sunshine service process

SIEM Query:

EventID=7036 AND ServiceName="Sunshine" OR FileCreation Path="C:\\Program.*"

🔗 References

📤 Share & Export