Search This Blog

Powered by Blogger.

Blog Archive

Labels

Footer About

Footer About

Labels

Showing posts with label Linux Backdoor. Show all posts

Over 300 Tor Exit Relays Hijacked to Intercept SSH Connections

 



Attackers hijacked 333 Tor exit relays in early October 2026, redirecting Secure Shell (SSH) connections through 12 interception servers to steal passwords and potentially deploy malware. Researcher kaba discovered the operation on October 2, while separate analysis identified 377 relays operated by 59 operators that had adopted the attackers' exit policy. The malicious configuration represented 7.46% of Tor's exit capacity at its October 4 peak.


Attackers Modified Relay Configurations

Tor exit relays forward traffic to destinations outside the network. Attackers modified the relays' "torrc" configuration files to permit connections over port 22, enabling SSH on 342 relays that previously blocked it and converting another 24 non-exit relays into exits.

The changes also blocked encrypted email ports while permitting plaintext-capable IMAP and POP3 connections on most affected relays. This potentially exposed unencrypted email retrieval, although investigators have not established whether attackers successfully captured messages.

Kaba discovered the campaign after an SSH connection through Tor triggered a warning that the remote host's identity had changed. Using exitmap, the researcher tested approximately 3,000 exit relays by routing SSH connections between controlled servers. The investigation identified 333 relays redirecting connections to the same 12 interception servers. Around a dozen presented fraudulent host keys directly, while the others redirected traffic without altering the key themselves.

The interception servers presented their own SSH host keys before connecting to the legitimate destinations. Users who accepted unfamiliar keys and entered passwords exposed their credentials. Attackers could then observe commands, check administrative privileges and attempt to install a Base64-encoded Perl payload.

Public-key authentication could not be transparently relayed in the same way because SSH authentication signatures are tied to individual sessions. However, users who accepted a malicious key could still be deceived into interacting with an attacker-controlled shell.


Ebury Backdoor Reveals an Earlier Intrusion

The Tor Project's Network Health team warned relay operators on October 5 that attackers appeared to be compromising Linux hosts and changing their configurations.

In an October 7 post-mortem, operator Zimmer confirmed Ebury version 1.8.3 on two Quetzalcoatl relay-family servers. The attacker had accessed a management server on August 28 using the operator's password, obtained root privileges within five minutes and installed Ebury. Approximately an hour later, the attacker compromised a second server, Switzerland2.

Zimmer attributed the initial intrusion to password reuse across SSH, "sudo" and backup encryption, with the password also stored in plaintext. SSH password authentication remained enabled on the internet-facing management server.

Ebury is a Linux backdoor and credential stealer associated with OpenSSH compromises since 2009. ESET estimated in 2024 that it had infected approximately 400,000 servers, with more than 100,000 still infected in late 2023.

The implant masqueraded as "/usr/lib/x86_64-linux-gnu/libkeyutils.so.1.10.2", with "libkeyutils.so.1" pointing to the malicious file. Because the packaged library remained untouched, conventional integrity checks such as "dpkg -V" and "debsums" could miss it. ESET researcher Marc-Etienne Léveillé subsequently confirmed that version 1.8.3 had existed since at least June 2026 and published an updated detection script.


Investigation Leaves Unresolved Questions

On October 4, Tor directory authorities began applying BadExit and MiddleOnly flags to affected relays. BadExit prevents clients from selecting a relay to exit the network. By 17:00 UTC on October 5, no relay carrying the malicious policy remained in the consensus used by Tor clients.

A scripted restart subsequently affected 55 Quetzalcoatl hosts, but authorities rejected affected relays attempting to rejoin. Tor Metrics recorded approximately 370 fewer exit-flagged relays between October 3 and 5.

Investigators have not established how attackers accessed the other 58 operators' systems. Directory analysis found that 71 of 101 affected relays hosted by FranTech Solutions, associated with BuyVM, adopted the malicious policy, compared with 13 of 9,054 hosted elsewhere. This concentration raises questions about hosting-level access but does not prove the provider was compromised.

The campaign's attribution, the number of infected hosts and the number of exposed users remain unknown.


Indicators and Remediation

Operators should inspect "torrc" and included files for unauthorized changes to "ExitRelay", "ExitPolicy", "ContactInfo", "MyFamily" and "Nickname". Other indicators include unfamiliar listening processes, outbound connections, NAT rules redirecting port 22, unauthorized SSH keys, unexpected scheduled tasks and suspicious system services.

Additional Ebury indicators include the abstract UNIX socket "@event-0YsOG9WSOE", a disguised "/sbin/rsyslogd" process and the IP address "185.225.226[.]62", associated with the initial intrusion into Zimmer's management server.

Anyone who accepted an unfamiliar SSH host key and entered a password through Tor between October 1 and October 5 should treat that credential as compromised, change it and investigate the destination server.

Suspected infected hosts should be taken offline, forensic evidence preserved and systems reinstalled rather than merely cleaned. Operators should replace exposed credentials, generate new relay identities and report findings to the Tor Project's bad-relays mailing list.

The incident demonstrates that Tor's traffic-routing protections cannot guarantee the authenticity of a destination connection when a malicious exit intercepts it. Verifying SSH host keys, disabling password authentication where practical and maintaining unique credentials are essential defenses.

Trojanized npm Packages Distribute RedC2 4.0 Linux Backdoor Across Systems


In an investigation uncovered by cybersecurity researchers, 14 trojanized NPM packages have been masquerading as legitimate calendar modules and utility modules while secretly delivering a Linux backdoor powered by artificial intelligence (AI) known as RedC2 4.0. 


Upon importation of the malicious packages, TrendAI, Trend Micro's enterprise cybersecurity company, explains that they execute the payload bundled with the module without any installation hooks required. In the code, the embedded binary is located, permissions are changed to make it executable, and it is then launched as a detached background process. 

As a result, even a transitive dependency can trigger the backdoor when a compromised package is loaded. It is concealed under filenames such as math-core.bin and calc-math.dat that the malicious payload is concealed in order to prevent raising suspicion. Through the embedded Linux beacon, attackers are able to communicate with remote infrastructure and gain access to affected systems to conduct further malicious activities. 

RedC2 4.0 has been actively developed with capabilities extending beyond basic remote access. Along with interactive shell access and system reconnaissance, its Linux component facilitates data collection, including the theft of sensitive information such as SSH keys, through its Linux component. The comprehensive framework also encompasses file transfer, network visualization, host-to-host tunneling, and in-memory payload execution, highlighting the growing threat posed by malicious software packages. 

Malicious Packages Retain Legitimate Functionality

In spite of the fact that the compromised packages do not appear to be obviously malicious, they continue to provide the calendar and date-related functions described in their package descriptions. The malicious code, however, is concealed within the package structure, in which files such as math-core.bin, math-calc.bin, calc-math.dat, calc-cache.bin, calc.bin and calc-mapping.bin are listed as native components. 

There are two types of files stored within the dist/ directory: either directly under the dist/ directory or in dist/internal/ directory. Even though the names of these packages differ, they contain the RedShell Linux beacon that is associated with RedC2 4.0. The package entry file, dist/index.mjs, serves as a loader. It re-exports the valid date utilities while simultaneously initiating the embedded implant. By doing so, the malicious component does not require an installation hook or specific function call to execute. 

RedShell Gives Attackers Remote Access

RedShell beacons establish communication with remote command-and-control servers once they become active and register compromised systems. Prior to entering a command-processing LO, they collect basic information about the host. 

Through /bin/sh, the Linux beacon provides an interactive shell and allows for a wide range of system operations, including system discovery, file management, collection of data, and execution of commands. This implant also has the capability of searching for sensitive information, including SSH keys and browser credentials. In addition to persistence and in-memory ELF execution, it also supports SOCKS5 proxying. 

The network pivoting capabilities further enable an attacker to use compromised systems as an entry point into other environments. This version of RedC2 4.0 also provides similar features across macOS and Windows. The framework provides file operations, host and network reconnaissance, enumeration of users, and data collection. 

The Windows component also offers capabilities such as bypassing UAC, tampering with security tools, and lateral movement. 

RedC2 Framework Adds AI Assisted Operations

For Windows, Linux, and Mac OS, RedC2 4.0 is presented as a cross-platform command-and-control framework. As of August 2025, the framework has been actively developing, with version 3.0 appearing in January 2026 and version 4.0 released in June. In addition to the RedShell Linux beacon, the latest version offers a comprehensive set of post-exploitation functionality. 

There are several features in this framework, including access to terminals, file transfers, staged payload delivery, multi-beacon management, network visualisation, host-to-host tunnelling, and execution of BOFs, .NET assemblies and shellcode in memory. 

As an important addition, Red Agent is an artificial intelligence-assisted component with a large language model. It allows operators to describe tasks in natural language and have these instructions translated into beacon commands by the framework. By incorporating this feature, operations such as network reconnaissance and credential collection can be simplified. Moreover, it decreases the technical knowledge required to operate more complex framework functions. 

Supply Chain Risks Extend Beyond npm

A wider pattern of attacks is being observed against software ecosystems as a result of the incident. In recent years, development teams have increasingly relied on third-party packages, which often include binaries and transitive dependencies that are not visible to developers. 

A package can appear useful and maintain normal behavior while carrying a separate native payload even though it has legitimate functionality present, making it particularly difficult to detect such attacks during routine code reviews. As part of the RedC2 campaign, three legitimate Rust crates were also subjected to a recent supply chain attack. These packages have been modified in order to include a malicious dependency capable of executing malware during cargo builds. 

In addition to targeting multiple development ecosystems rather than focusing exclusively on NPM, the incidents reinforced the need for tighter dependency controls for development and infrastructure teams. When possible, it is recommended that package versions be pinned and dependencies and embedded binaries be reviewed before entering production environments. 

It is possible to detect suspicious activity by monitoring unexpected process creation and outbound network connections from build systems. As the number of malicious packages carrying backdoors continues to increase, software supply chains continue to be an important entry point for malicious entities. By including AI-assisted functionality to frameworks such as RedC2, operational capabilities are further improved following an initial compromise.