MacOS DirtyNIB Vulnerability Let Attackers Execute Malicious Code


A new zero-day vulnerability has been discovered in Apple’s macOS systems, which allows threat actors to execute code on behalf of a legitimate Apple application. This particular vulnerability was first discovered in macOS Monterey. However, the researcher was able to replicate the issue in Ventura and Sonoma.

According to the reports shared with Cyber Security News, Apple has addressed this vulnerability by assigning CVE-2022-48505 with a severity of 5.5 (Medium). However, the researcher stated that the issue still exists with macOS and needs to be addressed accordingly.

Document

FREE Demo

Implementing AI-Powered Email security solutions “Trustifi” can secure your business from today’s most dangerous email threats, such as Email Tracking, Blocking, Modifying, Phishing, Account Take Over, Business Email Compromise, Malware & Ransomware

MacOS “DirtyNIB” Vulnerability

Apple uses NIB files for storing interfaces of applications. Bundled NIB files can be swapped, which does not invalidate the access of these files once Gatekeeper verifies these files. 

Initially, a NIB file is created with a class as NSAppleScript, and the source property is set using User-Defined Runtime Attributes. In addition to this, a button is added and binded with Apple Script. This is also set to invoke executeAndReturnError: selector. As part of the exploitation of this vulnerability, the DirtyNIB file is used.

For proof of concept, the Pages application owned by Apple is targeted. The application is copied to the /tmp folder and launched using Gatekeeper. After this, the NIB file is overwritten with the DirtyNIB file, which triggers the code execution.

Code execution with DirtyNIB file overwriting
Code execution with DirtyNIB file overwriting (Source: xpnsec)

Moreover, this vulnerability had several constraints when moving to the latest macOS versions. The constraint of exploiting this in macOS Ventura was the inclusion of PkgKit, whereas, in macOS Sonoma, there were new restrictions around accessing Application bundle contents.

A complete report has been published by the security researcher, which provides detailed information about the exploitation of this vulnerability, the codes, and the tools used as part of the research.

Protect yourself from vulnerabilities using Patch Manager Plus to patch over 850 third-party applications quickly. Take advantage of the free trial to ensure 100% security.



Source link