Chinese Hackers Backdoor Linux Utilities curl, sudo, sshd in Global Supply Chain Attack

Chinese state-sponsored hackers compromised Linux systems globally by backdooring core utilities like curl, sudo, and sshd during the build process in a supply chain attack dubbed REF6138. The sophisticated campaign, targeting telecom and government sectors, enables persistent access, credential theft, and network pivoting while evading detection. Organizations must rebuild from clean sources and strengthen integrity monitoring.
Chinese Hackers Backdoor Linux Utilities curl, sudo, sshd in Global Supply Chain Attack
Written by Juan Vasquez

A sophisticated cyber operation linked to Chinese state-sponsored actors has compromised Linux systems worldwide by embedding persistent backdoors into widely used utility packages. Security researchers at Elastic Security Labs uncovered the campaign, which targets enterprise environments through supply chain-style attacks on open-source software components. The findings, detailed in a report from The Hacker News, expose how attackers maintain long-term access to critical infrastructure by modifying legitimate binaries during the build process.

The intrusion campaign, tracked under the name REF6138, primarily focuses on systems running Red Hat-based distributions such as CentOS and Fedora. Attackers inject malicious code into core system utilities including curl, sudo, and sshd, transforming these everyday tools into covert command-and-control channels. Once installed, the backdoors communicate with attacker-controlled servers using encrypted protocols that blend with normal network traffic, making detection particularly challenging for standard security tools.

Elastic Security Labs identified the operation through analysis of multiple compromised servers in telecommunications and government sectors across Asia and Europe. The attackers demonstrated advanced tradecraft by rebuilding the targeted packages from source code with injected malware, then distributing the tainted versions through compromised repositories or direct server compromises. This approach allows the backdoors to survive system updates and package manager refreshes, creating persistent footholds that can remain active for months or even years.

Technical examination revealed that the malware employs several evasion techniques. The backdoor in the modified sudo binary, for instance, checks for specific environment variables before activating its malicious functions. Only when these variables match predetermined values does the code execute its payload, otherwise functioning as the legitimate utility. This conditional execution helps the malware avoid triggering security alerts during routine system administration tasks.

The sshd component contains even more complex functionality. Beyond providing remote access, it can intercept authentication credentials and exfiltrate them to command servers. The backdoor also supports file transfer capabilities and can establish SOCKS proxies for pivoting within compromised networks. Researchers noted that the malware uses domain generation algorithms combined with legitimate-looking SSL certificates to maintain reliable connections while avoiding blacklists.

Further investigation traced the attack chain back to initial access vectors involving vulnerable web applications and exposed management interfaces. In several cases, attackers exploited known vulnerabilities in Apache Tomcat and Jenkins servers to gain initial code execution. From there, they moved laterally to build servers and package repositories, where they could modify source code before compilation. This methodical progression from perimeter breach to supply chain compromise highlights the professional nature of the operation.

The actors behind these attacks show clear connections to Chinese intelligence operations. Code similarities, infrastructure overlap, and targeting patterns align with previously documented groups such as APT41 and UNC961. These connections appear through shared command-and-control domains, similar code obfuscation methods, and consistent victim profiles that match Chinese strategic interests in telecommunications, research institutions, and government agencies.

Analysis of the build process revealed that attackers had modified the configure scripts and Makefiles used during compilation. They inserted additional compilation flags that enabled the inclusion of malicious object files. These modifications remained subtle enough to escape casual code reviews but introduced the backdoor functionality seamlessly into the final binaries. The attackers even adjusted checksums and signatures where possible to maintain the appearance of authenticity.

Security teams responding to these incidents face significant challenges in eradication. Because the backdoors exist at the binary level within core system utilities, simply removing malicious files proves insufficient. Administrators must rebuild affected systems from verified clean installation media and implement strict integrity monitoring for all packages. The Elastic Security Labs report recommends implementing immutable infrastructure practices and using signed packages from trusted mirrors exclusively.

The campaign’s scope extends beyond individual compromised systems. By targeting build infrastructure, the attackers potentially affected hundreds of downstream systems that installed the modified packages. This ripple effect demonstrates how supply chain attacks can amplify the impact of a single breach across entire organizations and their partners. Several affected entities discovered the compromise only after unusual network traffic patterns triggered alerts from advanced detection systems.

Forensic artifacts left behind by the attackers provide valuable insights into their operational security measures. They consistently used living-off-the-land techniques, relying on native Linux tools for reconnaissance and lateral movement. PowerShell was notably absent, with attackers preferring bash scripts and compiled binaries that blended with existing system processes. Memory-resident components further reduced their disk footprint, complicating traditional forensic analysis.

The backdoors incorporate anti-analysis features that activate when researchers attempt to debug or disassemble the binaries. These protective mechanisms include timing checks, debugger detection, and environment fingerprinting. When triggered, the malware can either terminate itself or switch to benign behavior, frustrating reverse engineering efforts. Despite these obstacles, security researchers successfully mapped the complete functionality through careful sandbox analysis and controlled execution.

Organizations operating Linux environments should prioritize several defensive measures. Regular integrity checks on critical system binaries using tools like rpm or dpkg with verification flags can help identify modifications. Network segmentation limits the potential damage from compromised systems, while behavioral monitoring solutions can detect anomalous activity from supposedly trusted utilities. Implementing strict code signing policies for internal build processes adds another layer of protection against tampering.

The discovery of these Linux backdoors aligns with a broader pattern of increased attention toward non-Windows platforms by advanced persistent threat groups. As enterprises continue migrating workloads to cloud infrastructure and containerized environments, attackers have adapted their tactics to target these systems. Linux’s growing prominence in server environments makes it an attractive target for espionage and data collection operations.

Command-and-control communication from the backdoors uses multiple fallback mechanisms. If primary domains become unavailable, the malware cycles through generated alternatives using time-based seeds. The encrypted channels employ custom protocols that mimic HTTPS traffic, complete with valid certificates from compromised legitimate domains. This attention to operational security suggests the campaign targets high-value assets where detection could lead to significant diplomatic or intelligence consequences.

Incident response teams that have investigated these compromises report that complete remediation often requires full infrastructure rebuilds. Partial cleaning efforts frequently fail because attackers maintain multiple persistence mechanisms across different utilities. In one documented case, even after removing the modified sudo binary, the compromised sshd component allowed re-infection within hours. This resilience underscores the sophisticated planning behind the operation.

The targeting of telecommunications providers raises particular concerns about potential intelligence collection on communications metadata. By maintaining access to core routing and authentication systems, the attackers could theoretically monitor traffic patterns or collect authentication data at scale. While direct evidence of such activity remains classified, the strategic value of these victims matches known Chinese intelligence priorities.

Security vendors have begun releasing updated detection signatures targeting the specific indicators associated with this campaign. However, the polymorphic nature of the backdoors means that variants could easily evade current rules. Organizations need to combine signature-based detection with behavioral analysis and regular system integrity monitoring to maintain effective defenses.

The campaign also highlights vulnerabilities in the open-source software supply chain. While Linux distributions generally maintain strong security practices, the complexity of modern build systems creates opportunities for subtle compromises. Package maintainers and distribution vendors have increased their focus on reproducible builds and cryptographic attestations to address these risks, though widespread adoption remains ongoing.

As organizations continue adopting Linux for mission-critical applications, the incidents serve as a reminder that no platform remains immune to advanced threats. The actors behind REF6138 have demonstrated that patient, methodical attacks against build processes can yield persistent access to sensitive environments. Security professionals must adapt their defensive strategies to account for these sophisticated supply chain threats that target the very foundations of system trust.

The full technical details and indicators of compromise from this investigation provide security teams with necessary information to scan their environments for signs of compromise. Regular audits of system binaries against known good checksums from distribution vendors should become standard practice. By understanding the methods used in this campaign, organizations can better prepare for similar attacks that will likely evolve as defensive measures improve.

This operation represents a significant development in state-sponsored cyber activity against Linux infrastructure. The combination of supply chain compromise, sophisticated backdoor design, and careful operational security demonstrates the increasing sophistication of these threat actors. As Linux continues gaining market share in enterprise environments, such targeted campaigns will likely become more frequent and elaborate. Security teams across industries must remain vigilant and proactive in defending these critical systems against determined adversaries with substantial resources and technical expertise.

Subscribe for Updates

CybersecurityUpdate Newsletter

The CybersecurityUpdate Email Newsletter is your essential source for the latest in cybersecurity news, threat intelligence, and risk management strategies. Perfect for IT security professionals and business leaders focused on protecting their organizations.

By signing up for our newsletter you agree to receive content related to ientry.com / webpronews.com and our affiliate partners. For additional information refer to our terms of service.

Notice an error?

Help us improve our content by reporting any issues you find.

Get the WebProNews newsletter delivered to your inbox

Get the free daily newsletter read by decision makers

Subscribe
Advertise with Us

Ready to get started?

Get our media kit

Advertise with Us