DLL Hijacking can affect OS X

DLL hijacking is not a prerogative for Windows systems, it is a common hacking technique that is very effective against OS X based machines.

As you may know, DLL hijacking it’s something that its around since around 2000 and allows hackers to exploit a machine with a vulnerable application ( just one of the possibilities of DLL hijacking).

What is DLL Hijacking?
It is an hacking technique that exploits the way certain OS applications search and load DLLs that they use. An attacker can place a DLL for a known program in a location that is searched by the applications before the legitimate DLL’s location and ensure that the malicious DLL is loaded, resulting in remote code execution.

Until now apple’s users weren’t facing this problem, but that ended because the DLL hijacking just arrived in Mac OS X.

At CanSecWest, Synack director of research Patrick Wardle will participate in a talk where its expected for him to explain some of the attacks.

Patrick Wardle provided some tips regarding the possibility of tool that scan apps that are vulnerable to his attack.

Using his own machine Wardle run a Python script where he discovered 144 binaries vulnerable to hijacking attacks, some of them being Microsoft Word, Excel, and PowerPoint.

He also exploits the application gatekeeper since it’s not signed from  Apple App Store, being  gatekeeper able to load malicious files remotely

The researcher was also able to remotely bypass Apple’s Gatekeeper security software implemented by Apple to control the software can be downloaded onto an Apple systems and to implement antimalware features.

Wardle explained that his code, dubbed dylib, would be implanted in a download that should be blocked by Gatekeeper because it is not signed from the Apple App Store. This is not a problem for Wardle that is able to allow Gatekeeper to load the malicious code remotely giving the control to the attacker.

“Gatekeeper normally does a pretty good job of blocking these downloads, but now using this bypass, we can get users to infect themselves,” Wardle said.

“It’s perfect for attacker persistence,” Wardle said. “You copy a specially crafted dylib into the directory PhotoStream looks for when the app starts, and the attacker’s dylib is loaded into the context of the process. It’s a stealthy way to gain persistence; you’re not creating any new processes, nor modifying any files. You’re planting a single dylib and you’re in.”

One of his tested attacks and by his own words:

“My malware infects Xcode and any time a developer deploys a new binary, it would also add the malicious code“ … “It’s an anonymous propagation vector.“

The main message to be passed by him is that this type of attacks “abuses legitimate functionality of OS X and it’s not patched”

Mac OS X users need to be careful, since these type of attacks are stealthy and can be very warmful.

About the Author Elsio Pinto

Elsio Pinto is at the moment the Lead Mcafee Security Engineer at Swiss Re, but he also as knowledge in the areas of malware research, forensics, ethical hacking. He had previous experiences in major institutions being the European Parliament one of them. He is a security enthusiast and tries his best to pass his knowledge. He also owns his own blog http://high54security.blogspot.com/

Edited by Pierluigi Paganini

(Security Affairs –  DLL hijacking, Mac OS X)

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Meta plans to train AI on EU user data from May 27 without consent

Meta plans to train AI on EU user data from May 27 without consent; privacy…

3 hours ago

AI in the Cloud: The Rising Tide of Security and Privacy Risks

Over half of firms adopted AI in 2024, but cloud tools like Azure OpenAI raise…

5 hours ago

Google fixed a Chrome vulnerability that could lead to full account takeover

Google released emergency security updates to fix a Chrome vulnerability that could lead to full…

6 hours ago

Nova Scotia Power discloses data breach after March security incident

Nova Scotia Power confirmed a data breach involving the theft of sensitive customer data after…

16 hours ago

Coinbase disclosed a data breach after an extortion attempt

Coinbase confirmed rogue contractors stole customer data and demanded a $20M ransom in a breach…

19 hours ago

U.S. CISA adds a Fortinet flaw to its Known Exploited Vulnerabilities catalog

U.S. Cybersecurity and Infrastructure Security Agency (CISA) adds a Fortinet vulnerability to its Known Exploited Vulnerabilities…

1 day ago