ted
- Type
- Backdoor
- Capabilities
- Session hijackingExfiltrationPersistencePost exploitationDefense evasion
- Delivery
- Watering holeDrive by
- Platforms
- Linux
Ted is a Linux backdoor embedded in trojanized HAProxy load-balancer binaries, observed at two South Korean organizations in the media and automotive sectors. Identified samples incorporated a malicious C plugin directly into a version-matched rebuild of HAProxy 2.8.12, using its documented filter API while preserving normal load-balancing functionality. Deployment requires prior host compromise and replacement of the legitimate executable; Ted does not exploit an HAProxy vulnerability, and its initial installation vector remains unconfirmed.
Ted accesses decrypted HTTP traffic after TLS termination, records selected request information, and can capture session cookies. It selectively replaces web responses and injects scripts according to operator-configured request attributes and client-address rules. Its concealed command channel supports shell-command execution, bidirectional file transfer, beaconing, and configuration updates. Specially crafted HTTP requests are intercepted before reaching backend servers, and command responses are written directly to the client socket outside HAProxy's normal response-logging path. Ted also adjusts internal connection, request, and traffic counters to conceal command activity and preserves its command channel across HAProxy reloads and restarts.
The associated espionage operation also deployed curlRAT and trojanized Linux services, including an SSH daemon that captured passwords; these are distinct components rather than capabilities established for every Ted sample. At least one Ted sample incorporated curlRAT routines. A specific responsible threat group has not been conclusively identified.
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.
In this case, the group behind the attacks compromised popular open source load balancer software, known as HAProxy, to install a hard-to-detect Linux toolkit (dubbed "TED") and gain complete access to incoming and outgoing traffic.
Главной находкой исследователи считают бэкдор Ted, встроенный в модифицированную сборку балансировщика HAProxy.
Главной находкой исследователи считают бэкдор Ted, встроенный в модифицированную сборку балансировщика HAProxy.
Techniques & procedures
16 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
1 technique
Initial Access
Ted проверял User-Agent, URL, Referer и IP-адрес клиента... это позволяло использовать скомпрометированный сервер для атак типа watering hole: незаметно подменять страницы для отдельных целей.
Execution
2 techniques
Execution
Через этот канал операторы малвари могли выполнять шелл-команды... CurlRAT способен выполнять команды... и запускать интерактивный PTY-shell.
It writes the command body to a named pipe under /tmp. Zeroing the request channel afterwards leaves nothing to forward, and the command terminates at the load balancer.
Persistence
2 techniques
Persistence
The plugin is compiled directly alongside the rest of the HAProxy source. It registers itself by copying HAProxy's own trace_ops structure into a structure called my_filter_ops with its methods replaced, hooking the built-in HTTP parser through the vendor's documented filter API.
So the accurate description is a version-matched rebuild substituted for the legitimate binary, not a supply-chain compromise of the victim's own compilation process.
Stealth
4 techniques
Stealth
“Command-and-control (C2) requests are erased from HAProxy's connection counters, leaving no trace in backend logs or load balancer statistics.”
It then strips the keywords tmp, wget, cron and crond from root's bash history.
It overwrites the legitimate crond binary and gives the replacement the creation timestamp of /usr/bin/ssh.
Бэкдор уменьшает счетчики активных соединений в HAProxy и перехватывает запрос прямо на уровне балансировщика. В результате команда не попадает на бэкенд, в логи и в статистику самого HAProxy.
Defense Impairment
1 technique
Defense Impairment
It then strips the keywords tmp, wget, cron and crond from root's bash history and from six system logs, among them auth.log and audit/audit.log.
Credential Access
3 techniques
Credential Access
It is possible for the implant to observe HTTP traffic while the server is performing normal load-balancing activities. It is possible to monitor high-value web requests, capture session cookies, and identify certain clients for traffic manipulation using the backdoor.
“The toolkit also includes a trojanized SSH daemon for capturing passwords.”
It is possible to monitor high-value web requests, capture session cookies, and identify certain clients for traffic manipulation using the backdoor.
Discovery
1 technique
Discovery
It is possible for the implant to observe HTTP traffic while the server is performing normal load-balancing activities. It is possible to monitor high-value web requests, capture session cookies, and identify certain clients for traffic manipulation using the backdoor.
Collection
1 technique
Collection
“The toolkit also includes a trojanized SSH daemon for capturing passwords.”
Command and Control
2 techniques
Command and Control
Специальный HTTP-запрос переводит Ted в режим C&C... Ответ возвращается через обычное соединение под видом стандартного HTTP/1.0 200 OK. CurlRAT по умолчанию опрашивает управляющий сервер каждые 12 часов.
Через этот канал операторы малвари могли ... загружать и скачивать файлы.
Impact
1 technique
Impact
It intercepted web traffic and served altered pages to selected visitors... The implant rewrites the content type and length on the way out, forces the response status to 200, and deletes the Accept-Ranges header.
Observables
1 indicator attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.