MacSpy
- Type
- RAT
- Capabilities
- KeyloggingExfiltrationPersistenceDefense evasionReconnaissance
- Platforms
- macOS
MacSpy is a macOS remote access trojan and spyware family marketed as malware-as-a-service, with free and paid advanced tiers. Its surveillance capabilities include keystroke logging, clipboard collection, desktop screenshots across multiple monitors, and microphone recording. It also collects host and user information, including operating-system and hardware details. Collected data is staged locally and exfiltrated through HTTP POST requests routed through a bundled Tor SOCKS proxy to command-and-control infrastructure. An operator web portal provides access to the stolen data.
MacSpy establishes persistence through a LaunchAgent configured to execute at load and remain running. It copies itself and supporting components into a hidden directory within the user's Library, removes the original installation files, and deletes temporary staging files after exfiltration. Its defense-evasion mechanisms include preventing debugger attachment, detecting debugging, and checking processor configuration, memory capacity, and machine model to hinder execution in virtual machines or low-resource analysis environments. MacSpy targets Apple desktop systems; specific victim industries, established threat-actor attribution, and initial infection vectors are not documented.
Techniques & procedures
16 distinct techniques documented for this family, organized by ATT&CK tactic.
Persistence
2 techniques
Persistence
[MacSpy](https://attack.mitre.org/software/S0282) persists via a Launch Agent.(Citation: objsee mac malware 2017)
LoginHooks and LogoutHooks have been around for a long time and can still be used to run a persistence script on macOS. When a person logs in or out, these mechanisms run code, as the names suggest.
Privilege Escalation
2 techniques
Privilege Escalation
[MacSpy](https://attack.mitre.org/software/S0282) persists via a Launch Agent.(Citation: objsee mac malware 2017)
LoginHooks and LogoutHooks have been around for a long time and can still be used to run a persistence script on macOS. When a person logs in or out, these mechanisms run code, as the names suggest.
Stealth
5 techniques
Stealth
“copies itself… to ‘~/Library/.DS_Stores/’… deletes the original files in an attempt to stay hidden… launch entry… com.apple.webkit.plist”
[MacSpy](https://attack.mitre.org/software/S0282) deletes any temporary files it creates(Citation: alientvault macspy)
“contains checks against the execution environment… checks that the number of physical CPUs… logical cores… at least 4 GB of memory… compares the machine model to ‘Mac’ using the ‘sysctl’ command.”
[MacSpy](https://attack.mitre.org/software/S0282) stores itself in <code>~/Library/.DS_Stores/</code> (Citation: alientvault macspy)
“To prevent debugging, it calls ptrace() with the PT_DENY_ATTACH option… additional code that checks if it is running in a debugger.”
Credential Access
1 technique
Credential Access
[MacSpy](https://attack.mitre.org/software/S0282) captures keystrokes.(Citation: objsee mac malware 2017)
Discovery
3 techniques
Discovery
“the malware sends the data it had collected earlier, such as system information… Contents… SystemInfo fullUsername… hostname… os Version… memory… processorCount… identifier… uuid… disk layout”
“contains checks against the execution environment… checks that the number of physical CPUs… logical cores… at least 4 GB of memory… compares the machine model to ‘Mac’ using the ‘sysctl’ command.”
“To prevent debugging, it calls ptrace() with the PT_DENY_ATTACH option… additional code that checks if it is running in a debugger.”
Collection
4 techniques
Collection
[MacSpy](https://attack.mitre.org/software/S0282) captures keystrokes.(Citation: objsee mac malware 2017)
[MacSpy](https://attack.mitre.org/software/S0282) can capture screenshots of the desktop over multiple monitors.(Citation: objsee mac malware 2017)
[MacSpy](https://attack.mitre.org/software/S0282) can steal clipboard contents.(Citation: objsee mac malware 2017)
[MacSpy](https://attack.mitre.org/software/S0282) can record the sounds from microphones on a computer.(Citation: objsee mac malware 2017)
Command and Control
3 techniques
Command and Control
AsyncRAT can proxy C2 through a Tor client. Attor has used Tor for C2 communication. Cyclops Blink has used Tor nodes for C2 traffic. GreyEnergy has used Tor relays for Command and Control servers. Siloscape uses Tor to communicate with C2. WannaCry uses Tor for command and control traffic.
[MacSpy](https://attack.mitre.org/software/S0282) uses HTTP for command and control.(Citation: objsee mac malware 2017)
[MacSpy](https://attack.mitre.org/software/S0282) uses [Tor](https://attack.mitre.org/software/S0183) for command and control.(Citation: objsee mac malware 2017)
Exfiltration
1 technique
Exfiltration
“After connecting to the CnC, the malware sends the data it had collected earlier… This process repeats… After exfiltration of the data, the malware deletes the temporary files containing the data it sent.”
Observables
5 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
22 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.