Security Experts:

Connect with us

Hi, what are you looking for?



Researcher to Reveal Mac OS X DLL Hijacking Attack

DLL hijacking is not just a Windows thing: it turns out that a conceptually similar attack is possible for OS X systems.

DLL hijacking is not just a Windows thing: it turns out that a conceptually similar attack is possible for OS X systems.

According to new research from Synack’s Patrick Wardle, DLL hijacking on Macs can be used to circumvent security features like Apple’s Gatekeeper to infect vulnerable computers. Wardle will be presenting on the issue this week at the CanSecWest Applied Security conference in Vancouver.

“OS X dylib [dynamic library] hijacking is conceptually similar to Windows DLL hijacking,” explained Wardle, director of research at Synack. “In both cases, there exist situations where the OS loader will look for required dependent libraries in multiple places. If the legitimate library is not found in a primary location, e.g. the first directory the loader looks in, the attacker can then plant a malicious library there. From then on, whenever the application is launched – either by the OS or by the user – the loader will now find and blindly load the attacker’s malicious library since the loader first looks in the location where the attacker planted they library.”

The attack relies on leveraging vulnerable apps, and Wardle plans to release an open source python script and a UI application that can be used to scan for them. A scan of his computer, he noted, turned up nearly 150 vulnerable applications, including both Apple applications and third-party apps.

The attack circumvents Gatekeeper, an anti-malware feature that allows users to restrict what sources they can install applications from in order to reduce the likelihood of being infected by a Trojan horse. The feature is included in OS X Lion 10.7.5, OS X Mountain Lion and later versions of the operating system.

“The details of the attack will be revealed at the conference,” he stated. “However, I can summarize. There exists a situation where Gatekeeper does not validate everything that is downloaded as it should in a software package such as .dmg file. This opens up a scenario where an attacker can create a software package or infect a legitimate download that Gatekeeper will trust when the user opens it. So even if the user has set Gatekeeper to only allow code from the Mac App Store…the attacker’s malicious unsigned dylib will still be loaded and allowed to execute, thus infecting the user.”

The attack is quite elegant as it abuses legitimate functionality of the operating system but is very simple for an attacker to use, added Wardle.

“It can be used in attack scenarios such as persistence, load-time process injection, etc,” he explained. “Other attacks that achieve similar goals…are complex, and easily detected [and] prevented. Using this dylib hijack attack, an attacker can achieve the same goal by simply dropping a dylib bundle. That’s it. That combined with the tools I’ll be releasing…make this a trivial, yet fairly devastating attack.”

CanSecWest will be held from March 18 to March 20. 

Written By

Click to comment

Expert Insights

Related Content

Cloud Security

VMware vRealize Log Insight vulnerability allows an unauthenticated attacker to take full control of a target system.

Mobile & Wireless

Technical details published for an Arm Mali GPU flaw leading to arbitrary kernel code execution and root on Pixel 6.

Mobile & Wireless

Apple rolled out iOS 16.3 and macOS Ventura 13.2 to cover serious security vulnerabilities.

Mobile & Wireless

Apple’s iOS 12.5.7 update patches CVE-2022-42856, an actively exploited vulnerability, in old iPhones and iPads.


Security researchers have observed an uptick in attacks targeting CVE-2021-35394, an RCE vulnerability in Realtek Jungle SDK.

IoT Security

Lexmark warns of a remote code execution (RCE) vulnerability impacting over 120 printer models, for which PoC code has been published.


Google has awarded more than $25,000 to the researchers who reported the vulnerabilities patched with the release of the latest Chrome update.

Email Security

Microsoft is urging customers to install the latest Exchange Server updates and harden their environments to prevent malicious attacks.