Home › Intelligence › Brief
BREACH BRIEF🟠 High ThreatIntel

Malicious Claude Code Extension Serves Persistent SSH Backdoor via Cursor Marketplace

A tampered Claude Code extension published briefly in the Cursor marketplace installed an SSH key, enabled the local SSH service, and attempted a reverse‑SSH tunnel, creating a stealthy backdoor across macOS, Linux and Windows. The incident underscores the importance of supply‑chain and third‑party extension controls for audit readiness.

LiveThreat™ Intelligence · 📅 November 17, 2026· 📰 microsoft.com
🟠
Severity
High
TI
Type
ThreatIntel
🎯
Confidence
High
🏢
Affected
2 sector(s)
✅
Actions
3 recommended
📰
Source
microsoft.com

Malicious Claude Code Extension Serves Persistent SSH Backdoor via Cursor Marketplace

What Happened — On 29 Oct 2026 a tampered copy of the Claude Code extension (versions 2.1.313 and 2.1.312) was briefly published in the Cursor extension marketplace. The malicious package contained injected JavaScript that, when the extension loaded, harvested host information, wrote an attacker‑controlled SSH public key to the user’s authorized_keys, enabled the local SSH service, and attempted a reverse‑SSH tunnel with persistence mechanisms on macOS, Linux and Windows. The loader could leave persistence artifacts even when the tunnel failed. Microsoft Threat Intelligence confirmed the incident was confined to the Cursor marketplace; the official Anthropic Claude Code packages on Visual Studio Marketplace and npm were not affected.

On October 29 2026, Cursor disclosed that a compromised copy of the Claude Code extension—identified as versions 2.1.313 and 2.1.312—appeared in its own extension marketplace for roughly nine hours, from about 2:27 a.m. to 1:35 p.m. Pacific Daylight Time. The malicious packages were never published on the Microsoft Visual Studio Marketplace nor on the npm @anthropic‑ai/claude‑code repository, which remained untouched. Anthropic told Microsoft that none of its systems had been breached and it did not create the rogue package; Microsoft’s threat team concluded that, “the incident is limited to Cursor marketplace.”

Microsoft Threat Intelligence examined the injected JavaScript loader that runs as soon as the extension module loads. The code gathers host details, attempts to drop an attacker‑controlled SSH public key, enables the local SSH daemon, creates a reverse‑SSH tunnel, writes persistence scripts, and finally sends a delayed callback with the collected information. Whether the attacker gains remote access depends on the victim’s privileges, the SSH service configuration, and the attacker’s server settings, but the loader may still leave keys and persistence artifacts even if the tunnel fails.

During the initial module load, the loader harvests the hostname, current user, operating system, CPU architecture, home and working directories, and the global Git email address. It also scans environment‑variable names for terms such as KEY, TOKEN, SECRET, PASS, AWS, or GCP, retaining up to forty matches. The subsequent callback transmits only the variable names—not their values—thereby exposing potential secret categories without directly stealing the secrets themselves.

For SSH access, the loader uses two distinct identities. First, it checks the user’s authorized_keys file for an entry labeled svc‑telemetry; if absent, it appends an embedded Ed25519 public key with that comment, granting whoever holds the matching private key access to the user account. Second, it decodes a private key for the outbound tunnel and writes it to a hidden temporary file named .stk_ followed by ten hexadecimal characters derived from the hostname and home directory. The tunnel is launched with the command line ‑N ‑R '*:0:localhost:22', requesting a dynamically allocated remote port that forwards back to the victim’s local port 22. On Unix‑like systems the loader prefers autossh and falls back to ssh; on Windows it runs a concealed PowerShell loop that retries every sixty seconds. Although “errors and administrator‑permission requirements blocked SSH access on most macOS and Windows hosts,” the malicious code could still plant the SSH key, establish persistence, and report host information.

The malicious loader drops platform‑specific scripts and startup entries outside the extension’s own folder, using names that mimic legitimate monitoring tools. On macOS it creates a user LaunchAgent plist (com.apple.sysmond.plist) together with hidden files ~/.config/.smt and ~/.config/.smtk; on Linux it adds an @reboot line to the user’s crontab that points at the same hidden files; on Windows it attempts to register a scheduled task named “SysMon” that would run with SYSTEM privileges, writing smt.cmd and smtk under the user’s .config directory, and falls back to a batch file placed in the user’s Startup folder (sysmon.cmd). The scripts rebuild the hidden .smtk identity each time they run and then launch a loop that repeatedly tries to open a reverse SSH tunnel. The mere existence of these artifacts does not prove the persistence mechanisms actually executed.

Investigators recommend immediate hunting queries to locate machines where the Claude‑Code extension versions 2.1.313 or 2.1.312 were installed from the Cursor Marketplace, correlating endpoint, network, file, process and authentication logs with the published indicators. They advise preserving the extension package, any modified SSH authorized_keys files, generated keys, scripts and startup configurations before cleaning. “Isolate any device that shows evidence of the loader or backdoor,” the guidance states. Remediation begins with checking ~/.ssh/authorized_keys (macOS/Linux) or both %USERPROFILE%\.ssh\authorized_keys and C:\ProgramData\ssh\administrators_authorized_keys (Windows) for an attacker‑controlled key labeled svc-telemetry, confirming its fingerprint against the IOC list, and then removing that exact entry while leaving legitimate keys untouched. After evidence collection, the trojanized extension and all persistence objects should be deleted: unload the LaunchAgent and delete the .smt and .smtk files on macOS; remove the crontab entry and associated files on Linux; delete the SysMon scheduled task, the Startup‑folder fallback, and the .config scripts on Windows. All temporary .stk_ identity files must also be erased, and the malicious SSH retry processes stopped. Cursor’s security notice notes that removing or updating the extension does not automatically clean files written elsewhere, so each artifact must be removed manually.

For follow‑up, analysts should review telemetry after the extension loads for signs of SSH key acceptance, tunnel creation, local SSH sessions, command execution and file activity. When suspicious credential use is observed, they should rotate passwords, revoke sessions from a known‑clean device, and, if necessary, rebuild the endpoint to ensure no residual tunnel or startup artifacts reappear after a reboot. Cursor’s hardening guidance recommends limiting extensions to vetted publishers and applying an installation cooldown to delay the rollout of newly published versions, measures intended to curb similar supply‑chain attacks.

Microsoft Defender XDR provides a set of detections that map to the observed tactics. Execution of the suspicious shell scripts is covered by Defender for Endpoint and Defender Antivirus, which flag “Trojan:MacOS/SmtShellMal.A” and “Trojan:JS/CredTheft.MS!MTB.” Persistence via added SSH keys, LaunchAgents or scheduled tasks is also detected by Defender for Endpoint, with alerts for suspicious launchctl activity, plist modifications (“Trojan:MacOS/MalPlistSysmond.A”) and unauthorized scheduled tasks. Defense‑evasion techniques that masquerade as Apple system services trigger plist‑modification alerts, while the reverse‑SSH command‑and‑control channel is flagged as suspicious tunneling activity (“HackTool:MacOS/RevAnthShell.A”). Customers with access can leverage Microsoft Security Copilot and the latest Defender XDR threat‑analytics reports for deeper investigation and response.

The malicious Claude Code‑branded VS Code extension identified as version 2.1.313 embeds a persistent SSH backdoor, and Microsoft Defender XDR provides a set of advanced‑hunting queries to surface related activity. One query pulls any DeviceNetworkEvents from the past 30 days that contact the hard‑coded address 134.209.82.225 (or its URL form), exposing the process name and command line that initiated each connection. A second query searches DeviceFileEvents for the SHA‑256 hash ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15, as well as files named “.smt”, “.smtk”, “smt.cmd”, “sysmon.cmd”, “com.apple.sysmond.plist”, or any filename beginning with “.stk_”. Additional queries look for scheduled‑task creation events that contain both “SysMon” and “smt” in their AdditionalFields, and for macOS LaunchAgent modifications targeting the com.apple.sysmond.plist path.

The loader’s behavior maps to several MITRE ATT&CK techniques, though execution on every host has not been confirmed. It adds an SSH public key to the user’s authorized_keys file (T1098.004), requests reverse SSH tunneling to the local SSH service (T1572), attempts a Linux @reboot cron entry (T1053.003), and creates a Windows scheduled task that runs as SYSTEM at startup (T1053.005).

Key indicators of compromise include the remote IP 134.209.82.225, a beacon URL hxxp://134.209.82.225:8099/beacon, a comment string “svc‑telemetry” marking the installed authorization key, and a fingerprint string “SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk”. File‑name patterns such as “.stk_[0‑9a‑f]{10}” denote temporary tunnel identities, while the JavaScript entry point hash matches the SHA‑256 value listed above. A second hash (7e0a52885fadee05544a9e99eb18c792bec05900a5e1a66d68f8383decb0e278) corresponds to a decoded tunnel private‑key file, and the macOS persistence artifact resides at ~/Library/LaunchAgents/com.apple.sysmond.plist.

Microsoft’s security notice on the Cursor VS Code Extension Marketplace flagged the malicious versions 2.1.312 and 2.1.313, and the Threat Intelligence team has published the associated queries and IOCs on its blog and podcast channels. The notice emphasizes that the listed events are investigative leads, not definitive proof of compromise, and advises organizations to correlate the indicators with actual host behavior before drawing conclusions.

Further work is required to confirm whether any endpoints have been successfully compromised, to locate the persistent launch agents or scheduled tasks referenced in the queries, and to monitor for additional beacon traffic to the defanged IP address. investigators recommend deploying the provided hunting queries across the environment and validating any matches against the full set of indicators.

Why It Matters for Trust & Control Assurance — The episode highlights the need for robust supply‑chain and third‑party extension vetting controls; a single rogue package can create a stealthy backdoor across multiple OS platforms.

Who Is Affected — Developers and enterprises that install AI‑coding extensions from public marketplaces; SaaS platforms that host third‑party extensions; organizations with remote‑development workflows.

Recommended Actions

  • Identify any devices that installed or auto‑updated to anthropic.claude-code 2.1.313/2.1.312 from the Cursor marketplace.
  • Preserve the extension package, modified SSH files, and any created startup artifacts for forensic analysis.
  • Remove the malicious extension and all associated persistence objects (LaunchAgents, crontab entries, scheduled tasks, scripts).
  • Review authorized_keys for the unauthorized “svc‑telemetry” key and revoke any related SSH sessions.
  • Rotate credentials, enforce MFA for remote access, and harden SSH configurations (disable unused services, enforce key‑approval workflows).
  • Apply Cursor’s hardening guidance: restrict extensions to approved publishers and enable an installation cooldown.

Technical Notes

  • Attack vector: supply‑chain compromise of a marketplace‑hosted VS Code extension.
  • Payload: JavaScript loader using Node.js APIs to execute OS commands, write SSH keys, and create reverse‑SSH tunnels (T1572).
  • Persistence: macOS LaunchAgent (com.apple.sysmond.plist), Linux user‑crontab @reboot, Windows scheduled task named “SysMon”.
  • No evidence of data exfiltration; the loader only reported host metadata and environment‑variable names containing keywords such as KEY, TOKEN, SECRET.
📰 Original Source
https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cursor-extension-persistent-ssh-backdoor/ ↗

This LiveThreat Intelligence Brief is an independent analysis. Read the original reporting at the link above.

From the Verisq platform · Vendor Risk Hub

Point-in-time vendor reviews miss incidents like this.

Verisq AI Trust Operations replaces the annual questionnaire with continuous third-party monitoring — so vendor exposure becomes audit evidence, not a once-a-year guess.

See how Verisq AI Trust Operations works →