Komplex is a macOS downloader Trojan associated with the Russian cyberespionage group APT28, also known as Sofacy and Fancy Bear. Publicly identified in September 2016, it establishes a foothold on compromised Macs and retrieves and executes additional files at the direction of command-and-control servers.
The infection package is a PDF-themed application combining a dropper, a malicious payload, and a decoy PDF. During execution, it installs the payload and opens the decoy in Preview. Komplex stores its payload in a hidden directory and maintains persistence through a user-level LaunchAgent loaded with launchctl. Its OsInfo function collects the current username and a list of running processes, supporting host reconnaissance. The Trojan also supports file deletion and obfuscates command-and-control data using an 11-byte XOR algorithm.
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.
These checks were specifically for Apple’s OS X operating system, which coupled with our discovery of Sofacy’s Komplex OSX Trojan suggests that this threat group is capable of operating in both Windows and Apple environments.
22 distinct techniques documented for this family, organized by ATT&CK tactic.
Multiple entries describe APT28/Pawn Storm/Sofacy campaigns using lure documents, themed emails, and phishing schemes, e.g., “APT28 Hacker Group Targeting Europe, Americas, Asia in Widespread Phishing Scheme”, “New Spear Phishing Campaign Pretends to be EFF”, and “distribution of emails with 'instructions' on 'updating the operating system'”.
Komplex is an APT28/Sofacy component that can be distributed via email, disguised as a PDF document, to establish a foothold in a system.
The Komplex Dropper: Its main functionality is to drop a third Komplex component: the final payload, and ensure persistence on the infected system
Komplex: "executing a shell command"; Keydnap executes downloaded Python via `system("python %s")`
The Komplex Trojan is a binder with multiple parts: a dropper, a payload and a decoy pdf file.
The Komplex Dropper: Its main functionality is to drop a third Komplex component: the final payload, and ensure persistence on the infected system
The [Komplex](https://attack.mitre.org/software/S0162) trojan creates a persistent launch agent called with <code>$HOME/Library/LaunchAgents/com.apple.updates.plist</code> with <code>launchctl load -w ~/Library/LaunchAgents/com.apple.updates.plist</code>.(Citation: Sofacy Komplex Trojan)
The Komplex Dropper: Its main functionality is to drop a third Komplex component: the final payload, and ensure persistence on the infected system... system("cp /Users/Shared/com.apple.updates.plist $HOME/Library/LaunchAgents/ &>/dev/null");
The Komplex Dropper: Its main functionality is to drop a third Komplex component: the final payload, and ensure persistence on the infected system
The [Komplex](https://attack.mitre.org/software/S0162) trojan creates a persistent launch agent called with <code>$HOME/Library/LaunchAgents/com.apple.updates.plist</code> with <code>launchctl load -w ~/Library/LaunchAgents/com.apple.updates.plist</code>.(Citation: Sofacy Komplex Trojan)
The Komplex Dropper: Its main functionality is to drop a third Komplex component: the final payload, and ensure persistence on the infected system... system("cp /Users/Shared/com.apple.updates.plist $HOME/Library/LaunchAgents/ &>/dev/null");
The Komplex Trojan is a binder with multiple parts: a dropper, a payload and a decoy pdf file.
The [Komplex](https://attack.mitre.org/software/S0162) trojan supports file deletion.(Citation: Sofacy Komplex Trojan)
The Komplex trojan creates a persistent launch agent called with $HOME/Library/LaunchAgents/com.apple.updates.plist with launchctl load -w ~/Library/LaunchAgents/com.apple.updates.plist.
The [Komplex](https://attack.mitre.org/software/S0162) payload is stored in a hidden directory at <code>/Users/Shared/.local/kextd</code>.(Citation: Sofacy Komplex Trojan)
Komplex: "first checks if it is being debugged" and removes itself if debugged
Komplex: loops until "connectedToInternet()" returns true before proceeding
The OsInfo function in [Komplex](https://attack.mitre.org/software/S0162) collects the current running username.(Citation: Sofacy Komplex Trojan)
The OsInfo function in [Komplex](https://attack.mitre.org/software/S0162) collects a running process list.(Citation: Sofacy Komplex Trojan)
Multiple malware families and threat groups are described as collecting the victim username or enumerating logged-on users (e.g., “can collect the username from the victim’s machine”, “enumerates the current user during the initial infection”, “enumerates logged-on users”).
Komplex: "first checks if it is being debugged" and removes itself if debugged
Many entries describe XOR, XOR/ADD, bitwise NOT and XOR, ROR plus XOR, hexadecimal encoding after encryption, and custom encoding/obfuscation of HTTP traffic or beacons.
The agent starts by selecting a C&C server from a hardcoded list, then sends a hello message and starts two main communications threads... One for receiving commands ... in an infinite GET loop. One for sending data ... in an infinite POST loop.
The [Komplex](https://attack.mitre.org/software/S0162) C2 channel uses HTTP POST requests.(Citation: Sofacy Komplex Trojan)
The Komplex Payload: Is the final component of the Komplex malware, with the sole purpose of downloading and executing a file, as requested by the C&C servers.
The content is a catalog of malware and threat groups that encrypt command-and-control communications using algorithms such as DES, AES, RC4, XOR, Blowfish, RSA, Camellia, RC2, RC6, and custom ciphers.
The [Komplex](https://attack.mitre.org/software/S0162) C2 channel uses an 11-byte XOR algorithm to hide data.(Citation: Sofacy Komplex Trojan)
3 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
24 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.