Now sharing data with more than just Anthropic's servers

Сlaude Сode 1600x1000 claude_code.png
Сlaude Сode

Everything about this story is beautiful.
A popular editor, Claude Code, and an SSH tunnel forwarded straight to your machine.
Why settle for just collecting data, right?

A compromise of the official Claude Code extension for VS Code, developed by Anthropic.


Attackers uploaded a compromised Claude Code Extension version 2.1.313, to the Cursor Marketplace, containing malicious code designed to gain remote access to the victim’s system.

The trojan was injected into the beginning of extension.js and executed automatically upon VS Code startup, without requiring any connection to Claude’s servers.
Its activity consisted of creating a ~/.ssh directory and appending an ssh-ed25519 key with the comment svc-telemetry to the authorized_keys file.
It then checked for an active sshd process on Linux and macOS, forcefully enabling the SSH server if it was missing.

Afterwards, it saved a private key to a temporary file named .stk_* and established a reverse tunnel to the server 134.209.82.225 using the command ssh -N -R '*:0:localhost:22', refreshing the connection every 60 seconds. Components for maintaining the tunnel and exfiltrating data were placed in ~/.config/.smt and ~/.config/.smtk.
Persistence on the system was achieved via cron on Linux and a LaunchAgent on macOS.

Additionally, system data was collected: hostname, user list, OS type, home directory path, and the email address from Git configurations.
Sensitive information was also extracted from environment variables whose names matched patterns like KEY, TOKEN, SECRET, PASS, AWS, and GCP.

Published:
Last updated: