New Ted Backdoor Hides Inside Victims' Own HAProxy Builds to Intercept Web Traffic
A previously undocumented Linux toolkit has been compiled directly into trojanized HAProxy load balancers used by two South Korean organizations in the automotive and media sectors, enabling covert interception and manipulation of web traffic. The implant, named "ted" based on debug strings, operates by intercepting requests to a specific image path, writing command bodies to a named pipe under /tmp, and returning output over raw sockets disguised as standard HTTP/1.0 200 OK responses. The attac
Analysis
TL;DR
- A previously undocumented Linux toolkit has been compiled directly into trojanized HAProxy load balancers used by two South Korean organizations in the automotive and media sectors, enabling covert interception and manipulation of web traffic.
- The implant, named "ted" based on debug strings, operates by intercepting requests to a specific image path, writing command bodies to a named pipe under /tmp, and returning output over raw sockets disguised as standard HTTP/1.0 200 OK responses.
- The attack is not a HAProxy vulnerability but requires prior code execution on the host and the ability to replace the running binary; C2 requests are erased from HAProxy's connection counters, leaving no trace in backend logs or load balancer statistics.
- The same toolkit includes a trojanized sshd that captures and encrypts plaintext passwords, trojanized agetty/atd/polkitd binaries, and a companion RAT called curlRAT that beacons every 12 hours (dropping to 30 seconds when flagged) but only runs on non-virtualized hosts.
- Rapid7 attributes the campaign with medium confidence to North Korean state-sponsored actors, drawing on evidence linking APT37 domains, Lazarus-group delivery models, and Kimsuky-style initial access through an exposed Groupware portal.
Why It Matters
This attack demonstrates a sophisticated supply-chain-adjacent compromise where the implant is baked directly into a victim's own HAProxy binary rather than exploiting a vulnerability in the software itself, making detection through standard patching or vulnerability scanning ineffective. For AI practitioners and security researchers, it highlights the growing importance of binary integrity verification and the need for runtime behavior monitoring, especially for critical infrastructure components like load balancers that sit at the network perimeter.
Technical Details
- The implant uses a four-check gating mechanism before delivering modified pages: the request must carry a valid User-Agent, match URL and referer patterns, satisfy client address whitelist rules (checked both exactly and at the /24 subnet level), or contain an operator-supplied key in the Accept-Language header that overrides address filtering entirely.
- C2 communication is stealthily embedded in normal web traffic: command requests target a specific image path, the implant decrements HAProxy's live connection counters to erase evidence, writes commands to a named pipe at /tmp, and returns output on the raw socket with rewritten content-type, content-length, and status fields while stripping the Accept-Ranges header to prevent clients from detecting size discrepancies.
- The stager deploys only on hosts where HAProxy or cron is already running, verifies root access, overwrites the legitimate crond binary with a replacement bearing the creation timestamp of /usr/bin/ssh, and actively sanitizes root's bash history and six system logs (including auth.log and audit/audit.log) by stripping keywords like tmp, wget, cron, and crond.
- curlRAT, the companion remote access trojan, includes anti-VM detection by aborting execution unless a marker file indicating virtualization is absent, and features adaptive beaconing that defaults to 12-hour intervals but can be compressed to 30 seconds via operator flag.
- Indicators of compromise include six C2 domains (img.monderhouse.space, img.smartnords.site, img.darklights.store, img.responsive.pstatic.autos, img.socialteams.store, img.worksongo.store), specific file paths (/var/lib/sshd/c8c68e629bba773a10ac80012d10bf19, /tmp/jasper-log, ~/cache/haproxy-1000.cache), and two SHA-256 hashes for the trojanized binaries.
Industry Insight
Organizations running HAProxy or similar critical infrastructure components should implement binary integrity monitoring and checksum verification against known-good builds, as this attack model bypasses traditional vulnerability-based detection by replacing the binary itself rather than exploiting a flaw in it. Security teams should also audit for anomalous named pipes under /tmp, unexpected modifications to system binaries like crond and sshd, and connections to image-serving endpoints that exhibit unusual response patterns, as these are strong indicators of this specific implant family. The attribution blending across APT37, Lazarus, and Kimsuky underscores the need for threat intelligence platforms to track cross-cluster tooling overlap, as North Korean operations increasingly share infrastructure and techniques across otherwise distinct groups, complicating both detection and response prioritization.
Disclaimer: The above content is generated by AI and is for reference only.