Security Experts:

Connect with us

Hi, what are you looking for?


Malware & Threats

Repurposing Mac Malware Not Difficult, Researcher Shows

Repurposing Mac malware is not a difficult task for someone with reverse-engineering skills, and it’s a far simpler approach compared to writing malware from scratch, a researcher has demonstrated.

Repurposing Mac malware is not a difficult task for someone with reverse-engineering skills, and it’s a far simpler approach compared to writing malware from scratch, a researcher has demonstrated.

The research was conducted by Patrick Wardle, Mac security expert and principal researcher at Apple device management platform provider Jamf. Jamf acquired Digita Security, a macOS security company co-founded by Wardle, last month.

Threat actors have been known to repurpose existing malware — the NSA’s Tailored Access Operations (TAO) unit has reportedly done it, and Chinese cyberspies are said to have repurposed leaked NSA hacking tools. Repurposing malware can have several advantages and in the case of nation-state actors it makes attribution more difficult.

Wardle told SecurityWeek that one of the goals of his research is to show that its rather trivial and far less time-consuming to repurpose malware than to develop a completely new piece of malware.

“Being able to take a complex, well-written piece of malware (that a competent software engineer has created) and repurpose it, is a far simpler approach than trying to write one from scratch,” Wardle said.

“Also given the benefits of (mis)attribution and disposability of these tools (if they get caught, no problem, just repurpose another one), using repurposed malware is very compelling,” he explained.

Repurposing Mac malware

He demonstrated this theory by repurposing several known pieces of Mac malware, including the FruitFly backdoor, the CreativeUpdate cryptocurrency miner, the KeRanger ransomware, and the Windtail backdoor.

Assuming that no source code is available, the challenges of repurposing a piece of malware include identifying all the relevant logic, understanding the command and control (C&C) protocol, modifying (patching) the original malware, and creating a C&C server that can communicate with it.

Specifically, these activities can include creating a custom installer, changing the address of the C&C server in the malware, and changing the wallet address (in the case of cryptocurrency miners).

There are plenty of malware samples to choose from. Objective-See, a website run by Wardle, hosts over 120 Mac malware samples that are freely available for download.

Wardle has also demonstrated several techniques for making minor modifications to known Mac malware so that they are no longer detected by signature-based security solutions, such as Apple’s XProtect and Malware Removal Tool (MRT).

The bypass methods analyzed and successfully executed by Wardle include changing a single byte in the malicious file, unsigning and resigning components to bypass certificate revocation mechanisms, and simply renaming components. While the expert has tested these methods against Apple tools, he is confident that third-party antiviruses are just as easy to bypass, including through the use of free obfuscation services.

The solution to detecting these types of threats, Wardle says, is focusing on potentially malicious behavior rather than signatures. This includes file activity monitoring for actions associated with methods of malware persistence, detecting access to the device’s microphone and camera, monitoring for keyboard “event taps” that could indicate the presence of a keylogger, and detecting synthetic clicks.

The researcher has developed several free tools that can help detect many of these actions. Digita Security created a commercial endpoint protection product for enterprise Mac fleets, GamePlan, that can also detect synthetic clicks.

Wardle is presenting his research on Friday at the DEFCON hacking conference in Las Vegas.

Related: Mac Malware Delivered via Firefox Exploits Analyzed

Related: ‘MaMi’ Mac Malware Hijacks DNS Settings

Written By

Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

Click to comment

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join this webinar to learn best practices that organizations can use to improve both their resilience to new threats and their response times to incidents.


Join this live webinar as we explore the potential security threats that can arise when third parties are granted access to a sensitive data or systems.


Expert Insights

Related Content


The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.


No one combatting cybercrime knows everything, but everyone in the battle has some intelligence to contribute to the larger knowledge base.


A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...

Malware & Threats

Threat actors are increasingly abusing Microsoft OneNote documents to deliver malware in both targeted and spray-and-pray campaigns.

Malware & Threats

Microsoft plans to improve the protection of Office users by blocking XLL add-ins from the internet.


More than 3,800 servers around the world have been compromised in recent ESXiArgs ransomware attacks, which also include an improved process.

Malware & Threats

A vulnerability affecting IBM’s Aspera Faspex file transfer solution, tracked as CVE-2022-47986, has been exploited in attacks.

Malware & Threats

Unpatched and unprotected VMware ESXi servers worldwide have been targeted in a ransomware attack exploiting a vulnerability patched in 2021.