Paper: Dylib hijacking on OS X

Posted by   Virus Bulletin on   Mar 19, 2015

Patrick Wardle shows how OS X is also vulnerable to once common Windows attacks.

A few years ago, DLL hijacking on Windows was really hot, despite the fact that the concept had been discussed by none other than the NSA as far back as 1998.

Many applications load dynamic link libraries (DLLs) without specifying a path name to indicate where the library is to be found in the operating system. When such a path name is absent, the operating system looks for the DLL file in a number of well-defined directories. An attacker could thus 'hijack' the DLL by placing a rogue DLL file into one of those directories, so that the operating system will find the rogue DLL first.

Patching vulnerabilities and the introduction of a number of OS-level mitigations has made DLL hijacking much less of an issue on Windows these days. But could other operating systems, such as Mac OS X, be vulnerable to a similar kind of attack?

This is what Synack researcher Patrick Wardle wondered. He set himself the task of finding a way to make OS X applications load arbitrary binaries.

Today, he presents the results of his research at the CanSecWest conference in Vancouver. He has also written a paper providing the technical details of his research - which Virus Bulletin has also published today.

It turns out that OS X is vulnerable to this kind of attack - which is known as 'Dylib hijacking' in this case. In his paper, Patrick takes the reader through his search for flaws, making it an excellent read for anyone who wants to harden the operating system by looking for these kinds of logic flaws.

Dylib hijacking is not as trivial as DLL hijacking once was on Windows and, of course, being able to make a vulnerable application load a rogue binary still requires the attacker to store the library on the target's machine. As such, the attack is more suitable for making an existing infection maintain persistence (a subject that Patrick spoke about at VB2014) than as an infection vector.

Moreover, Patrick shows how a man-in-the-middle attacker could use only a very small amount of social engineering to bypass Apple's Gatekeeper, which is supposed to prevent malicious content from being loaded on OS X.

You can read the paper here in HTML format or here as a PDF. (Remember that all content published by Virus Bulletin can be read free of charge, with no registration required.)

Posted on 19 March 2015 by Martijn Grooten

twitter.png
fb.png
linkedin.png
hackernews.png
reddit.png

 

Latest posts:

VB2019 paper: APT cases exploiting vulnerabilities in region-specific software

At VB2019, JPCERT/CC's Shusei Tomonaga and Tomoaki Tani presented a paper on attacks that exploit vulnerabilities in software used only in Japan, using malware that is unique to Japan. Today we publish both their paper and the recording of their…

New paper: Detection of vulnerabilities in web applications by validating parameter integrity and data flow graphs

In a follow-up to a paper presented at VB2019, Prismo Systems researchers Abhishek Singh and Ramesh Mani detail algorithms that can be used to detect SQL injection in stored procedures, persistent cross-site scripting (XSS), and server‑side request…

VB2020 programme announced

VB is pleased to reveal the details of an interesting and diverse programme for VB2020, the 30th Virus Bulletin International Conference.

VB2019 paper: Cyber espionage in the Middle East: unravelling OSX.WindTail

At VB2019 in London, Jamf's Patrick Wardle analysed the WindTail macOS malware used by the WindShift APT group, active in the Middle East. Today we publish both Patrick's paper and the recording of his presentation.

VB2019 paper: 2,000 reactions to a malware attack – accidental study

At VB2019 cybercrime journalist and researcher Adam Haertlé presented an analysis of almost 2000 unsolicited responses sent by victims of a malicious email campaign. Today we publish both his paper and the recording of his presentation.

We have placed cookies on your device in order to improve the functionality of this site, as outlined in our cookies policy. However, you may delete and block all cookies from this site and your use of the site will be unaffected. By continuing to browse this site, you are agreeing to Virus Bulletin's use of data as outlined in our privacy policy.