Elastic Security Labs details a DPRK-linked intrusion targeting blockchain engineers via a Discord DM lure, employing a multi-stage Python-based chain and memory-resident payloads (SUGARLOADER, HLOADER, KANDYKORN) with RC4-encrypted C2 communications. The operation, attributed to REF7001 and overlaps with Lazarus Group activity, escalates from initial access to in-memory execution and data exfiltration through a spoofed Discord persistence mechanism. #LazarusGroup #KANDYKORN
Keypoints
- Threat actors lured blockchain engineers with a Python application to gain initial access to the environment
- This intrusion involved multiple complex stages that each employed deliberate defense evasion techniques
- The intrusion set was observed on a macOS system where an adversary attempted to load binaries into memory, which is atypical of macOS intrusions
- Initial access was delivered via social engineering on Discord, masquerading as an arbitrage bot
- The operation uses a five-stage execution flow culminating in KANDYKORN, a memory-resident RAT with extensive C2 and data-exfil capabilities
MITRE Techniques
- [T1566.003] Spearphishing via Service – The intruders social-engineered victims on Discord to download a ZIP; quote: “Attackers impersonated blockchain engineering community members on a public Discord frequented by members of this community. The attacker social-engineered their initial victim, convincing them to download and decompress a ZIP archive containing malicious code.”
- [T1105] Ingress Tool Transfer – The threat framework downloads and writes payloads from Google Drive; quote: “Utilizing the Python urllib library, the script fetches content from this URL and stashes it in the s_args variable.”
- [T1059.006] Python – Initial access and execution flow rely on Python scripts executed by the user; quote: “The victim manually ran the Main.py script via their PyCharm IDE Python interpreter.”
- [T1620] Reflective Code Loading – Final payload (KANDYKORN) is loaded in memory via reflective loading; quote: “Reflective loading is a powerful technique. If you’d like to learn more about how it works, check out this research by slyd0g and hackd.”
- [T1027] Obfuscated/Compressed Files and Information – SUGARLOADER is obfuscated with a binary packer to hinder static analysis; quote: “SUGARLOADER is used for initial access on the machine, and initializing the environment for the final stage. This binary is obfuscated using a binary packer, limiting what can be seen with static analysis.”
- [T1574] Hijack Execution Flow – Persistence via hijacking macOS Discord, replacing the legitimate binary with HLOADER; quote: “We observed the threat actor adopting a technique we have not previously seen them use to achieve persistence on macOS, known as execution flow hijacking. The target of this attack was the widely used application Discord.”
- [T1116] Code Signing – HLOADER uses a self-signed Mach-O signature to appear legitimate; quote: “The code signature information for HLOADER, which has a self-signed identifier structure consistent with other Lazarus Group samples.”
- [T1036] Masquerading – Legitimate Discord applications are renamed/masked to hide malicious activity; quote: “The legitimate binary /Applications/Discord.app/Contents/MacOS/Discord was renamed to .lock, and replaced by HLOADER.”
- [T1547] Boot or Logon Autostart – Discord is configured as a login item to launch at boot, enabling persistence; quote: “The Discord application is often configured by users as a login item and launched when the system boots, making it an attractive target for takeover.”
- [T1059] Command and Scripting Interpreter (Python) – The chain relies on Python scripts executed under user control; see above for Python usage.
Indicators of Compromise
- [SHA-256] SUGARLOADER payloads – 3ea2ead8f3cec030906dcbffe3efd5c5d77d5d375d4a54cca03bfe8a6cb59940
- [SHA-256] KANDYKORN payload – 927b3564c1cf884d2a05e1d7bd24362ce8563a1e9b85be776190ab7f8af192f6
- [Domain] tp-globa.xyz – FinderTools C2 domain
- [Domain] bitscrunnch.linkpc.net – TLS certificate domain linked to Lazarus activity
- [IPv4] 23.254.226.90 – C2 IP used by the .sld/.log stage
- [IPv4] 192.119.64.43 – TLS-related infrastructure host used in campaign observables
- [URL] https://drive.google.com/file/d1KW5nQ8MZccug6Mp4QtKyWLT3HIZzHNIL2 – Google Drive hosting the Cross-Platform Bridges.zip
- [URL] tp-globa.xyz//OdhLca1mLUp/lZ5rZPxWsh/7yZKYQI43S/fP7savDX6c/bfC – REF7001/FinderTools downloader URL
- [File name] Watcher.py – Stage 0 initial compromise script
- [File name] testSpeed.py – Stage 1 dropper script
- [RC4 Key] 64-byte key – D9F936CE628C3E5D9B3695694D1CDE79E470E938064D98FBF4EF980A5558D1C90C7E650C2362A21B914ABD173ABA5C0E5837C47B89F74C5B23A7294CC1CFD11B
Read more: https://www.elastic.co/security-labs/elastic-catches-dprk-passing-out-kandykorn