Security

Research

XCSSET macOS malware returns with first new version since 2022

Known for popping zero-days of yesteryear, Microsoft puts Apple devs on high alert


Microsoft says there's a new variant of XCSSET on the prowl for Mac users – the first new iteration of the malware since 2022.

XCSSET has been seen in limited attacks thus far, but Apple devs should be especially vigilant since the main infection vector is via Xcode projects.

The malware's main capabilities from 2022 remain. It still chases after digital wallet contents and gathers data from Notes and other system files as well. The main updates come in the form of better code obfuscation, updated persistence mechanisms, and new infection methods, Microsoft said in a Monday alert.

The key to its new obfuscation techniques is randomization, Microsoft added. Both the methods used for encoding payloads and the number of encoding iterations are "significantly more randomized" compared to previous versions.

SentinelOne investigated XCSSET in 2022 and found evidence of randomization, particularly in curl's --max-time value and the script's phaseName variable within the AppleScript payload file. It said at the time these techniques were likely deployed to evade static analysis and threat-hunting rules.

Microsoft said that in addition to using xxd for encoding in previous versions, XCSSET also now uses Base64, and module names are obfuscated, too, increasing the difficulty involved in determining the functionality of each.

Microsoft detailed two methods used to establish persistence. The first is the zshrc method, which ensures the malware persists across shell sessions. The payload is dropped inside a file named ~/.zshrc_aliases and a command is then appended to the ~/.zshrc file so that the payload is launched across every shell session.

The dock method launches the malicious payload whenever Launchpad is executed via the macOS dock. A signed dockutil tool is downloaded via the attacker's C2 and the malware then generates a fake Launchpad app, replacing the legitimate path entry on the dock with the newly created malicious one.

XCSSET has targeted Xcode devs since the first version researchers spotted in 2020. Infected Xcode projects were loaded by Apple devs and later uploaded to GitHub to spread to other unwitting programmers.

Trend Micro looked under the hood of XCSSET back then, saying its distribution model "can only be described as clever."

It added: "Affected developers will unwittingly distribute the malicious trojan to their users in the form of the compromised Xcode projects, and methods to verify the distributed file (such as checking hashes) would not help as the developers would be unaware that they are distributing malicious files."

Microsoft said today the malware has new infection methods, but they're all still underpinned by infected coding projects. 

"The new XCSSET variant introduces new methods for where the payload is placed in a target Xcode project. The method is chosen from one of the following options: TARGET, RULE, or FORCED_STRATEGY. An additional method involves placing the payload inside the TARGET_DEVICE_FAMILY key under build settings and running it at a latter phase."

The last time XCSSET featured on The Reg was in 2021 after Jamf found that the malware was exploiting zero-day vulnerabilities in macOS to bypass its privilege-control framework, Transparency Consent and Control (TCC).

After Trend published its first and follow-up reports on XCSSET, Jamf found a "significant uptick" in detected variants and these were primarily being used to take screenshots of victims' desktops or record their screens without notifying them.

"During Jamf's testing, it was determined that this vulnerability is not limited to screen recording permissions either," the MDM company blogged. "Multiple different permissions that have already been provided to the donor application can be transferred to the maliciously created app."

Other functionality demonstrated by the malware at the time included data or password theft from various apps including Telegram, Chrome, Evernote, Opera, WeChat, Skype, Notes, and Contacts.

Offering a final word of warning, Microsoft said: "Users must always inspect and verify any Xcode projects downloaded or cloned from repositories, as the malware usually spreads through infected projects. They should also only install apps from trusted sources, such as a software platform's official app store."

Somewhat unhelpfully, however, Microsoft didn't provide any indicators of compromise or hashes. We'll update the story if it decides to confirm these. ®

Send us news
6 Comments

Malware variants that target operational tech systems are very rare – but 2 were found last year

Fuxnet and FrostyGoop were both used in the Russia-Ukraine war

With millions upon millions of victims, scale of unstoppable info-stealer malware laid bare

244M purloined passwords added to Have I Been Pwned thanks to govt tip-off

China's Silver Fox spoofs medical imaging apps to hijack patients' computers

Sly like a PRC cyberattack

Snake Keylogger slithers into Windows, evades detection with AutoIt-compiled payload

Because stealing your credentials, banking info, and IP just wasn’t enough

Rather than add a backdoor, Apple decides to kill iCloud encryption for UK peeps

Plus: SEC launches new crypto crime unit; Phishing toolkit upgraded; and more

Harassment allegations against DEF CON veteran detailed in court filing

More than a dozen women came forward with accusations

Trump’s DoD CISO pick previously faced security clearance suspension

Hey, at least Katie Arrington brings a solid resume

Polish space agency confirms cyberattack

Officials vow to uncover who was behind it

Ransomware criminals love CISA's KEV list – and that's a bug, not a feature

1 in 3 entries are used to extort civilians, says new paper

Wallbleed vulnerability unearths secrets of China's Great Firewall 125 bytes at a time

Boffins poked around inside censorship engines – here's what they found

Signal will withdraw from Sweden if encryption-busting laws take effect

Experts warned the UK’s recent 'victory' over Apple would kickstart something of a domino effect

200-plus impressively convincing GitHub repos are serving up malware

Plus: DOGE staff quit; LastPass PC, Mac gasp; and CISA warns Oracle and Adobe flaws under attack