Skip to main content
Mallory
Malware3 associated actors

KandyKorn

Tracked since Mar 17, 2026 · Updated 16 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days3 mentions · peak 2 in a dayToday
Vulns0Associated
Actors3Associated
ATT&CK28Techniques
IOCs27Tracked
Type
RAT
Capabilities
ReconnaissanceExfiltrationPersistenceDefense evasion
Delivery
SpearphishingLure
Platforms
macOS

KANDYKORN is a C++ memory-resident remote-access trojan targeting macOS, associated with North Korean threat activity linked to the Lazarus Group. Observed activity dates to at least April 2023 and targeted blockchain engineers at a cryptocurrency exchange. Its functionality provides operators with extensive remote control, reconnaissance, and data-exfiltration capabilities.

The documented infection chain began with attackers impersonating blockchain-community members on Discord and persuading a target to execute a malicious Python application presented as a cryptocurrency-arbitrage bot. Successive Python stages deployed SUGARLOADER, which retrieved and reflectively loaded KANDYKORN into memory. The chain used HLOADER, a Swift component that hijacked the legitimate Discord application's execution flow, to maintain access while preserving normal application behavior.

KANDYKORN runs as a background daemon and communicates with command-and-control infrastructure using RC4-encrypted traffic and a custom challenge-response handshake. It uses an encrypted configuration and a victim-specific identifier. Supported operations include gathering host information, enumerating processes and directories, calculating recursive file statistics, uploading and downloading files, archiving and exfiltrating directories, securely deleting files, terminating processes, executing arbitrary commands, and opening interactive pseudoterminal shells. Operators can also retrieve or replace its configuration and specify sleep intervals. Reflective loading limits the final payload's on-disk footprint, while the surrounding loader chain supplies persistence and additional evasion.

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

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

View more details →
Lazarus

The engineer was targeted via a targeted social engineering engagement involving a fraudulent developer recruitment evaluation that delivered an obfuscated, memory-resident backdoor related to the RustBucket and KandyKorn malware lineages.

via sh3llc0d3 blogsh3llc0d3.com
TraderTraitor

The engineer was targeted via a targeted social engineering engagement involving a fraudulent developer recruitment evaluation that delivered an obfuscated, memory-resident backdoor related to the RustBucket and KandyKorn malware lineages.

via sh3llc0d3 blogsh3llc0d3.com
APT38

Given this execution flow and SugarLoader’s historical role in retrieving the KANDYKORN malware, it is likely that the final payload in the chain would be KANDYKORN or another fully-featured backdoor.

via securelistsecurelist.com
MITRE ATT&CK

Techniques & procedures

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

Initial Access

2 techniques
T1566PhishingEvidence1

By leveraging social media platforms like Discord with enticing lures, these actors are finding new paths into highly targeted environments.

T1566.003Spearphishing via ServiceEvidence2

Further analysis revealed that the intrusion began with a Python application disguised as a cryptocurrency arbitrage bot, which was distributed through a direct message on a public Discord server.

Execution

5 techniques
T1059.004Unix ShellEvidence1

resp_cmd_create spawns a shell on the system and communicates with it via a pseudoterminal.

T1059.006PythonEvidence1

Python scripts were used to drop malware that hijacked the host’s installed Discord app... Watcher.py checks the local Python version and downloads and executes testSpeed.py. The script downloads and executes another Python script, FinderTools.

T1106Native APIEvidence1

SUGARLOADER uses this to retrieve and execute the KANDYKORN remote access trojan in-memory via NSCreateObjectFileImageFromMemory and NSLinkModule.

T1204User ExecutionEvidence1

A Discord user is socially engineered into downloading a malicious Python application, Cross-Platform Bridges.zip.

T1574Hijack Execution FlowEvidence1

SUGARLOADER also downloads a Mach-O payload dubbed HLOADER and writes it to /Applications/Discord.app/Contents/MacOS/Discord. The genuine Discord executable is renamed as .lock in the same directory.

Persistence

2 techniques
T1543.001Launch AgentEvidence1

In the previous post, we analyzed how LaunchAgents work... LaunchAgents are great, but they have a flaw: macOS likes to scream about them with a “Background Items Added” notification... While their primary persistence was a LaunchAgent, they used shell configuration hijacking as a failsafe.

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.

Privilege Escalation

2 techniques
T1543.001Launch AgentEvidence1

In the previous post, we analyzed how LaunchAgents work... LaunchAgents are great, but they have a flaw: macOS likes to scream about them with a “Background Items Added” notification... While their primary persistence was a LaunchAgent, they used shell configuration hijacking as a failsafe.

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.

Stealth

6 techniques
T1036MasqueradingEvidence2

The victim believed they were installing an arbitrage bot, a software tool designed to profit from cryptocurrency rate differences between platforms.

T1070.004File DeletionEvidence2

Watcher.py deletes the testSpeed.py immediately following its execution... resp_file_wipe overwrites file content to zero and deletes the file.

T1140Deobfuscate/Decode Files or InformationEvidence1

When the breakpoint is hit, the code will already be decrypted in memory... The configuration file is encrypted using RC4... read into memory and decrypted.

T1497Virtualization/Sandbox EvasionEvidence1

When the malware first connects to the C2 server during the initialization phase, a handshake must be validated to proceed.

T1574Hijack Execution FlowEvidence1

SUGARLOADER also downloads a Mach-O payload dubbed HLOADER and writes it to /Applications/Discord.app/Contents/MacOS/Discord. The genuine Discord executable is renamed as .lock in the same directory.

T1620Reflective Code LoadingEvidence3

SUGARLOADER... download[s] a final stage payload... and execute[s] it directly in memory... leveraging APIs such as NSCreateObjectFileImageFromMemory or NSLinkModule.

Discovery

4 techniques
T1057Process DiscoveryEvidence2

resp_proc_list lists all running processes on the system along with their PID, UID and other information.

T1082System Information DiscoveryEvidence2

resp_basicinfo gathers information about the system such as hostname, uid, osinfo, and image path of the current process.

T1083File and Directory DiscoveryEvidence2

resp_file_dir lists content of a directory... resp_file_prop recursively read[s] a directory and count[s]... files, subdirectories, and total size.

T1497Virtualization/Sandbox EvasionEvidence1

When the malware first connects to the C2 server during the initialization phase, a handshake must be validated to proceed.

Lateral Movement

1 technique
T1021.004SSHEvidence1

resp_cmd_create Spawns a shell on the system and communicates with it via a pseudoterminal.

Collection

3 techniques
T1074.001Local Data StagingEvidence1

The newly created archive's name has the following pattern /tmp/tempXXXXXXX.

T1560Archive Collected DataEvidence1

resp_file_zipdown Archives a directory and exfiltrates it to the C2 server.

T1560.002Archive via LibraryEvidence1

resp_file_zipdown archive[s] a directory and exfiltrate[s] it to the C2 server.

Command and Control

6 techniques
T1008Fallback ChannelsEvidence1

It supports two C2 servers, one as the main server, and the second one as a fallback.

T1071Application Layer ProtocolEvidence2

Operating covertly, KANDYKORN employs a feature-rich multi-staged loader paired with a custom network protocol to facilitate a range of post-compromise activities.

T1105Ingress Tool TransferEvidence3

Watcher.py... fetches content from [a] Google Drive URL... written into the testSpeed.py file. testSpeed.py... fetches another Python file... FinderTools... downloading and executing... .sld.

T1219Remote Access ToolsEvidence1

The main feature of CosmicDoor is that it communicates with the C2 server using the WSS protocol, and it provides remote control functionality such as receiving and executing commands... SneakMain... receives additional AppleScript commands and uses the osascript -e command to execute them.

T1573Encrypted ChannelEvidence1

Both KANDYKORN and SUGARLOADER use the RC4 algorithm to encrypt their communications.

T1573.001Symmetric CryptographyEvidence1

All the data is encrypted with RC4 and uses the same key previously referenced in the configuration file.

Exfiltration

1 technique
T1041Exfiltration Over C2 ChannelEvidence2

resp_file_down [is] used by the adversary to transfer a file from the victim's computer to their infrastructure.

Indicators of compromise

Observables

27 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
Activity feed

Recent activity

13 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+7 more in the timeline. Sign up to see them
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
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 matching27Match every observed IP, domain, and hash against your live telemetry.
Associated threat actors3Groups 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 mapping28Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.