Analysis Finds Persistent SSH Backdoor in Claude Code Extension Artifact

· Original article ↗

Summary

Analysis of Claude Code extension artifact version 2.1.313 found code that adds an SSH key, attempts to enable SSH, creates a reverse tunnel and installs persistence. Cursor reportedly traced the malicious extension to its Marketplace, but the analyzed artifact’s origin

Key points

  • The analyzed version 2.1.313 contains a 66-line malicious loader prepended to the extension bundle; it runs when the extension loads, without requiring a package-manager lifecycle hook.
  • The loader adds an Ed25519 key labeled svc-telemetry to authorized_keys, attempts to enable SSH, and uses an embedded key to establish a reverse SSH tunnel to 134.209.82.225.
  • Persistence mechanisms include a macOS LaunchAgent, a Linux cron entry, and a Windows scheduled task or Startup-folder item.
  • The implant collects host details, Git email, and names of selected environment variables, then sends reconnaissance data over HTTP port 8099.
  • The analysis found no secondary malware download in the injected stage; it identifies public-IP lookups, beacon uploads, and the SSH tunnel as its network behavior.
  • The article recommends checking for the listed files, key, persistence entries, and SSH processes; preserving evidence, rotating accessible credentials, and reviewing logs. It says rebuilding the host is safer than assuming cleanup restores trust.
  • The article says Cursor attributed the malicious extension’s origin to its Marketplace, but states the analyzed artifact’s provenance is not established and does not demonstrate compromise of an official release or distribution infrastructure.

Article Details

Attack Vectors
  • A compromised Claude Code extension, version 2.1.313, in the Cursor Marketplace prepends a malicious loader to extension.js; the loader runs when the extension is loaded, before legitimate initialization.
  • The loader appends an attacker-provided Ed25519 key to the user's ~/.ssh/authorized_keys and attempts to enable the local SSH service.
  • The implant establishes a reverse SSH tunnel to 134.209.82.225, forwarding connections to port 22 on the victim.
  • The implant installs platform-specific persistence using a macOS LaunchAgent, a Linux @reboot crontab entry, or a Windows scheduled task or Startup-folder item.
  • The implant collects host and account details and sends reconnaissance beacons over HTTP.
Defensive Notes
  • Search endpoints for the listed file paths, SSH key comment, LaunchAgent label, task name, IP address, and hashes; inspect users' authorized_keys and loaded macOS LaunchAgents.
  • Look for long-running ssh or autossh processes containing -R *:0:localhost:22.
  • If the artifact was loaded, disconnect the system and preserve forensic evidence. The article recommends blocking 134.209.82.225 on ports 22 and 8099.
  • After preserving evidence, remove the extension and persistence, rotate credentials accessible to the affected account from a known-clean system, and review SSH, shell, process, VS Code, authentication, and network logs for follow-on activity.
  • The article recommends rebuilding the host rather than assuming removal of known artifacts restores trust.

Indicators of compromise

TypeIndicatorContext
IPV4134[.]209[.]82[.]225Identified as the implant's C2 and reverse-SSH-tunnel endpoint; infrastructure ownership is unverified.
SHA25618756b75afedee74bbf49832a1b1dada4961672c41d595be5c1bbe75709de927Deterministic aggregate digest of the analyzed directory containing the malicious artifact.
SHA2567e0a52885fadee05544a9e99eb18c792bec05900a5e1a66d68f8383decb0e278SHA-256 hash of the embedded private key used to establish the reverse SSH tunnel.
SHA256ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15SHA-256 hash of the malicious extension.js file.
URLhxxp[:]//134[.]209[.]82[.]225:8099/beaconHTTP reconnaissance-beacon endpoint identified as part of the implant's C2 traffic.

MITRE ATT&CK

T1016 · System Network Configuration DiscoveryThe implant queries public-IP lookup services as part of host reconnaissance.T1033 · System Owner/User DiscoveryAt extension load, the implant collects the local username.T1041 · Exfiltration Over C2 ChannelThe implant transmits collected host reconnaissance in JSON beacons to its C2 endpoint.T1053.003 · CronOn Linux, the implant adds its script to the user's crontab with an @reboot entry.T1053.005 · Scheduled TaskOn Windows, the implant attempts to create an on-start scheduled task named SysMon.T1059.001 · PowerShellThe Windows branch uses PowerShell to install OpenSSH Server, configure automatic startup, and start sshd.T1059.003 · Windows Command ShellThe Windows persistence branch writes a .config\smt.cmd batch script and may copy sysmon.cmd into the Startup folder.T1059.004 · Unix ShellOn Unix-like systems, the implant uses shell scripts and commands to set up persistence and launch the SSH tunnel.T1071.001 · Web ProtocolsThe implant sends reconnaissance JSON to an HTTP beacon endpoint on 134.209.82.225:8099.T1082 · System Information DiscoveryAt extension load, the implant collects the hostname, operating system, and CPU architecture.T1098.004 · SSH Authorized KeysThe implant appends an Ed25519 key labeled svc-telemetry to the user's ~/.ssh/authorized_keys.T1543.001 · Launch AgentOn macOS, the implant writes and loads a persistent LaunchAgent at ~/Library/LaunchAgents/com.apple.sysmond.plist.T1547.001 · Registry Run Keys / Startup FolderIf Windows scheduled-task persistence cannot be confirmed, the implant copies sysmon.cmd into the user's Startup folder.T1572 · Protocol TunnelingThe implant creates a reverse SSH tunnel to 134.209.82.225, forwarding connections to port 22 on the victim.

People

Vendors

Products

Related Articles