A macOS persistence proof of concept showed how Folder Actions, a native automation feature, can be abused to trigger code execution whenever files are added to a monitored directory. The demonstration used an AppleScript handler with on adding folder items and do shell script to launch a benign compiled C payload stored at /Users/Shared/meow, which wrote execution details and file paths to /tmp/meow.txt instead of performing malicious actions. The technique was tested on macOS Monterey and Sonoma and highlighted that, unlike LaunchAgents, Folder Actions are event-driven and execute only when a watched folder receives new items.
The workflow included both GUI-based setup and command-line registration through System Events and osascript, with the caveat that newer macOS versions may require Automation permissions. Defensive guidance focused on monitoring ~/Library/Scripts/Folder Action Scripts, decompiling .scpt files with osadecompile, and hunting for suspicious AppleScript patterns such as do shell script, unusual watched folders, and process chains involving execution from locations like /Users/Shared or /tmp.

Get the actors, campaigns, and ATT&CK mapping behind it.
1 event from the most recent confirmed update back to the earliest known activity.
A researcher published a benign proof of concept showing how macOS Folder Actions can be abused for persistence by attaching an AppleScript to a watched folder that launches a C payload when files are added. The post demonstrated the technique on macOS Monterey and Sonoma and included defensive detection ideas such as monitoring Folder Action scripts and decompiling .scpt files.
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Get the adversaries, campaigns, and ATT&CK mapping behind this technique, with detections ready to deploy.
2 references tracked. Mallory keeps watching after this page renders.
malware.news
Open sourcecocomelonc.github.io
Open sourceMap indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.