Hackers use macOS extended file attributes to hide malicious code

Share:

Hackers are using a novel technique that abuses extended attributes for macOS files to deliver a new trojan that researchers call RustyAttr.

The threat actor is hiding malicious code in custom file metadata and also uses decoy PDF documents to help evade detection.

The new technique is similar to how the Bundlore adware in 2020 hid its payloads in resource forks to hide payloads for macOS. It was discovered in a few malware samples in the wild by researchers at cybersecurity company Group-IB.

Based on their analysis and because they could not confirm any victims, the researchers attribute the samples to the North Korean threat actor Lazarus with moderate confidence. They believe that the attacker may be experimenting with a new malware delivery solution.

The method is uncommon and proved to be efficient against detection, as none of the security agents on the Virus Total platform flagged the malicious files.

Concealing code in file attributes

macOS extended attributes (EAs) represent hidden metadata typically associated with files and directories, that is not directly visible with Finder or the terminal but can be extracted using the ‘xattr’ command for showing, editing, or removing extended attributes.

In the case of RustyAttr attacks, the EA name is ‘test’ and holds a shell script.

The malcious apps storing the EA are built using the Tauri framework, which combines a web frontend (HTML, JavaScript) that can call functions on a Rust backend.

When the application runs, it loads a webpage containing a JavaScript (‘preload.js’) that gets the content from the location indicated in the “test” EA and sends it to the ‘run_command’ function for the shell script to be executed.

Contents of preload.js
Contents of preload.js
Source: Group-IB

To keep user suspicion low during this process, some samples launch decoy PDF files or display error dialogs.

Decoy PDF hides malicious background activity
Decoy PDF hides malicious background activity
Source: Group-IB

The PDF is fetched from a pCloud instance for public file sharing that also contains entries with names related to cryptocurrency investment topics, which aligns with Lazarus’ targets and goals.

The few samples of RustyAttr apps Group-IB found all pass detection tests on Virus Total and the applications were signed using a leaked certificate, which Apple has since revoked, but were not notarized.

App certificate details
App certificate details
Source: Group-IB

Group-IB was not able to retrieve and analyze the next-stage malware but discovered that the staging server connects to a known endpoint in Lazarus infrastructure to attempt to fetch it.

Execution flow
Execution flow
Source: Group-IB

Experimenting with macOS evasion

The case reported by Group-IB is very similar to another recent report from SentinelLabs, which observed the North Korean threat actor BlueNoroff experimenting with similar yet distinct techniques for evasion in macOS.

BlueNoroff used cryptocurrency-themed phishing to lure targets to download a malicious app that was signed and notarized.

The apps used a modified ‘Info.plist’ file to stealthily trigger a malicious connection to the attacker-controlled domain from where the second-stage payload is retrieved.

It is unknown if the campaigns are related, but it is common for separate activity clusters to use the same information on how to effectively breach macOS systems without triggering alarms.

Bill Toulas

Leave a Comment

Your email address will not be published. Required fields are marked *

loader-image
London, GB
3:13 am, Jul 11, 2025
weather icon 19°C
L: 17° | H: 19°
broken clouds
Humidity: 78 %
Pressure: 1021 mb
Wind: 7 mph E
Wind Gust: 0 mph
UV Index: 0
Precipitation: 0 mm
Clouds: 60%
Rain Chance: 0%
Visibility: 10 km
Sunrise: 4:56 am
Sunset: 9:15 pm
DailyHourly
Daily ForecastHourly Forecast
Today 10:00 pm
weather icon
17° | 19°°C 0 mm 0% 8 mph 78 % 1021 mb 0 mm/h
Tomorrow 10:00 pm
weather icon
19° | 30°°C 0 mm 0% 10 mph 66 % 1019 mb 0 mm/h
Sun Jul 13 10:00 pm
weather icon
18° | 30°°C 0 mm 0% 7 mph 71 % 1015 mb 0 mm/h
Mon Jul 14 10:00 pm
weather icon
18° | 28°°C 1 mm 100% 15 mph 84 % 1016 mb 0 mm/h
Tue Jul 15 10:00 pm
weather icon
14° | 20°°C 1 mm 100% 14 mph 81 % 1017 mb 0 mm/h
Today 4:00 am
weather icon
17° | 19°°C 0 mm 0% 3 mph 78 % 1021 mb 0 mm/h
Today 7:00 am
weather icon
19° | 19°°C 0 mm 0% 2 mph 74 % 1021 mb 0 mm/h
Today 10:00 am
weather icon
24° | 27°°C 0 mm 0% 2 mph 56 % 1021 mb 0 mm/h
Today 1:00 pm
weather icon
30° | 30°°C 0 mm 0% 3 mph 32 % 1020 mb 0 mm/h
Today 4:00 pm
weather icon
32° | 32°°C 0 mm 0% 4 mph 26 % 1018 mb 0 mm/h
Today 7:00 pm
weather icon
30° | 30°°C 0 mm 0% 6 mph 29 % 1017 mb 0 mm/h
Today 10:00 pm
weather icon
23° | 23°°C 0 mm 0% 8 mph 49 % 1019 mb 0 mm/h
Tomorrow 1:00 am
weather icon
21° | 21°°C 0 mm 0% 5 mph 57 % 1019 mb 0 mm/h
Name Price24H (%)
Bitcoin(BTC)
€99,000.08
4.01%
Ethereum(ETH)
€2,525.40
6.12%
Tether(USDT)
€0.85
-0.02%
XRP(XRP)
€2.18
4.83%
Solana(SOL)
€140.29
3.69%
USDC(USDC)
€0.85
0.00%
Dogecoin(DOGE)
€0.167386
8.15%
Shiba Inu(SHIB)
€0.000011
8.44%
Pepe(PEPE)
€0.000010
13.09%
Peanut the Squirrel(PNUT)
€0.245548
22.13%
Scroll to Top