Rapid7 Labs uncovered a previously undocumented Linux toolkit using a trojanized HAProxy build and modified system daemons to target South Korean automotive and media organizations for long-term espionage. The campaign used the ted backdoor, CurlRAT, and an SSH keylogger to steal credentials, inject malicious web content, and maintain stealthy control, with infrastructure and tactics suggesting possible DPRK-linked actors such as APT37 and Kimsuky. #HAProxy #ted #CurlRAT #APT37 #Kimsuky #Rapid7 #SouthKorea
Keypoints
- Rapid7 identified a new Linux toolkit that targeted organizations in South Koreaâs automotive and media sectors.
- The operation relied on a trojanized HAProxy 2.8.12 build named the ted backdoor, plus modified crond, agetty, atd, sshd, and polkitd binaries.
- The malware enabled remote command execution, traffic interception, credential harvesting, and long-term surveillance while blending into normal HAProxy load balancing.
- CurlRAT provided C2, command execution, reverse shell, file transfer, and host reconnaissance, while also monitoring HAProxy status through a watchdog thread.
- An SSH keylogger captured plaintext passwords and stored them in an encrypted log file on disk.
- The toolkit used custom XOR, substitution, and Base64-based encoding to hide configuration, payloads, and communications.
- Attribution is assessed with medium confidence to DPRK-linked threat actors, with overlap noted with APT37, Kimsuky, and Lazarus-style tradecraft.
MITRE Techniques
- [T1190] Exploit Public-Facing Application â The actors likely gained the first foothold by exploiting an exposed groupware portal or mail service (âthe threat actor begins by exploiting a vulnerability in the Groupware login portalâ).
- [T1059.004] Unix Shell â Commands were executed through popen and shell-based handlers, including reverse shell and PTY shell functions (âexecutes commands via popenâ, âfull interactive PTY shellâ).
- [T1106] Native API â The toolkit used native process and HAProxy APIs for threaded execution and traffic handling (âpthread_createâ, âtask_wakeupâ, ânative filter APIâ).
- [T1574.006] Hijack Execution Flow: Dynamic Linker Hijacking â The implant was compiled as part of HAProxy and loaded as a shared-library-style filter at process start (âcompiled as part of the victimâs existing HAProxy versionâ).
- [T1543] Create or Modify System Process â Legitimate services were overwritten in place and restarted, such as crond (âdecrypted the trojanized crond binary in memory, overwrites the systemâs legitimate daemon, and restarts the serviceâ).
- [T1548] Abuse Elevation Control Mechanism â The RAT and reverse shell attempted root-level execution using setuid/setreuid (âcalls setuid(0) and setreuid(0, 0)â).
- [T1036.005] Masquerade: Match Legitimate Name or Location â Malware binaries and functions were disguised as legitimate system components (âcrond, polkitd, agetty, atdâ, âmasquerade as atd_ routinesâ).
- [T1070.002] Clear Linux or Mac System Logs â The stager removed traces from shell and system logs (âfiltering out keywords such as tmp, wget cron and crondâ).
- [T1070.006] Timestomp â The backdoored crond binary was timestamped to match /usr/bin/ssh (âsame creation timestamp of /usr/bin/sshâ).
- [T1562.006] Disable or Modify System Firewall â HAProxy connection counters and related telemetry were scrubbed to hide activity (âbeconn/feconn and the global actconnâ).
- [T1027] Obfuscated Files or Information â Configs, payloads, and C2 traffic were protected with XOR, substitution ciphers, and Base64 (âsimple xor-based encryptionâ, âBase64 encodingâ).
- [T1497.001] Virtualization/Sandbox Evasion â CurlRAT checked for virtualization artifacts before running (âchecks the presence of the file /usr/lib/libvirtlog.so.0â).
- [T1480] Execution Guardrails â The stager and RAT only proceeded under specific environmental conditions (âonly if HAProxy or cron are runningâ, âvalidates victim token before handler dispatchâ).
- [T1556.003] Pluggable Authentication Modules â The SSH keylogger intercepted plaintext credentials from authentication flows (âintercepts legitimate usersâ plaintext passwordsâ).
- [T1539] Steal Web Session Cookie â The backdoor captured session-related web data such as cookies and headers (âsteal session cookiesâ, âcapture engine intercepts HTTP sessionsâ).
- [T1082] System Information Discovery â The malware profiled hostname, distro, kernel, CPU, and UUID to select payloads (âprofiles the OS checking system hostname, OS distribution and versionâ).
- [T1057] Process Discovery â CurlRAT monitored HAProxy process status through /proc and PID files (âreads the pid at /var/run/haproxy.pid and monitors the statusâ).
- [T1185] Browser Session Hijacking â The implant rewrote or appended response bodies to deliver malicious content (âresponse body replaced or appended with decrypted payload scriptâ).
- [T1119] Automated Collection â The capture logic automatically logged selected HTTP request data and metadata (âselectively logs and victims are identifiedâ).
- [T1071.001] Application Layer Protocol: Web Protocols â C2 traffic was tunneled over HTTP/HTTPS to blend with normal web traffic (âpolls C2 over HTTPS with libcurl fallback to HTTPâ).
- [T1132.001] Data Encoding: Standard Encoding â Payloads and commands were encoded with Base64 and XOR before transmission (âBase64+XOR encoding/decoding applied to the payloadâ).
- [T1102] Web Service â Backup infrastructure used image-like web domains for C2 and configuration retrieval (âimg.darklights.storeâ, âimg.monderhouse.spaceâ).
- [T1572] Protocol Tunneling â Interactive shell traffic was relayed through HAProxy pipes and raw sockets (âtunnelled through HAProxy HTTP pipeline via named FIFOsâ).
- [T1568] Dynamic Resolution â The victim ID was derived from system attributes and used in authenticated requests (âconcatenating⌠system hostname, ipv4 address, and hardware/OS UUIDâ).
- [T1041] Exfiltration Over C2 Channel â Stolen passwords, command output, and telemetry were sent back through the same C2 channel (âsends the result backâ, âcredentials exfiltrated via CurlRAT C2â).
- [T1560] Archive Collected Data â The keylogger and RAT stored captured data in encrypted logs before exfiltration (âsaved them to an encrypted log fileâ).
Indicators of Compromise
- [File hash ] Stager/CurlRAT/Credential-related binaries â 5db1b6d52faf60b4f32d6fd0c7c938e4d05d29a14c32ded4a9668357c08b6a91, 4bb923eb040aa13ca8fd409c31ee4729c60ddff32e350efe1c5a4a9168a065f5
- [File hash ] Other named samples and variants â 8f30b57928934ae67478d0e690c91d046e35a638da098d02922a4a88a0fdb66c, 94630b96f628c96a6bff7904b40ffc9ad67c86f8a4ff6080c3b524831c93f402
- [File path ] Stager and keylogger storage paths â /var/lib/snapd/g580, /var/lib/sshd/c8c68e629bba773a10ac80012d10bf19
- [File path ] HAProxy backdoor cache/config paths â ~/cache/haproxy-1000.cache, ~/cache/haproxy-1001.cache, /tmp/jasper-log
- [File name / domain ] C2 and fallback infrastructure â img.darklights.store, img.monderhouse.space, img.smartnords.site
- [File name / domain ] Additional observed infrastructure â img.responsive.pstatic.autos, img.socialteams.store, img.worksongo.store
- [File name ] Trojanized or masqueraded binaries â crond, agetty, atd, polkitd, sshd
- [Header / token ] C2 authentication and telemetry fields â User-token, api_token/ecd427ea8330a4ff73618483e00b9b41