OSX.FruitFly is a macOS backdoor and long-running espionage malware family discovered in 2017 but assessed to have operated on victim systems for years before public identification. It is notable for its unusual implementation, relying heavily on Perl-based components with helper modules including native and Java elements. The malware communicates with a command-and-control server, executes attacker-supplied commands, captures screenshots, and exfiltrates data from compromised Macs.
FruitFly is associated with covert surveillance activity against large numbers of victims, including infections identified in institutional environments. Its functionality supports persistent remote access and post-compromise monitoring rather than overt disruption. Reported behavior includes use of synthetic mouse and keyboard events on macOS to interact with the user interface and dismiss security prompts, enabling unauthorized access to protected resources and facilitating stealthy operator control.
The malware targets macOS systems and has been characterized as an all-purpose backdoor oriented toward spying and remote administration. Public reporting tied the campaign to Phillip Roman Durachinsky following a U.S. criminal investigation that identified thousands of victims. FruitFly is significant both for its longevity on macOS and for demonstrating how attackers could abuse native automation and input-simulation mechanisms to bypass user-facing security controls.
8 distinct techniques documented for this family, organized by ATT&CK tactic.
OSX.FruitFly • Perl script, containing "helpers": • Mach-O binary • Java class • Another Perl script
First-stage Perl • ... Exfiltrates data
elsif(!system(($m ? 'screencapture -x' : 'xwd -silent -root '. '-display :0.0 | convert xwd:-'). ' /tmp/scrn.png')) { ... A "\2".K($v) }
"the injected code was able to arbitrarily record audio and video" and "access the mic and webcam at arbitrary times"
"the injected code was able to arbitrarily record audio and video" and "I added some code to the injected library to record a few seconds of video off the webcam"
First-stage Perl • Communicates with C&C • Executes commands (with assist from helpers) • Exfiltrates data
All-purpose, extremely unique, backdoor
Capture screen to /tmp/scrn.png Read image into memory Write image to C&C socket
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.