macOS

Researchers Exploited GOG Galaxy XPC for Privilege Escalation in macOS

A critical privilege escalation vulnerability has been discovered to affect macOS devices, particularly the GOG Galaxy software-installed machines. The CVE for this vulnerability has been assigned as CVE-2023-40713, and the severity rating has been given as 7.8 (High).

GOG Galaxy is a software designed to organize games across different platforms as a single beautiful library. The vulnerability also involves the XPC service and the connection validation of the GOG Galaxy software.

CVE-2023-40713: Technical Analysis

During the GOG Galaxy installation, it creates a new file in the /Library/LaunchDaemons directory with the name com.galaxy.ClientService.plist that results in the creation of Launch Daemon, a background process that runs with high privileges.

Furthermore, the XPC service was also involved with the PLIST file. This XPC service is highly used in macOS devices, allowing helper tools to perform certain tasks for an application.

Most of the applications use this XPC service to call and perform actions on behalf of the service. These applications also verify the client application and allow only specific applications to call exposed methods.

PID Reuse

The vulnerability was based on a race condition in which the exploit sends several messages to the XPC service and executes the posix_spawn with the binary that completes the security requirement to replace the malicious binary PID.

Moreover, the time between the message processing and process validation allows the exploit to replace the exploit PID with a real application that validates the connection.

To exploit this vulnerability, a threat actor will need to follow the below steps,

  • Connect to XPC through forked processes
  • Replace the Child processes with the legitimate binary
  • Call the changeFolderPermissionsAtPath method by modifying the permissions of the /etc/pam.d/login file
  • Replace the login file with one that allows authentication without a password
  • Finally, Escalate to root by running sudo su.

Security Intelligence has published a complete report about this vulnerability, which provides detailed information, including the exploitation steps, source code, and other information.

Guru Baran

Gurubaran is a co-founder of Cyber Security News and GBHackers On Security. He has 10+ years of experience as a Security Consultant, Editor, and Analyst in cybersecurity, technology, and communications.

Recent Posts

ServiceNow Flaw Let Remote Attackers Execute Arbitrary Code

ServiceNow recently disclosed three critical vulnerabilities (CVE-2024-4879, CVE-2024-5217, and CVE-2024-5178) affecting multiple Now Platform versions,…

11 hours ago

ConfusedFunction Vulnerability in Google Cloud Platform Let Attackers Escalate Privileges

A newly discovered vulnerability in Google Cloud Platform (GCP) has raised significant security concerns among…

11 hours ago

PKfail Vulnerability Allows Hackers to Install UEFI Malware on Over 200 Device Models

The PKfail vulnerability is a significant security issue affecting over 200 device models of Secure…

14 hours ago

OpenStack Nova Vulnerability Allows Hackers Gain Unauthorized Access to Cloud Servers

A vulnerability in OpenStack's Nova component has been identified, potentially allowing hackers to gain unauthorized…

16 hours ago

North Korean Charged in Cyberattacks on US Hospitals, NASA & Military Bases

A North Korean military intelligence operative has been indicted for orchestrating a series of cyberattacks…

21 hours ago

RA Ransomware Group Aggressively Attacking Manufacturing Sector

RA World, an emerging ransomware group, has been increasingly active since March 2024, using a…

1 day ago