MacMa
- Type
- Backdoor
- Capabilities
- KeyloggingExfiltrationPersistencePrivilege escalationDefense evasionReconnaissance
- Delivery
- Watering holeDrive byFake update
- Platforms
- macOS
MacMa, also known as OSX.CDDS, is a macOS backdoor used for cyberespionage and surveillance. It supports device fingerprinting, username collection, keylogging, arbitrary command execution, screen and audio capture, and bidirectional file transfer. It can stage collected files locally before exfiltrating them through its command-and-control channel. Its communications use a custom JSON-based protocol with TLS encryption. MacMa establishes persistence through LaunchAgents configured to execute at login and can modify file timestamps for defense evasion. Some variants restrict execution to graphical user sessions.
MacMa has been deployed through watering-hole attacks involving pro-democracy websites in China. These infection chains exploited CVE-2021-1789 in WebKit for initial code execution and CVE-2021-30869 for elevation to root privileges. In mid-2023, StormBamboo, also known as Evasive Panda, delivered MacMa to macOS systems at organizations in Asia by compromising an internet service provider and poisoning DNS responses. This redirected insecure HTTP software-update requests to malicious installers, exploiting update mechanisms that did not validate installer signatures and requiring no user interaction. Despite overlapping targeting and exploitation techniques, MacMa and DazzleSpy are distinct malware families with different codebases and payload structures.
Associated vulnerabilities
3 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
2 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
MACMA is able to perform device fingerprinting, keylogging, executing commands, screen and audio capture, and uploading/downloading files.
Google labelled the backdoor “Macma”… Objective-See (under the name “OSX.CDDS”)… we take a deeper dive into macOS.Macma…
Techniques & procedures
45 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
3 techniques
Initial Access
It infected machines using a combination of two vulnerabilities, one in WebKit (the framework that powers Safari) and one in macOS (a privilege escalation vulnerability). | DazzleSpy, according to the researchers at ESET, was being spread via watering hole attacks via pro-democracy websites in China.
StormBamboo targets software updates via HTTP that do not validate digital signatures of installers.
StormBamboo controlled DNS responses and redirected HTTP software-update requests to an attacker-controlled server hosting a forged text file and malicious installer.
Execution
4 techniques
Execution
That payload is a very full-featured backdoor, providing the attacker the capability to run any arbitrary command on the infected Mac.
[MacMa](https://attack.mitre.org/software/S1016) can execute supplied shell commands and uses bash scripts to perform additional actions.(Citation: ESET DazzleSpy Jan 2022)(Citation: Objective-See MacMa Nov 2021)
[MacMa](https://attack.mitre.org/software/S1016) has used macOS API functions to perform tasks.(Citation: ESET DazzleSpy Jan 2022)(Citation: Objective-See MacMa Nov 2021)
The advisory maps StormBamboo's compromise of insecure automatic update mechanisms to T1203.
Persistence
3 techniques
Persistence
[MacMa](https://attack.mitre.org/software/S1016) installs a `com.apple.softwareupdate.plist` file in the `/LaunchAgents` folder with the `RunAtLoad` value set to `true`. Upon user login, [MacMa](https://attack.mitre.org/software/S1016) is executed from `/var/root/.local/softwareupdate` with root privileges. Some variations also include the `LimitLoadToSessionType` key with the value `Aqua`, ensuring the [MacMa](https://attack.mitre.org/software/S1016) only runs when there is a logged in GUI user.(Citation: ESET DazzleSpy Jan 2022)(Citation: Objective-See MacMa Nov 2021)
The attacker-controlled server hosted a malicious installer, and the installer eventually downloaded either MGBot malware for Windows or MACMA for macOS.
The items you’re most likely to see are: /var/root/Library/LaunchAgents/com.apple.softwareupdate.plist ... However, it’s also possible the malware could get dropped into the user folder, in which case you’ll see these paths instead: ~/Library/LaunchAgents/com.apple.softwareupdate.plist
Privilege Escalation
4 techniques
Privilege Escalation
This led to the in-memory execution of native Mac code, which exploits CVE-2021-30869 to gain root privileges.
[MacMa](https://attack.mitre.org/software/S1016) installs a `com.apple.softwareupdate.plist` file in the `/LaunchAgents` folder with the `RunAtLoad` value set to `true`. Upon user login, [MacMa](https://attack.mitre.org/software/S1016) is executed from `/var/root/.local/softwareupdate` with root privileges. Some variations also include the `LimitLoadToSessionType` key with the value `Aqua`, ensuring the [MacMa](https://attack.mitre.org/software/S1016) only runs when there is a logged in GUI user.(Citation: ESET DazzleSpy Jan 2022)(Citation: Objective-See MacMa Nov 2021)
The attacker-controlled server hosted a malicious installer, and the installer eventually downloaded either MGBot malware for Windows or MACMA for macOS.
The items you’re most likely to see are: /var/root/Library/LaunchAgents/com.apple.softwareupdate.plist ... However, it’s also possible the malware could get dropped into the user folder, in which case you’ll see these paths instead: ~/Library/LaunchAgents/com.apple.softwareupdate.plist
Stealth
4 techniques
Stealth
Green Lambert can create a Launch Agent with the RunAtLoad key-value pair set to true, ensuring the com.apple.GrowlHelper.plist file runs every time a user logs in. Komplex creates a persistent launch agent called ... com.apple.updates.plist. MacMa installs a com.apple.softwareupdate.plist file in the /LaunchAgents folder.
[MacMa](https://attack.mitre.org/software/S1016) can delete itself from the compromised computer.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) has the capability to create and modify file timestamps.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) decrypts a downloaded file using AES-128-EBC with a custom delta.(Citation: ESET DazzleSpy Jan 2022)
Defense Impairment
3 techniques
Defense Impairment
[MacMa](https://attack.mitre.org/software/S1016) has removed the `com.apple.quarantineattribute` from the dropped file, `$TMPDIR/airportpaird`.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) has been delivered using ad hoc Apple Developer code signing certificates.(Citation: SentinelOne Macma 2021)
[MacMa](https://attack.mitre.org/software/S1016) can clear possible malware traces such as application logs.(Citation: ESET DazzleSpy Jan 2022)
Credential Access
6 techniques
Credential Access
That payload is a very full-featured backdoor, providing the attacker the capability to... send synthetic mouse clicks...
[MacMa](https://attack.mitre.org/software/S1016) can use Core Graphics Event Taps to intercept user keystrokes from any text input field and saves them to text files. Text input fields include Spotlight, Finder, Safari, Mail, Messages, and other apps that have text fields for passwords.(Citation: Objective-See MacMa Nov 2021)(Citation: SentinelOne MacMa Nov 2021)
Browser cookies and data are encoded with base64 and exfiltrated to a Google Drive using AES encryption.
That payload is a very full-featured backdoor, providing the attacker the capability to... steal the keychain...
[MacMa](https://attack.mitre.org/software/S1016) can dump credentials from the macOS keychain.(Citation: ESET DazzleSpy Jan 2022)
malware authors are known to target exfiltrating the keychain database. Recent examples include DazzleSpy and ... KeySteal.
Discovery
6 techniques
Discovery
[MacMa](https://attack.mitre.org/software/S1016) can collect IP addresses from a compromised host.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) can collect the username from the compromised machine.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) can enumerate running processes.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) can collect information about a compromised computer, including: Hardware UUID, Mac serial number, and macOS version.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) can search for a specific file on the compromised computer and can enumerate files in Desktop, Downloads, and Documents folders.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) can collect information about a compromised computer's disk sizes.(Citation: ESET DazzleSpy Jan 2022)
Lateral Movement
1 technique
Lateral Movement
[MacMa](https://attack.mitre.org/software/S1016) can manage remote screen sessions.(Citation: ESET DazzleSpy Jan 2022)
Collection
8 techniques
Collection
[MacMa](https://attack.mitre.org/software/S1016) can collect then exfiltrate files from the compromised system.(Citation: ESET DazzleSpy Jan 2022)
That payload is a very full-featured backdoor, providing the attacker the capability to... send synthetic mouse clicks...
[MacMa](https://attack.mitre.org/software/S1016) can use Core Graphics Event Taps to intercept user keystrokes from any text input field and saves them to text files. Text input fields include Spotlight, Finder, Safari, Mail, Messages, and other apps that have text fields for passwords.(Citation: Objective-See MacMa Nov 2021)(Citation: SentinelOne MacMa Nov 2021)
The content repeatedly describes adversaries and malware storing collected data, command output, credentials, archives, or files in local temporary folders, working directories, hidden directories, registry locations, recycle bins, or specific files prior to exfiltration.
[MacMa](https://attack.mitre.org/software/S1016) has stored collected files locally before exfiltration.(Citation: Objective-See MacMa Nov 2021)
[MacMa](https://attack.mitre.org/software/S1016) has used Apple’s Core Graphic APIs, such as `CGWindowListCreateImageFromArray`, to capture the user's screen and open windows.(Citation: ESET DazzleSpy Jan 2022)(Citation: Objective-See MacMa Nov 2021)
[MacMa](https://attack.mitre.org/software/S1016) has the ability to record audio.(Citation: Objective-See MacMa Nov 2021)
"UserAgent 2021... along with some added AV capture capabilities."
Command and Control
8 techniques
Command and Control
The attacker redirects the HTTP request to a Command and Control (C2) server they control hosting a forged text file and a malicious installer.
[MacMa](https://attack.mitre.org/software/S1016) has used a custom JSON-based protocol for its C&C communications.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) has downloaded additional files, including an exploit for used privilege escalation.(Citation: ESET DazzleSpy Jan 2022)(Citation: Objective-See MacMa Nov 2021)
That payload is a very full-featured backdoor, providing the attacker the capability to run any arbitrary command on the infected Mac, start a remote screen viewing session...
[MacMa](https://attack.mitre.org/software/S1016) has used TCP port 5633 for C2 Communication.(Citation: ESET DazzleSpy Jan 2022)
[MacMa](https://attack.mitre.org/software/S1016) has used TLS encryption to initialize a custom protocol for C2 communications.(Citation: ESET DazzleSpy Jan 2022)
“KV Botnet Activity… subsequent negotiation stages that represent a form of handshake similar to TLS negotiation… MacMa has used TLS encryption to initialize a custom protocol for C2 communications.”
StormBamboo controlled DNS responses and redirected HTTP software-update requests to an attacker-controlled server hosting a forged text file and malicious installer.
Exfiltration
1 technique
Exfiltration
[MacMa](https://attack.mitre.org/software/S1016) exfiltrates data from a supplied path over its C2 channel.(Citation: ESET DazzleSpy Jan 2022)
Observables
32 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
46 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.