Collage: a network engineer checks a rack appliance beside a cracked lime gateway arch with a hidden trapdoor in its side.
On this page (9)

Edge infrastructure is often treated as stable plumbing: load balancers, reverse proxies, SSL termination points, and traffic routing components that keep applications available. Recent activity involving a Linux malware toolkit hidden inside HAProxy shows why that assumption is dangerous.

Attackers linked with North Korean state activity embedded a backdoor directly into HAProxy source code used at the network edge of South Korean organizations in the automotive and media sectors. The technique allowed them to intercept traffic, receive commands, manipulate web content, harvest credentials, and maintain surveillance while the load balancer continued to function normally.

For CISOs, CIOs, security architects, and resilience leaders, the lesson is broader than one product or one campaign: edge components that process user traffic must be governed, monitored, and validated with the same rigor as application servers, identity systems, and cloud control planes.

Why this campaign matters

The campaign involved a previously undocumented Linux toolkit targeting organizations with minimal detection. Its most notable component was a backdoor compiled directly into HAProxy version 2.8.12.

This was not a typical web shell, side-loaded binary, or suspicious daemon running alongside legitimate services. The implant was integrated into HAProxy itself as a custom plugin, using native capabilities such as:

  • HAProxy’s filter API.

  • Internal memory pools.

  • Event scheduling mechanisms.

  • Process management infrastructure.

  • HTTP traffic interception logic.

Because genuine load balancing continued to operate as expected, the compromised component could blend into normal production traffic. That creates a serious detection challenge for organizations that rely mainly on service availability, standard logs, and application-side monitoring to determine whether infrastructure is trustworthy.

Executive takeaway: Availability does not equal integrity. A compromised load balancer can continue delivering applications while silently enabling espionage, credential theft, traffic manipulation, or targeted attacks against users.

How the HAProxy backdoor worked

The backdoor, identified through debug strings left by the attackers, was designed to activate through a specific HTTP request. Attackers sent a request for a fake image path:

/favorite_list_2x_m500_ico.jpg

That request switched the HAProxy filter into command-and-control mode. The malware then stored the command in a named pipe, removed traces of the request from HAProxy’s internal counters, and cleared forwarding buffers so the request never reached backend servers.

This matters because the command stopped at the load balancer. Backend applications never saw it, and application logs would not record it. The backdoor was also designed to remove evidence from HAProxy statistics and connection handling.

In practical terms, defenders reviewing only application logs or standard HAProxy logs could see nothing suspicious. The implant’s design goal was to ensure that the most obvious sources of evidence never contained the malicious activity in the first place.

Beyond remote commands: traffic manipulation and user targeting

The backdoor’s capabilities extended beyond remote command execution. It could inject malicious scripts or replace page content for selected victims based on criteria such as:

  • Source IP address.

  • Browser fingerprint.

  • Hidden authentication material placed inside the Accept-Language header.

This effectively turned the victim organization’s own load balancer into a controlled traffic manipulation point. For a bank, insurer, retailer, healthcare provider, technology company, or public-sector service provider, that type of compromise could enable fraud, session theft, customer redirection, drive-by downloads, or targeted surveillance of specific users.

The malware also handled response bodies carefully enough to conceal content changes. It stripped headers that could reveal byte-range mismatches caused by injected content, showing a detailed understanding of HTTP behavior and HAProxy internals.

Security implication: A reverse proxy or load balancer is not just an availability component. It is a high-trust security boundary capable of observing, modifying, and redirecting sensitive user traffic.

Supporting Linux toolkit and persistence

The HAProxy implant was part of a broader Linux toolkit that included modified versions of common system daemons, including:

  • crond

  • agetty

  • atd

  • sshd

  • polkitd

These trojanized components continued to perform their normal functions while also carrying malicious capabilities. This approach supports long-term persistence because administrators may not notice anything unusual in service behavior.

One component acted as an SSH keylogger, capturing plaintext passwords entered by administrators. Another tool, referred to as curlRAT, contacted remote infrastructure every 12 hours by default. When instructed by the attacker, it could switch to a faster polling mode and check in every 30 seconds.

curlRAT also included anti-analysis behavior. It checked whether it was running inside a virtual machine and refused to execute if expected conditions were not present. This is consistent with malware designed to avoid sandboxes, automated detonation systems, and researcher-controlled environments.

Attribution and threat context

The activity has been assessed with medium confidence as linked to North Korean state-aligned threat actors. Indicators supporting that assessment include:

  • Targeting of South Korean automotive and media organizations.

  • Use of simple XOR-based encryption.

  • Use of a custom substitution cipher.

  • Command infrastructure previously associated with APT37 by threat intelligence sources.

  • Some technical comparisons with other North Korean-linked activity against media targets.

There are also signs of possible code reuse or conceptual overlap with other proxy-focused backdoors. The presence of routines using ngx_* naming suggests possible reuse from an nginx backdoor pattern, where custom filters were used to hook HTTP traffic and XOR encryption protected configuration data. However, naming similarities alone are not enough for strong attribution, and significant code-level overlap has not been established.

For defenders, attribution is useful for intelligence prioritization, but it should not distract from the architectural lesson: state-aligned actors are investing in deeply integrated implants for edge software that many organizations under-monitor.

Business and operational risk

A compromised edge component can create risks across multiple business dimensions:

  • Customer trust: Attackers can alter content, redirect users, or inject malicious scripts into legitimate web sessions.

  • Credential exposure: Administrative passwords, session cookies, and authentication data may be captured.

  • Regulatory exposure: Manipulation or theft of personal, financial, healthcare, or citizen data can trigger reporting obligations and enforcement scrutiny.

  • Operational resilience: Load balancers and reverse proxies are often critical to digital service availability; compromise can affect incident response and recovery.

  • Fraud and account takeover: In financial services, retail, SaaS, and customer-facing platforms, traffic manipulation can support session theft and fraudulent activity.

  • Supply chain and third-party risk: Managed infrastructure, outsourced hosting, and vendor-maintained appliances may become blind spots if integrity validation is weak.

  • Incident response complexity: If logs are suppressed at the compromised layer, forensic teams may need independent telemetry to reconstruct events.

This is especially relevant for organizations operating high-volume digital channels, critical infrastructure portals, healthcare platforms, payment systems, cloud services, public-sector services, or remote access environments.

What security leaders should prioritize

Defending against this class of compromise requires treating edge infrastructure as part of the critical application and security stack, not as passive network plumbing.

1. Strengthen binary and configuration integrity

Organizations should maintain known-good baselines for HAProxy, nginx, Apache, reverse proxies, API gateways, and load balancers. Priority actions include:

  • Verifying binaries against trusted vendor packages or internally approved builds.

  • Monitoring unexpected changes to source, modules, plugins, and runtime files.

  • Using file integrity monitoring on critical edge systems.

  • Restricting who can compile, deploy, or modify edge software.

  • Validating configuration drift through change management and infrastructure-as-code controls.

2. Use independent network correlation

Because this backdoor removed traces from HAProxy and prevented malicious requests from reaching backend applications, relying on local component logs is insufficient.

Security teams should correlate:

  • Network sensor data.

  • TLS termination logs where available.

  • Endpoint telemetry.

  • Reverse proxy access patterns.

  • DNS activity.

  • EDR or workload runtime behavior.

  • Backend application logs.

  • NetFlow or equivalent traffic metadata.

Key point: If a compromised proxy can hide its own activity, visibility must come from outside the proxy as well as from within it.

3. Monitor memory and runtime behavior

Deeply integrated implants may not appear as separate suspicious processes. Runtime analysis should therefore include:

  • Unexpected modules or hooks.

  • Unusual named pipe activity.

  • Anomalous child processes.

  • Suspicious memory regions.

  • Unexpected outbound connections from edge systems.

  • Deviations from normal HAProxy process behavior.

This is particularly important in environments where load balancers terminate SSL/TLS and have access to decrypted user traffic.

4. Protect administrative access

The presence of an SSH keylogger highlights the need to harden administrator workflows. Recommended priorities include:

  • Enforcing phishing-resistant multi-factor authentication for administrative access.

  • Reducing direct SSH exposure.

  • Using privileged access management.

  • Rotating credentials after suspected compromise.

  • Monitoring administrator login patterns and command activity.

  • Avoiding password-based SSH where possible in favor of controlled key-based access with strong governance.

5. Include edge systems in incident response playbooks

Incident response plans should explicitly cover reverse proxies, load balancers, API gateways, and SSL termination systems. Playbooks should define how to:

  • Preserve volatile evidence.

  • Validate binary integrity.

  • Compare builds against trusted repositories.

  • Shift traffic to clean infrastructure.

  • Rotate secrets and certificates.

  • Review historical network traffic.

  • Investigate content injection or user redirection.

  • Communicate potential customer or partner impact.

A governance issue, not just a malware issue

This campaign demonstrates a broader governance gap. Edge infrastructure often falls between network, platform, application, and security teams. That fragmented ownership can weaken patching, logging, hardening, and monitoring.

Security leaders should clarify accountability for:

  • Secure build pipelines for edge software.

  • Approval of plugins and custom modules.

  • Runtime monitoring requirements.

  • Certificate and secret handling.

  • Administrative access controls.

  • Change management and audit evidence.

  • Recovery procedures for compromised traffic-routing components.

For regulated and operationally critical sectors, this also supports auditability and resilience expectations. Boards and risk committees do not need every implementation detail, but they should understand that traffic management systems can become high-impact compromise points.

Closing perspective

The HAProxy backdoor campaign is a reminder that attackers increasingly target the trusted layers that sit between users and applications. Load balancers, reverse proxies, and API gateways are attractive because they process sensitive traffic, sit in privileged network positions, and are often trusted by default.

The practical response is not panic or product-specific overreaction. It is disciplined risk management: validate binaries, monitor runtime behavior, correlate independent telemetry, harden administrative access, and include edge systems in resilience planning.

For cybersecurity decision-makers, the central message is clear: any component that can see, route, terminate, or modify business-critical traffic must be treated as a critical security asset.

Sources

  1. Rapid7 — DPRK APTs: Ted backdoor and curlRAT target South Korean media and automotive sectors

How we address this risk

Trusted Architecture

The design

Builds security into the design (Zero Trust, IAM/PAM, PKI), starting from the risks and the target governance.

Explore Trusted Architecture

Proof: Public transport operator

  • Critical infrastructure

    Why unmanaged network connections put critical services and customer trust at risk

    Every unmanaged network connection is a hidden doorway into your business, quietly exposing critical services and customer data to risks most organizations never see coming until it’s too late. Discover how overlooked links, forgotten devices, and unchecked access points can erode operations and undermine the trust your customers place in you, and learn where to start closing those gaps.

  • Critical infrastructure

    Cyberattacks on European infrastructure: rising threats and Russia’s strategic maneuvering

    European infrastructure faces an increasing barrage of cyberattacks, spotlighting vulnerabilities within critical systems. As tensions rise, there’s speculation about Russia’s strategic positioning in these digital offensives. Discover the evolving landscape of cybersecurity challenges and the geopolitical implications of these threats.

Does this risk concern you?

Tell us about your context: an expert will get back to you.

Contact us

or write directly to trust@blooo.io

  • Reply within 24 hours
  • Non-disclosure agreement on request, before any exchange
  • First call of 30 minutes

Your e-mail is sent from your own mail client: blooo.io stores nothing. We only use your details to reply to you. Privacy policy.