Skip to main content
Mallory
Malware1 associated actor

OSX_OCEANLOTUS.D

Tracked since Dec 5, 2025 · Updated 15 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
Vulns0Associated
Actors1Associated
ATT&CK43Techniques
IOCs7Tracked
Type
Backdoor
Capabilities
ExfiltrationPersistencePost exploitationDefense evasionReconnaissance
Delivery
Lure
Platforms
macOS
Also known asBackdoor.MacOS.OCEANLOTUS.F

OSX_OCEANLOTUS.D is a macOS backdoor associated with OceanLotus, also known as APT32. It provides remote command execution, file transfer, and host reconnaissance capabilities. Its infection chain uses a malicious Microsoft Word document masquerading as a Vietnamese event registration form and prompts the recipient to enable macros. Obfuscated macro code invokes Perl to extract and execute a 32-bit Mach-O dropper, which installs an embedded 64-bit Mach-O backdoor.

The dropper checks whether it has root privileges and selects an appropriate installation location and persistence mechanism. It establishes persistence through a LaunchDaemon when running as root or a user LaunchAgent otherwise, configuring the backdoor to launch automatically and remain running. It conceals installed artifacts with hidden attributes, randomizes file timestamps, and deletes itself after installation. Other observed concealment techniques include disguising an application bundle as a Word document.

The backdoor collects the operating-system version, account name, computer name, architecture, hardware identifiers, and network-interface MAC address. It derives a client identifier from host-specific values and transmits system information to command-and-control infrastructure. Communications use custom scrambling and AES-256 encryption; a custom TCP protocol also uses zlib compression. Remote commands support downloading and executing additional files, running command-line programs, uploading files from the compromised host, and deleting files.

Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
Threat actors

Associated threat actors

1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.

View more details →
APT32

(Citation: TrendMicro MacOS April 2018)(Citation: Amnesty Intl. Ocean Lotus February 2021)

via mitre attack structuredgithub.com
MITRE ATT&CK

Techniques & procedures

43 distinct techniques documented for this family, organized by ATT&CK tactic.

Initial Access

1 technique
T1566.001Spearphishing AttachmentEvidence1

The MacOS backdoor was found in a malicious Word document presumably distributed via email. Upon receiving the malicious document, the user is advised to enable macros.

Execution

7 techniques
T1059Command and Scripting InterpreterEvidence1

Both create one thread, and each thread is responsible for either downloading and executing the file or running a command line program in the terminal.

T1059.001PowerShellEvidence9

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) uses PowerShell scripts.(Citation: TrendMicro MacOS April 2018)

T1059.004Unix ShellEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) uses a shell script as the main executable inside an app bundle and drops an embedded base64-encoded payload to the <code>/tmp</code> folder.(Citation: Trend Micro MacOS Backdoor November 2020)(Citation: sentinelone apt32 macOS backdoor 2020)

T1059.005Visual BasicEvidence5

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) uses Word macros for execution.(Citation: TrendMicro MacOS April 2018)

T1059.006PythonEvidence1

After deobfuscation, we can see that the payload is written in the Perl programming language. It extracts theme0.xml file from the Word document.

T1129Shared ModulesEvidence4

For network communications, [OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) loads a dynamic library (`.dylib` file) using `dlopen()` and obtains a function pointer to execute within that shared library using `dlsym()`.(Citation: Unit42 OceanLotus 2017)

T1574Hijack Execution FlowEvidence1

...uses the LoadLibraryExW() function to load additional modules... execute additional plugins by loading the respective DLLs... loaded and executed DLLs in memory during runtime... loads a dynamic library (.dylib file) using dlopen() and obtains a function pointer... using dlopen() and dlsym()... calls LoadLibrary then executes exports from a DLL.

Persistence

5 techniques
T1037.005Startup ItemsEvidence1

Afterwards, the persistence file will be created in /Library/LaunchDaemons/ or ~/Library/LaunchAgents/ folder. The RunAtLoad key will command launchd to run the daemon when the operating system starts up... launchctl load ~/Library/LaunchAgents/ filename.plist

T1543.001Launch AgentEvidence4

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) can create a persistence file in the folder <code>/Library/LaunchAgents</code>.(Citation: TrendMicro MacOS April 2018)(Citation: Trend Micro MacOS Backdoor November 2020)

T1543.004Launch DaemonEvidence4

If running with <code>root</code> permissions, [OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) can create a persistence file in the folder <code>/Library/LaunchDaemons</code>.(Citation: TrendMicro MacOS April 2018)(Citation: sentinelone apt32 macOS backdoor 2020)

T1546.004Unix Shell Configuration ModificationEvidence1

Today, I’ll talk about shell environment hijacking trick... The two most interesting files for us are: ~/.zshrc - executed for interactive shells... ~/.zshenv - executed for every instance of zsh... So, the main trick: we append a command to run our malware at the end of these files.

T1547.002Authentication PackageEvidence1

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

5 techniques
T1037.005Startup ItemsEvidence1

Afterwards, the persistence file will be created in /Library/LaunchDaemons/ or ~/Library/LaunchAgents/ folder. The RunAtLoad key will command launchd to run the daemon when the operating system starts up... launchctl load ~/Library/LaunchAgents/ filename.plist

T1543.001Launch AgentEvidence4

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) can create a persistence file in the folder <code>/Library/LaunchAgents</code>.(Citation: TrendMicro MacOS April 2018)(Citation: Trend Micro MacOS Backdoor November 2020)

T1543.004Launch DaemonEvidence4

If running with <code>root</code> permissions, [OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) can create a persistence file in the folder <code>/Library/LaunchDaemons</code>.(Citation: TrendMicro MacOS April 2018)(Citation: sentinelone apt32 macOS backdoor 2020)

T1546.004Unix Shell Configuration ModificationEvidence1

Today, I’ll talk about shell environment hijacking trick... The two most interesting files for us are: ~/.zshrc - executed for interactive shells... ~/.zshenv - executed for every instance of zsh... So, the main trick: we append a command to run our malware at the end of these files.

T1547.002Authentication PackageEvidence1

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

13 techniques
T1027Obfuscated Files or InformationEvidence8

In the third-stage payload ... the strings are encrypted with custom encryption using base64 encoding and byte manipulation.

T1027.002Software PackingEvidence4

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) has a variant that is packed with UPX.(Citation: ESET OceanLotus macOS April 2019)

T1027.013Encrypted/Encoded FileEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) encrypts its strings in RSA256 and encodes them in a custom base64 scheme and XOR.(Citation: TrendMicro MacOS April 2018)

T1036MasqueradingEvidence2

It extracts theme0.xml file from the Word document. theme0.xml is a Mach-O 32-bit executable... For root user path: /Library/CoreMediaIO/Plug-Ins/FCP-DAL/iOSScreenCapture.plugin/Contents/Resources/ processname: screenassistantd For regular user path: ~/Library/Spelling/ processname: spellagentd

T1036.004Masquerade Task or ServiceEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) uses file naming conventions with associated executable locations to blend in with the macOS TimeMachine and OpenSSL services. Such as, naming a LaunchAgent plist file `com.apple.openssl.plist` which executes [OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) from the user's `~/Library/OpenSSL/` folder upon user login.(Citation: Unit42 OceanLotus 2017)

T1036.005Match Legitimate Resource Name or LocationEvidence3

It uses the icon for a Word document file as a disguise, attempting to pass itself off as a legitimate document file.

T1036.008Masquerade File TypeEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) has disguised it's true file structure as an application bundle by adding special characters to the filename and using the icon for legitimate Word documents.(Citation: Trend Micro MacOS Backdoor November 2020)

T1070.004File DeletionEvidence13

The app bundle and dropper delete themselves after execution

T1070.006TimestompEvidence7

The backdoor modifies the date and time of the dropped files using the “touch” command

T1140Deobfuscate/Decode Files or InformationEvidence6

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) uses a decode routine combining bit shifting and XOR operations with a variable key that depends on the length of the string that was encoded. If the computation for the variable XOR key turns out to be 0, the default XOR key of 0x1B is used. This routine is also referenced as the `rotate` function in reporting.(Citation: Unit42 OceanLotus 2017)

T1497.001System ChecksEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) checks a number of system parameters to see if it is being run on real hardware or in a virtual machine environment, such as `sysctl hw.model` and the kernel boot time.(Citation: Unit42 OceanLotus 2017)(Citation: ESET OceanLotus macOS April 2019)(Citation: 20 macOS Common Tools and Techniques)

T1564.001Hidden Files and DirectoriesEvidence6

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) sets the main loader file’s attributes to hidden.(Citation: TrendMicro MacOS April 2018)

T1574Hijack Execution FlowEvidence1

...uses the LoadLibraryExW() function to load additional modules... execute additional plugins by loading the respective DLLs... loaded and executed DLLs in memory during runtime... loads a dynamic library (.dylib file) using dlopen() and obtains a function pointer... using dlopen() and dlsym()... calls LoadLibrary then executes exports from a DLL.

Defense Impairment

2 techniques
T1222.002Linux and Mac PermissionsEvidence5

The backdoor changes the permission of the file it wants to execute to +x

T1553.001Gatekeeper BypassEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) uses the command <code>xattr -d com.apple.quarantine</code> to remove the quarantine file attribute used by Gatekeeper.(Citation: Trend Micro MacOS Backdoor November 2020)(Citation: 20 macOS Common Tools and Techniques)

Discovery

5 techniques
T1016System Network Configuration DiscoveryEvidence8

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) can collect the network interface MAC address on the infected host.(Citation: TrendMicro MacOS April 2018)(Citation: Trend Micro MacOS Backdoor November 2020)

T1033System Owner/User DiscoveryEvidence1

Running getpwuid ->pw_name, scutil --get ComputerName, and uname –m will provide the following returns respectively: Mac OSX 10.12. System Administrator <owner’s name>'s iMac x86_64

T1082System Information DiscoveryEvidence14

system_profiler SPHardwareDataType ... Get processor information

T1497.001System ChecksEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) checks a number of system parameters to see if it is being run on real hardware or in a virtual machine environment, such as `sysctl hw.model` and the kernel boot time.(Citation: Unit42 OceanLotus 2017)(Citation: ESET OceanLotus macOS April 2019)(Citation: 20 macOS Common Tools and Techniques)

T1614System Location DiscoveryEvidence1

The HandlePP::getClientID method uses the following environment variables: Serial number, Hardware UUID, MAC address, Randomly generated UUID

Collection

3 techniques
T1005Data from Local SystemEvidence4

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) has the ability to upload files from a compromised host.(Citation: Trend Micro MacOS Backdoor November 2020)

T1560.002Archive via LibraryEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) scrambles and encrypts data using AES256 before sending it to the C2 server.(Citation: TrendMicro MacOS April 2018)(Citation: Trend Micro MacOS Backdoor November 2020)

T1560.003Archive via Custom MethodEvidence5

The backdoor encrypts the data before exfiltration

Command and Control

8 techniques
T1001.001Junk DataEvidence1

Some Backdoor.Oldrea samples use standard Base64 + bzip2... gh0st RAT has used Zlib to compress C2 communications data before encrypting it... HOPLIGHT has utilized Zlib compression to obfuscate the communications payload.

T1071Application Layer ProtocolEvidence1

infoClient is responsible for collecting OS info, submitting this info to its C&C servers... Communication with the C&C server after the exchange of OS packet info... HandlePP::urlRequest (/appleauth/static/cssj/N252394295/widget/auth/app.css)

T1071.001Web ProtocolsEvidence7

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) can also use use HTTP POST and GET requests to send and receive C2 information.(Citation: Trend Micro MacOS Backdoor November 2020)

T1095Non-Application Layer ProtocolEvidence5

Like previous samples, performs backdoor routines based on C&C data

T1105Ingress Tool TransferEvidence5

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) has a command to download and execute a file on the victim’s machine.(Citation: TrendMicro MacOS April 2018)(Citation: Trend Micro MacOS Backdoor November 2020)

T1132.001Standard EncodingEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) has used `zlib` to compress all data after 0x52 for the custom TCP C2 protocol.(Citation: Unit42 OceanLotus 2017)

T1571Non-Standard PortEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) has used a custom binary protocol over TCP port 443 for C2.(Citation: Unit42 OceanLotus 2017)

T1573.001Symmetric CryptographyEvidence3

[OSX_OCEANLOTUS.D](https://attack.mitre.org/software/S0352) encrypts data sent back to the C2 using AES in CBC mode with a null initialization vector (IV) and a key sent from the server that is padded to 32 bytes.(Citation: Unit42 OceanLotus 2017)

Exfiltration

1 technique
T1041Exfiltration Over C2 ChannelEvidence3

Many entries state malware or actors can upload, transfer, send, or exfiltrate files from compromised hosts to command-and-control servers or attacker infrastructure.

Indicators of compromise

Observables

7 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.

View all in app →
Indicator values are available in Mallory. Pivot on every hash, domain, URL, and IP, or pipe them straight into your SIEM.View all in Mallory
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching7Match every observed IP, domain, and hash against your live telemetry.
Associated threat actors1Groups linked to this family, with evidence pinned to each claim.
Associated vulnerabilitiesCVEs linked to this family, with the reporting behind each link.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
MITRE ATT&CK mapping43Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.