ThreatBeaconXSubscribe
HighThreat Intelligence · 11 min read

Trojanized Claude Code Extension Plants Persistent SSH Backdoor

A compromised version of the Claude Code extension, 2.1.313, distributed through the Cursor Marketplace was found to contain malicious JavaScript that installs an unauthorized SSH key, attempts to enable remote SSH access, and establishes a persistent reverse SSH tunnel to attacker-controlled infrastructure. The malware also collects host reconnaissance information and transmits it to a remote server. The activity affects the identified Cursor Marketplace extension artifact; the official Claude Code npm package, Open VSX extension, and Microsoft VS Code extension were reported as unaffected.

Written by ThreatBeaconX Intelligence Team·Published Oct 30, 2026

1. Executive Summary

A trojanized version of the Claude Code extension, identified as anthropic.claude-code version 2.1.313, was discovered in the Cursor Marketplace. The malicious version was reportedly published on October 29, 2026, and contained an injected JavaScript loader designed to establish persistent remote access to compromised developer systems.

According to the technical analysis published by OpenSourceMalware on October 30, 2026, the malicious code was inserted at the beginning of the extension's main JavaScript bundle (extension.js). It executes before the legitimate extension code, allowing the backdoor to operate when the extension loads without requiring the user to initiate a Claude Code conversation.

The malicious loader performs host reconnaissance, adds an attacker-controlled Ed25519 public key to the user's SSH authorized_keys file, attempts to enable the SSH service, and establishes a reverse SSH tunnel to the command-and-control (C2) infrastructure at 134.209.82[.]225.

The malware also implements operating-system-specific persistence mechanisms, including macOS LaunchAgents, Linux cron jobs, and Windows scheduled tasks or Startup folder entries.

The injected code reportedly transmits system reconnaissance information through an unencrypted HTTP beacon on port 8099. Its SSH tunneling mechanism provides the attacker with a potential interactive access path to the compromised system.

Following an update from Cursor, the incident was attributed to a compromise involving the Claude Code extension in the Cursor Marketplace. The report explicitly distinguishes this malicious extension from the official Claude Code npm package, Open VSX extension, and Microsoft VS Code extension, which were reported as unaffected.

2. Incident Overview

AttributeDetails
Threat typeTrojanized developer-tool extension
Affected extensionanthropic.claude-code
Malicious version2.1.313
Distribution platformCursor Marketplace
Initial publication dateOctober 29, 2026
Public technical analysisOctober 30, 2026
Primary malware functionalityPersistent SSH backdoor
C2 IP address134.209.82[.]225
C2 communicationSSH and HTTP
HTTP beacon port8099
Target platformsWindows, Linux, macOS

The malicious code was reportedly inserted into the extension's JavaScript entry point, while the remaining extension components and bundled binary appeared consistent with the legitimate version.

The injected loader executes before the legitimate extension initialization. This design allows the expected extension functionality to continue while the malicious code performs its activities in the background.

OpenSourceMalware also clarified that the malicious behavior occurs during extension runtime rather than through npm or package-manager lifecycle scripts such as preinstall, install, or postinstall.

3. Affected and Unaffected Components

Affected

  • Cursor Marketplace Claude Code extension.

  • Extension identifier: anthropic.claude-code.

  • Malicious version: 2.1.313.

Reported as unaffected

  • Official @anthropic-ai/claude-code npm package.

  • Open VSX Claude Code extension.

  • Microsoft VS Code extension for Claude.

Important: Users should verify the extension's installation source and version rather than assuming that every Claude Code installation is affected.

4. Technical Analysis

4.1 Malicious JavaScript Injection

The analyzed extension contained a malicious 66-line JavaScript loader inserted before the legitimate extension bundle.

The injected code uses Node.js modules to interact with the operating system, filesystem, process execution, HTTP networking, and cryptographic functionality.

The loader executes when the extension is loaded by Visual Studio Code. As a result, the user does not need to open a Claude conversation or execute a specific prompt to trigger the malicious behavior.

The malicious code also suppresses many execution errors, allowing the legitimate extension to continue loading even when certain backdoor operations fail.

4.2 Host Reconnaissance

During execution, the malware collects information about the compromised system, including:

  • Hostname and local username.

  • Operating system and CPU architecture.

  • Home directory and current working directory.

  • Global Git email address obtained through git config --global user.email.

  • Names of environment variables containing terms such as KEY, TOKEN, SECRET, PASS, AWS, or GCP.

The initial beacon reportedly includes the names of potentially sensitive environment variables rather than their actual values.

However, the collected information can reveal the presence of cloud credentials, CI/CD integrations, and other sensitive development environments. If the attacker obtains SSH access, they may be able to inspect the account and its accessible resources directly.

4.3 Unauthorized SSH Key Installation

The malware creates the user's .ssh directory if required and appends an attacker-controlled Ed25519 public key to:

~/.ssh/authorized_keys

The inserted key uses the comment:

svc-telemetry

This name is designed to resemble a legitimate administrative or monitoring account.

The reported public key is:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdvylCEJ/k2TpezcTfedrkHyFSK9IZ3vmP6vhY4Ss0P svc-telemetry

SSH key fingerprint:

SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk

The malware sets restrictive permissions on the SSH directory and authorized_keys file. It also checks for the existing marker to avoid inserting duplicate entries.

Adding an unauthorized SSH public key can provide persistent access to the victim's account without requiring the legitimate user's password, provided the associated private key is available to the attacker and SSH access is reachable.

4.4 SSH Service Enablement

The malware attempts to make the compromised system accessible through SSH.

Its behavior varies by operating system:

Operating SystemReported behavior
macOSChecks Remote Login and attempts to enable it using systemsetup -setremotelogin on
LinuxChecks for SSH services such as sshd or ssh and attempts to start them using system service commands
WindowsAttempts to install OpenSSH Server, configure automatic startup, and start the sshd service

These operations may require elevated privileges and may fail if the executing user does not have sufficient permissions.

However, failure to enable SSH does not necessarily stop the remaining malicious execution flow.

4.5 Reverse SSH Tunnel Establishment

The malware contains an embedded, Base64-encoded OpenSSH private key. It decodes the key into a temporary file with a name matching the pattern:

<TMPDIR>/.stk_<identifier>

The identifier is derived from the hostname and home directory.

The malware then repeatedly attempts to connect to the attacker-controlled infrastructure:

tunnel@134.209.82[.]225

The reverse SSH forwarding argument is:

-N -R '*:0:localhost:22'

This configuration requests a remote port allocation and forwards connections through the SSH tunnel to port 22 on the victim's system.

The malware reportedly reconnects after 60 seconds if the connection fails. It prefers autossh on Unix-like platforms where available and otherwise uses the standard SSH client.

The SSH connection also disables host-key verification and uses the embedded private key for authentication.

This mechanism provides the operator controlling the remote SSH server with a potential interactive access path to the victim's SSH service.

4.6 Platform-Specific Persistence

The malware implements different persistence mechanisms depending on the operating system.

macOS

The malware creates the following files:

~/.config/.smt
~/.config/.smtk
~/Library/LaunchAgents/com.apple.sysmond.plist

The .smt script reconstructs the embedded SSH key and continuously launches the reverse tunnel.

A LaunchAgent named com.apple.sysmond is configured with RunAtLoad and KeepAlive properties to maintain execution.

The use of an Apple-like filename may make the persistence entry appear legitimate during a superficial review. It is not an Apple system component.

Linux

The malware creates:

~/.config/.smt
~/.config/.smtk

It also adds an @reboot entry to the user's crontab to restart the backdoor after system startup.

Windows

The malware creates:

%USERPROFILE%\.config\smt.cmd
%USERPROFILE%\.config\smtk

It attempts to establish persistence through a scheduled task named:

SysMon

The task is configured to run at startup as SYSTEM. If that method cannot be established, the malware attempts to place sysmon.cmd in the user's Startup folder.

These mechanisms allow the backdoor to resume execution after a reboot or user session restart.

4.7 Reconnaissance Beacon and Data Exfiltration

After a delay of approximately 1.5 seconds, the malware attempts to identify the system's public IP address using:

curl -s --max-time 4 ifconfig.me
curl -s --max-time 4 https://api.ipify.org

It then sends the collected reconnaissance information in JSON format to the following endpoints:

http://127.0.0.1:8099/beacon
http://134.209.82[.]225:8099/beacon

The external HTTP beacon communicates with the C2 infrastructure over port 8099 without encryption.

The analysis found that the injected stage does not process the HTTP response to execute additional commands or download further payloads. No additional executable or script download was identified in the analyzed loader.

However, the established SSH tunnel provides an interactive access mechanism through which the attacker could potentially conduct further activities.

5. Attack Chain

The following sequence summarizes the observed malicious functionality in the analyzed extension:

  1. Extension loading: The victim loads the malicious Claude Code extension version 2.1.313 in the Cursor environment.

  2. Malicious code execution: The injected JavaScript loader executes before the legitimate extension code.

  3. Host reconnaissance: System information, Git configuration, and selected environment-variable names are collected.

  4. SSH key installation: The attacker-controlled svc-telemetry public key is appended to the user's authorized_keys file.

  5. SSH enablement: The malware attempts to enable or start SSH services.

  6. Reverse tunnel: An SSH connection is established to 134.209.82[.]225, forwarding traffic to the victim's local SSH service.

  7. Persistence: Platform-specific mechanisms are configured to restart the backdoor after system startup.

  8. Reconnaissance beacon: Host information is transmitted to the external C2 endpoint over HTTP port 8099.

6. Indicators of Compromise (IOCs)

The following indicators were extracted from the technical analysis published by OpenSourceMalware.

6.1 Package and Version

IndicatorValue
Extension identifieranthropic.claude-code
Malicious version2.1.313
MarketplaceCursor Marketplace

6.2 Network Indicators

TypeIndicatorDescription
IPv4134.209.82[.]225Reported C2 server
TCP Port22Reverse SSH tunnel
TCP Port8099HTTP reconnaissance beacon
URLhttp://134.209.82[.]225:8099/beaconExternal beacon endpoint
URLhttp://127.0.0.1:8099/beaconLocal beacon endpoint
Domainifconfig.mePublic IP discovery
URLhttps://api.ipify.orgPublic IP discovery

6.3 SSH Indicators

TypeIndicator
SSH destinationtunnel@134.209.82[.]225
Authorized key commentsvc-telemetry
SSH key fingerprintSHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk
Reverse tunnel argument-N -R '*:0:localhost:22'

6.4 File and Persistence Indicators

PlatformIndicator
macOS/Linux~/.config/.smt
macOS/Linux~/.config/.smtk
macOS~/Library/LaunchAgents/com.apple.sysmond.plist
macOS/Linux${TMPDIR}/.stk_*
Windows%USERPROFILE%\.config\smt.cmd
Windows%USERPROFILE%\.config\smtk
WindowsScheduled task SysMon
Windowssysmon.cmd

6.5 File Hashes (SHA-256)

File / ObjectSHA-256
Analyzed extension.jsecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15
Embedded tunnel private key7e0a52885fadee05544a9e99eb18c792bec05900a5e1a66d68f8383decb0e278
Analyzed directory aggregate digest18756b75afedee74bbf49832a1b1dada4961672c41d595be5c1bbe75709de927

IOC handling note: The private-key hash is an artifact fingerprint, not a file hash of a downloaded malware executable. The loopback URL is a local endpoint and should not be treated as external C2 infrastructure.

7. Potential Impact

Successful execution of the malicious extension could expose developer systems and connected environments to several security risks:

  • Persistent unauthorized access: An attacker-controlled SSH key could provide continued access to the compromised user account.

  • Credential exposure: Reconnaissance may identify the presence of cloud credentials, API tokens, secrets, and CI/CD integrations.

  • Source-code exposure: Developer workspaces, repositories, and project files accessible to the compromised account could be at risk.

  • Cloud environment compromise: Access to credentials or configuration files could create opportunities for further compromise of AWS, GCP, or other connected services.

  • Lateral movement: A compromised developer endpoint could become an entry point for accessing other systems and internal resources.

  • Long-term persistence: LaunchAgents, cron jobs, scheduled tasks, and Startup entries could allow the backdoor to survive system restarts.

  • Remote command execution: The reverse SSH tunnel could provide an attacker-controlled route to interact with the victim's SSH service.

The actual impact depends on the privileges of the affected user, SSH accessibility, available credentials, and any subsequent actions performed by the attacker.

8. Detection and Threat Hunting Recommendations

Security teams should prioritize identifying installations of the malicious extension version and investigating systems where the extension may have been loaded.

8.1 Extension Inventory Review

  • Identify developer endpoints using Cursor and Visual Studio Code.

  • Review installed extensions for the identifier anthropic.claude-code.

  • Identify installations of version 2.1.313.

  • Review extension installation and update timestamps around October 29, 2026.

  • Verify the extension's installation source and compare its contents against a known-clean version.

8.2 Endpoint Threat Hunting

Search EDR and endpoint telemetry for:

  • Creation or modification of .ssh/authorized_keys.

  • The SSH key comment svc-telemetry.

  • Creation of .config/.smt and .config/.smtk.

  • Creation of the macOS LaunchAgent com.apple.sysmond.plist.

  • Linux crontab entries containing @reboot.

  • Windows scheduled task creation involving SysMon.

  • Creation of sysmon.cmd in Startup directories.

  • Execution of ssh, autossh, systemctl, systemsetup, and PowerShell commands associated with SSH service configuration.

  • SSH command-line arguments containing -N -R and localhost:22.

8.3 Network Threat Hunting

Review network and proxy telemetry for:

  • Outbound connections to 134.209.82[.]225.

  • SSH traffic to the identified C2 address over TCP port 22.

  • HTTP connections to 134.209.82[.]225 over TCP port 8099.

  • HTTP POST or other beacon activity involving /beacon.

  • Long-running outbound SSH sessions and periodic reconnection attempts.

  • DNS and HTTP activity associated with public IP discovery services such as ifconfig.me and api.ipify.org.

8.4 Credential and Access Review

If an affected extension was loaded:

  • Review SSH authentication logs for unexpected access.

  • Identify unauthorized SSH keys in user accounts.

  • Review cloud authentication logs and API activity.

  • Rotate potentially exposed credentials, tokens, and secrets from a known-clean system.

  • Inspect developer repositories and CI/CD environments for suspicious access.

  • Investigate possible follow-on activity beyond the known indicators.

9. Mitigation and Response Recommendations

  1. Identify affected installations: Immediately inventory Cursor Marketplace Claude Code extension installations and identify version 2.1.313.

  2. Remove the malicious extension: Disable and remove the affected extension from identified endpoints.

  3. Isolate suspected systems: Disconnect systems where the malicious extension was loaded if unauthorized access or persistence is suspected.

  4. Preserve forensic evidence: Collect extension files, endpoint telemetry, SSH configuration, persistence artifacts, and relevant network logs before remediation.

  5. Remove unauthorized SSH keys: Inspect and remove the malicious svc-telemetry key after preserving evidence.

  6. Investigate persistence mechanisms: Review and remove unauthorized LaunchAgents, cron entries, scheduled tasks, and Startup folder scripts.

  7. Block identified infrastructure: Apply appropriate network controls for 134.209.82[.]225, particularly TCP ports 22 and 8099, while considering any legitimate business dependencies.

  8. Rotate exposed credentials: Reset potentially compromised SSH credentials, API tokens, cloud secrets, and other credentials accessible to the affected user.

  9. Review subsequent activity: Investigate SSH sessions, process execution, file access, and authentication events for signs of further compromise.

  10. Rebuild where necessary: For confirmed compromise, consider rebuilding the endpoint from a trusted image rather than relying solely on removal of known artifacts.

Because the implant provides an interactive SSH access path, removal of the known files alone may not be sufficient to establish system integrity.

10. MITRE ATT&CK Mapping

The following mappings describe behaviors identified in the analyzed malicious extension.

TacticTechniqueIDObserved behavior
ExecutionUser Execution: Malicious FileT1204.002Malicious extension code executes when the extension is loaded
PersistenceAccount Manipulation: SSH Authorized KeysT1098.004Adds an attacker-controlled SSH public key
PersistenceScheduled Task/Job: CronT1053.003Uses Linux cron for startup persistence
PersistenceScheduled Task/Job: Scheduled TaskT1053.005Attempts to create a Windows scheduled task
PersistenceEvent Triggered Execution: Launch AgentT1543.001Uses a macOS LaunchAgent
DiscoverySystem Information DiscoveryT1082Collects operating-system and architecture information
DiscoverySystem Owner/User DiscoveryT1033Collects the local username
DiscoverySystem Network Configuration DiscoveryT1016Retrieves public IP information
Command and ControlProtocol TunnelingT1572Establishes a reverse SSH tunnel
Command and ControlEncrypted Channel: SSHT1573.002Uses SSH for remote communication
ExfiltrationExfiltration Over C2 ChannelT1041Sends reconnaissance data through the external beacon endpoint

11. Conclusion

The trojanized Claude Code extension demonstrates how compromised developer tooling can be abused to establish persistent remote access while maintaining the appearance of legitimate application functionality.

By injecting malicious JavaScript before the legitimate extension code, the attacker can execute reconnaissance, install unauthorized SSH access, enable remote connectivity, and maintain persistence across Windows, Linux, and macOS systems.

The incident is particularly relevant to organizations whose developers use AI-powered coding assistants and IDE extensions, as compromised development endpoints may expose source code, cloud credentials, API tokens, and CI/CD environments.

Organizations should urgently review Cursor Marketplace extension installations, investigate version 2.1.313, and conduct endpoint and network threat hunting using the identified indicators.

MITRE ATT&CK Mapping

T1204.002T1098.004T1053.003T1053.005T1543.001T1082T1033T1016T1572T1573.002T1041