1. News
  2. Alerts
  3. Security · Tor attack
AlertSecurity · Tor attack3 min read

Hackers hijacked 300+ Tor relays to steal remote server passwords

Attackers took over more than 300 Tor exit relays in early October and captured SSH passwords. Anyone who logged in to a server that way should change those passwords.

By the Dashline deskSource: The Hacker News
Hackers hijacked 300+ Tor relays to steal remote server passwords
Photo: Victorgrigas, CC BY-SA 3.0
Act this week
What happenedAttackers controlled over 300 Tor exit relays in early October and redirected SSH connections to servers that captured login passwords.
Who is affectedAnyone who logged in to an SSH server with a password through Tor, including IT staff, developers and vendors managing business servers.
What to do
  1. 1Find out who on your team or vendors uses SSH to reach servers, and whether they used Tor.
  2. 2Change any password used for SSH over Tor since early October.
  3. 3Switch SSH logins to key-based authentication and turn off password logins.
  4. 4Check server logs for unfamiliar logins and ask your IT provider to review them.

Attackers took control of more than 300 Tor exit relays in early October and used them to steal passwords for remote servers. A researcher who publishes as kaba found the attack. It affected people who logged in to a server over SSH through Tor with a password. The relays were out of the network by October 5.

What happened

Tor is a network that passes internet traffic through several relays. The last one, called an exit relay, is where traffic leaves for its destination. SSH is a common way to log in to and manage a remote server.

On October 2, kaba scanned Tor's roughly 3,000 exits and found 333 sending SSH traffic to the same 12 servers run by the attackers. A separate analysis of public data counted 377 relays run by 59 operators that switched to the attacker's setup between October 1 and 4. It calls that a policy match, not proof of compromise. At the peak on October 4, these relays made up 7.46% of Tor's exit capacity.

How the trick worked

The attackers edited the relays' settings so they would carry SSH traffic. Instead of reaching the real server, a connection landed on one of the 12 interception servers. That server then connected to the real one, so everything seemed to work.

A password sent this way went straight to the attacker. The interceptor could also watch the session and log in separately with the stolen password. In kaba's test setup, it ran an installer in the same form as one that put Ebury on a relay operator's server. Ebury is a backdoor that hides inside OpenSSH, the common SSH software.

Who it affects

To be exposed, several things had to happen together. Someone connected to an SSH server over Tor between October 1 and the afternoon of October 5. The connection landed on a hijacked exit and was intercepted. The person accepted the interceptor's host key, which is the server's identity check. Then they typed a password. No count of victims exists.

This matters for businesses because IT staff, developers and vendors often manage servers this way. A stolen server password can give an outsider access to company systems.

Who can relax

Logins that use SSH keys instead of passwords could not be relayed to the real server. The same goes for anyone who did not use Tor, or who stopped when their software warned that the server's identity had changed. After October 5, no relay with the attacker's setup remained in the network.

What to do

The alert box above lists the steps. The key point is to treat any password typed after accepting an unfamiliar or changed host key over Tor in that window as stolen. Also have the server checked for signs of Ebury.

What happens next

The Tor Project began flagging the relays on October 4 and told relay operators that attackers appear to be breaking into Linux machines and editing their settings. How the attackers got in, and who they are, is not stated in the material available. Other interception servers may have used different host keys than the one kaba recorded.

The takeaway

If you logged in to a server with a password over Tor in early October and accepted a new key, change that password and have the server checked.

More articles

You should really read these.

Next step

Let’s talk