Attackers Hijacked Over 300 Tor Exit Relays to Intercept SSH Connections

Between October 1 and October 5, attackers took control of more than 300 Tor exit relays and used them to intercept SSH connections and capture login passwords. No CVE was assigned; this was a host-compromise campaign against relay machines. If you used SSH over Tor with a password in that window, change the password.

Reader ratingRate this article

Loading reader rating…

Privacy-conscious voting uses a signed random browser identifier and a short-lived network hash; the rating tables contain no raw IP-address column.

Reader ratings require JavaScript; the article remains fully readable without it.

Between October 1 and October 5, 2026, someone took control of more than 300 Tor exit relays and used them to intercept SSH connections and capture login passwords. This was not a software bug and no CVE was ever assigned. It was a host-compromise campaign against the machines that volunteers run to keep the Tor network alive.

The Tor Project’s network health team first received reports over the weekend of October 3 that some operators’ relays were intercepting SSH connections.1 By October 4 the project was contacting affected operators and marking relays bad. By the afternoon of October 5, no relay running the attacker’s exit policy remained in the Tor consensus.2

What you need to decide today

If you logged into an SSH server over Tor between October 1 and October 5 using a password, and you accepted the host key without stopping to question it, change that password now.

Everything else in this incident has already been cleaned up. The relays are gone, the network is back to normal, and nobody knows how many people were caught. That single password is the only part of this you can still act on.

  • Changed or unfamiliar host key between Oct 1 and Oct 5? Treat the password you typed as stolen. Change it, and audit the account for anything the attacker could do with it.
  • Do you use SSH at all? Turn off password authentication and use key-based login. This attack could not have captured a key-based login.
  • Run a Tor relay? Audit per the Tor Project’s checklist below. Assume any credentials that lived on those hosts are burned.
  • Nothing matched? You were not affected. This is still worth two minutes of thought about how SSH authentication is set up on your own systems.

What the attackers actually did

A Tor exit relay is the last hop in a circuit. When traffic leaves the network toward its destination, it passes through an exit relay, and that relay is the last point where the connection is unencrypted on the Tor side. That design is honest: whoever runs an exit relay can see the destination and the traffic pattern.

The attackers did not break Tor’s cryptography. They changed what the relays were allowed to do. A Tor client will only select an exit relay that permits the destination port, so the attackers edited each compromised relay’s configuration to advertise a new exit policy.2

  • 342 relays had the SSH port (22) opened even though the operator had deliberately blocked it.
  • 24 relays that were not exits at all were converted into exits.
  • The same edit closed the encrypted mail ports, IMAPS and POP3S, and on most affected relays opened the plaintext-capable ones.

The Tor Project described the pattern plainly: an attacker was gaining access to Linux hosts and, where a machine was not already an exit, editing its configuration file to turn it into one.1

Why does closing encrypted mail matter? Because of how Tor picks exits. If the encrypted mail ports were closed, clients would simply route that mail through a different, legitimate exit. The effect of the change was to steer specific kinds of traffic toward the relays the attacker controlled. What remains unknown is why the encrypted mail ports were closed at all.

How the password capture actually worked

This is the part worth understanding, because it explains why key-based login was safe and password login was not.

The researcher who found this, who publishes as kaba, hit it by accident on the morning of October 2 when an SSH connection over Tor returned a changed-key warning. He then wrote a scan using exitmap, a tool the Tor Project’s own health team uses, opening an SSH connection from one of his servers to another through each exit in turn.2

With SSH traffic now permitted, connections through the affected relays went to 12 interception servers instead of their real destination. Those servers presented their own host key. A user who already trusted the real server’s key saw OpenSSH’s warning that the remote host identification had changed. A user connecting for the first time saw the ordinary prompt to accept a new key.

About a dozen exits served a visibly fake key. The other 300 or more redirected through the same servers without touching the key, so a first-time connection would have looked entirely normal.

Once a user accepted that key and typed a password, the password was captured. The interceptor then connected onward to the real server, so the session worked. The attacker could watch every command, and could separately reuse the stolen password to log in again and look for privilege escalation.

Key-based login could not be relayed this way, and the reason is the detail that makes this attack worth reading. Under the SSH authentication protocol the client’s signature includes an identifier unique to each session. A signature made for the interceptor’s session is useless against the real server. An interceptor can still accept a key login and show a fake shell, but it cannot reach the real server with that key. A password is different: it travels inside the encrypted session and can be read by whoever is at the other end.2

How much of Tor was this, really?

The headline number needs care. Three different figures describe three different measurements, and they are not interchangeable.

Figure What it measures Source
333 relays Exits found redirecting SSH to the same 12 interception servers when scanned on October 2 Researcher scan
377 relays / 59 operators Relays whose published exit policy matched the attacker’s between Oct 1 and Oct 4. The analysis itself calls this “a policy match, not proof of compromise.” Tor directory data analysis
7.46% of exit capacity The peak share of Tor’s exit capacity, by consensus weight, carrying the attacker’s exit policy on October 4 Directory data analysis

Tor has roughly 3,000 exit relays in total, so this was on the order of a tenth of the network’s exit capacity at its peak. That is a serious concentration of hostile infrastructure in a network whose entire value depends on users not being able to tell who is watching.

The timeline was short. Directory authorities began voting the BadExit and MiddleOnly flags on affected relays at 18:00 UTC on October 4, and those flags were in the consensus by 21:00.2 By 17:00 UTC on October 5, nothing running the attacker’s policy was left in the consensus, and none had returned as of October 9. Tor Metrics shows the count of relays carrying the Exit flag fell by roughly 370 between October 3 and October 5, and it had not recovered by October 18.2

One detail suggests the attackers maintained their access. On the morning of October 5 a scripted restart swept through 55 hosts, with the attacker’s policy still in place. Who ran it is not known.2

How the relays were compromised

No CVE was assigned, because this was not a software vulnerability. It was credential theft against ordinary Linux servers, followed by configuration changes that left no trace in the login log.

The clearest account came from the operator of the largest affected relay family, who wrote a post-mortem on the Tor relay mailing list on October 7.3 Two of that operator’s servers were running Ebury 1.8.3, a long-running credential-stealing backdoor that hides inside OpenSSH. ESET, whose researchers first documented Ebury in 2014, estimated in 2024 that it had infected around 400,000 servers, with more than 100,000 still infected in late 2023.4

The root cause was mundane and is worth sitting with: one password reused for SSH login, sudo, and a backup passphrase, stored in plaintext on both servers, with SSH password authentication left enabled on an internet-facing management server. The attacker logged in on August 28 with the operator account’s password on the first try, reached root within five minutes, and installed the backdoor. Where that password came from is still unknown.3

Two characteristics made Ebury particularly hard to detect, and both apply to any business running its own Linux servers:

  • Package checks pass. Ebury lives in a single setuid library file that replaces a legitimate library, so integrity tools and package verification report the system as clean. SSH, sudo, and PAM all still pass their package checks.
  • The backdoor login leaves no record, so the exit policy files could be rewritten with no login, sudo command, or cron entry appearing in the logs.

The reporting noted that Ebury 1.8.3 is newer than ESET’s public indicators, which stop at 1.8.2, and that ESET’s published detection script listed no socket name for it as of October 21. The researcher who co-authored ESET’s original Ebury paper responded that 1.8.3 had been around since at least June 2026 and posted an updated detection script covering it.2

Did they compromise a hosting provider?

This is the most important open question, and it is not resolved.

Among the relays that were listed on October 1, 71 of 101 hosted on FranTech Solutions, the network behind the BuyVM hosting brand, switched to the attacker’s policy, against 13 out of 9,054 hosted elsewhere. Forty relays belonging to 21 operators changed within five and a half minutes on October 1, most by a configuration reload, which the analysis reads as one actor already holding access to all of them.2

That concentration is a strong hint but not a conclusion. Researchers asked publicly whether the hosting provider itself might have been compromised, pointing out that ESET has seen providers whose management servers ran Ebury and whose customers’ virtual servers then ended up infected.2 No provider compromise has been confirmed. Who is behind the campaign is also unknown.

For small businesses this is the takeaway that generalizes. The relays were compromised the same way a small company’s server gets compromised: a reused password on an internet-facing box with password login enabled. If your own SSH setup looks like the description above, the Tor incident is your early-warning system. Rotate that reused password, disable password authentication, and enable key-based login.

What relay operators should check

The Tor Project’s advisory asks Linux relay operators to audit for signs of compromise.1 The checks are useful well beyond Tor, so they are reproduced here:

  • Check Relay Search: does your relay show the Exit flag, or an exit policy you did not set?
  • Check torrc and anything in %include paths for changes to ExitRelay, ExitPolicy, ContactInfo, MyFamily, or Nickname.
  • Look for NAT rules redirecting port 22 (nft list ruleset, iptables -t nat -S).
  • Look for unknown listening processes or outbound connections (ss -tnp).
  • Verify the tor binary against your distribution package (debsums tor or rpm -V tor).
  • Look for new users, authorized_keys entries, cron jobs, or systemd units. One reported technique established root cron persistence via a fake uppercase CRON daemon.

If a relay is suspected compromised, the Tor Project’s guidance is to take it offline, preserve disk and logs before wiping, reinstall rather than clean up, generate a new relay identity with the old keys treated as stolen, and rotate every credential that was on the host. Reports go to bad-relays@lists.torproject.org.1

Indicators worth checking

These indicators come from the operator’s post-mortem and from the researcher’s scan.23 They are published for defensive checking. We are not reporting them as a complete detection set, and the hash of the implant file differs on every server where it was found.

Type Indicator
Login source IP 185.225.226[.]62 — the source of the August 28 login
Host key seen by the researcher ED25519 SHA256:6baCZCPsl+AfQuujUS81fMEE/C7UeJ+AwjrImqmDB3E
Implant file /usr/lib/x86_64-linux-gnu/libkeyutils.so.1.10.2 — setuid, owned by no package; the libkeyutils.so.1 symlink points at it
Abstract UNIX socket @event-0YsOG9WSOE
Fake process /sbin/rsyslogd running inside the ssh.service cgroup
SSH key used to reach the second host RSA SHA256:dvACokMYcXJ2om4wuS+TvdtjrAgPK7rC7ZQHDgvBHzk

One caution from the operator’s post-mortem applies directly to anyone triaging a live server: check from a rescue system or an offline disk image if you can, and never type a password into a server you suspect, because Ebury will capture it. On a live server, logging in with a key and starting a shell with H=1 I=1 LD_PRELOAD=":" LD_DEBUG=":" bash was the workaround described for getting past the userland rootkit before running detection scripts.3

What remains unknown

Stating the gaps plainly, because they matter for how much comfort this story should offer:

  • How many people lost a password is unknown. No victim count exists.
  • Who is behind the campaign is unknown.
  • Whether a hosting provider was compromised is unconfirmed. The FranTech concentration is suggestive, not conclusive.
  • How many affected hosts ran Ebury is unknown. Only two hosts were actually examined, and directory data shows only the changed exit policy.
  • Why the encrypted mail ports were closed is not visible in the data.
  • Whether all these cases share one attacker is open. Other operators reported a fake uppercase CRON daemon and NAT rules redirecting port 22, which the examined servers did not have.

Sources

  1. Security incident affecting some relay operators — hiro, Tor Network Health team, lists.torproject.org. Published October 5, 2026. Accessed October 21, 2026.
  2. Attackers Hijacked Over 300 Tor Exit Relays to Intercept SSH Connections — Swati Khandelwal, The Hacker News. Published October 21, 2026. Accessed October 21, 2026.
  3. Ebury 1.8.3 on two Quetzalcoatl relay servers: timeline, lessons, open questions — Dr Remmiz (Zimmer), tor-relays mailing list. Posted October 7, 2026. Accessed October 21, 2026.
  4. Ebury: A Linux rootkit with 400,000 infections — ESET. 2024 report. Cited by The Hacker News. Accessed October 21, 2026.