Cursor 通报 VS Code 扩展市场出现恶意 Anthropic.claude-code 2.1.313 版本

来源:Cursor Blog 2026年10月29日 20:00 AIHOT 评分:81 精选
摘要:Cursor 通报其 VS Code 扩展市场出现恶意修改的 Anthropic.claude-code 2.1.313 版本,非 Anthropic 官方开发,最多影响 4100 名用户。
推荐理由:Cursor 给出受影响用户数、检测命令和完整修复脚本,受影响用户可据此自查并清理后门。
# Cursor 扩展市场发现恶意版 Anthropic.claude-code 2.1.313,最多 4100 名用户受影响 > 原标题:Security notice — malicious version of Anthropic.claude-code (2.1.313) identified in the Cursor Extension Marketplace - 来源:Cursor Blog - 发布时间:2026-10-29T12:00:00.000Z - AIHOT:https://aihot.news/items/pg7avew3q9ekdp3ydzhiuh9y4 - 原文:https://cursor.com/blog/claude-code-extension-security-notice ## 摘要 Cursor 官方披露,其 VS Code 扩展市场中的 Anthropic.claude-code 2.1.313 为恶意篡改版本,并非 Anthropic 开发,在 10 月 29 日 2:27am PT 至 1:35pm PT 期间上架,最多影响 4100 名用户。 ## 推荐理由 Cursor 官方披露恶意扩展事件细节,给出检测命令、修复脚本和完整 IOC,受影响用户可按步骤自查处置。 ## 正文 · 中文译文 今天我们确认了一起安全事件,涉及 Cursor VS Code 扩展市场中的一个特定扩展包:**Anthropic.claude-code 版本 2.1.313**。这个恶意版本并非由 Anthropic 开发。受影响的用户最多 4,100 人,我们会直接联系他们。 ## 事件经过 今天太平洋时间约凌晨 2:27 至下午 1:35 之间,一个被恶意篡改的 Anthropic Claude Code 扩展版本出现在 Cursor VS Code 扩展市场中。该扩展会运行恶意代码,试图安装一个持久化的 SSH 后门。具体来说,它会: - 收集主机和用户信息:主机名、用户名、操作系统、架构、主目录路径、环境变量名、工作目录、配置的 Git 邮箱以及公网 IP。 - 试图把攻击者控制的 SSH 密钥添加到 `authorized_keys`,启用本地 SSH 服务,并打开一条反向 SSH 隧道。除非在极不寻常的情况下以管理员权限启动 Cursor,否则由于恶意代码本身存在错误,这一步会失败。 - 试图通过 LaunchAgent(macOS)或计划任务(Windows,尝试以 SYSTEM 身份运行,并以启动脚本作为后备)让反向 SSH 隧道持久化。后台脚本大约每 60 秒重试一次隧道。 - 通过 HTTP POST 向 `/beacon` 的 8099 端口上报主机详情和后门状态。 **注意:攻击者的服务器已停止运行。** - 我们与托管该服务器的云服务商合作将其下线,因此反向 shell 和主机详情 POST 均已失效。 - 以上发现针对的是已确认的这个包。我们没有证据表明该扩展的其他版本或官方分发渠道受到影响。 - 此外,启用本地 SSH 服务需要管理员权限,而恶意扩展在大多数 macOS 和 Windows 主机上并没有该权限。在这些主机上这一步会失败,攻击者无法通过隧道登录。但该扩展仍会添加攻击者的 SSH 密钥、安装持久化机制,并把主机详情发送给攻击者。无论如何,请按照下面的修复步骤操作。 ## 我们做了什么 - 发现后立即从市场移除了恶意版本,并阻止其继续分发。出于谨慎,我们随后完全关闭了 VS Code 市场。 - 我们审计了访问权限,确认没有其他扩展被篡改。 - 我们轮换了密钥,重建了市场,并使其恢复上线。 - 我们与托管服务商合作将恶意服务器下线,切断了与该服务器的连接,从而阻断了攻击。 ## 你应该做什么 如果你在 2026 年 10 月 29 日太平洋时间凌晨 2:27 至下午 1:35 之间从 Cursor VS Code 扩展市场安装或更新到了 Anthropic.claude-code 2.1.313: 1. 运行下面的检查,确认你是否受到影响。 2. 在终端、网络和扩展安装遥测中搜索以下指标。 3. 隔离出现载荷执行或后门安装迹象的主机。 4. 使用下面的修复脚本移除未经授权的 SSH 密钥、持久化机制和正在运行的隧道进程,并评估是否需要重建主机。仅卸载扩展可能不够——载荷会释放独立运行的持久化脚本。 5. 从可信系统上轮换受影响主机可访问的凭据和会话。虽然环境变量收集范围有限,但不能排除攻击者后续通过后门获取凭据的可能。 ## 检查你是否受到影响 恶意扩展会把攻击者的公钥(标记为 `svc-telemetry`)追加到你的 SSH authorized\_keys 中。检查方法如下: macOS 上运行: ``` grep -qs svc-telemetry ~/.ssh/authorized_keys && echo "svc-telemetry key found" || echo "No key found; machine not impacted" ``` Windows 上在 PowerShell 中运行: ``` $files = "$HOME\.ssh\authorized_keys", "C:\ProgramData\ssh\administrators_authorized_keys" | Where-Object { Test-Path $_ } if ($files -and (Select-String svc-telemetry $files)) { "svc-telemetry key found" } else { "No key found; machine not impacted" } ``` 如果找到该公钥,说明你的机器已受影响。请按上文第 3 至第 5 步操作,并运行下面对应平台的修复脚本。 这些脚本会移除恶意扩展、持久化机制、正在运行的隧道进程以及攻击者的 SSH 公钥。若仍有残留,脚本会以非零状态退出。 macOS 上,下载 [remediate-macos.sh](https://cursor.com/static/security/claude-code-extension/remediate-macos.sh),以受影响用户的身份(不要用 root)在保存该文件的目录中运行: ``` bash remediate-macos.sh ``` Windows 上,下载 [remediate-windows.ps1](https://cursor.com/static/security/claude-code-extension/remediate-windows.ps1),在保存该文件的目录中,用以**管理员身份运行**方式打开的 PowerShell 执行: ``` powershell -ExecutionPolicy Bypass -File .\remediate-windows.ps1 ``` ## 入侵指标 ### 软件包 - 被篡改的 VSIX SHA-256(darwin-arm64):432ccdee3801f99e52b8fe31f69ea9870118e96ea7ef9ecabed1479621b5ab62(MD5 da5469c4221775e9fe2e413e59ca7fd9) - 被篡改的 VSIX SHA-256(win32-x64):3de1722901165769893bef57c72594e9a54459faa23f3091b136b79966edd081(MD5 bd3b71ddf3d0cc3af76249afd2c0eda1) - 被篡改的代码:anthropic.claude-code-2.1.313-darwin-arm64(macOS)或 anthropic.claude-code-2.1.313-win32-x64(Windows)扩展目录下的 extension.js 中包含 134\[.\]209\[.\]82\[.\]225 和 svc-telemetry ### 网络 - 攻击者端点:134\[.\]209\[.\]82\[.\]225 - 反向 SSH:tunnel@134\[.\]209\[.\]82\[.\]225,TCP 22 - 外部信标:hxxp://134\[.\]209\[.\]82\[.\]225:8099/beacon(HTTP POST) - 本地信标尝试:127\[.\]0\[.\]0\[.\]1:8099/beacon(HTTP POST,回环地址) - 向 ifconfig\[.\]me / api\[.\]ipify\[.\]org 查询公网 IP——这些是合法服务,仅访问它们不构成指标 ### SSH - 未授权的公钥:`ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdvylCEJ/k2TpezcTfedrkHyFSK9IZ3vmP6vhY4Ss0P svc-telemetry` - 未授权密钥指纹:`SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk` - 反向隧道密钥指纹:`SHA256:KOAU57+ZG6u3MG4WwzPzPX2O5YEe9qdOC1Bl+6MVyDQ` - 密钥注释:`svc-telemetry` ### 文件与持久化 - macOS:`~/.ssh/authorized_keys` 中存在未授权密钥;`~/.config/.smt`、`~/.config/.smtk`;`$TMPDIR/.stk_<10 hex>`;`~/Library/LaunchAgents/com.apple.sysmond.plist`(标签 `com.apple.sysmond`) - Windows:`%USERPROFILE%\.ssh\authorized_keys`、`%USERPROFILE%\.config\smt.cmd`、`%USERPROFILE%\.config\smtk`、`%TEMP%\.stk_<10 hex>`;计划任务 `SysMon`(尝试以 SYSTEM 身份运行);备用机制 `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\sysmon.cmd` ### 进程 / 命令行 - `ssh -N -R '*:0:localhost:22'`、`autossh -M 0` - SSH 选项:`StrictHostKeyChecking=no`、`UserKnownHostsFile=/dev/null`、`ServerAliveInterval=30`、`ServerAliveCountMax=3`、`ExitOnForwardFailure=yes`、`IdentitiesOnly=yes` - `schtasks /create /tn SysMon` - `systemsetup -setremotelogin on` - `Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0` 如有更多疑问,请联系 security@cursor.com。 ## 正文 · 原文 Today we identified a security incident involving a specific extension package in the Cursor VS Code extension Marketplace: **Anthropic.claude-code version 2.1.313**. This malicious version of the extension was not developed by Anthropic. At most 4,100 users were affected, and we will reach out directly. ## What happened Between about 2:27am PT and 1:35pm PT today, a maliciously modified version of Anthropic’s Claude Code extension was made available in the Cursor VS Code extension Marketplace. The extension runs malicious code that attempts to install a persistent SSH backdoor. Specifically, it: - Collects host and user information: hostname, username, OS, architecture, home directory path, environment variable names, working directories, configured Git email, and public IP. - Attempts to add an attacker-controlled SSH key to `authorized_keys`, enable the local SSH service, and open a reverse SSH tunnel. Outside of highly unusual circumstances where Cursor was started with administrator privileges, due to errors in the malicious code, this step would fail. - Attempts to make the reverse SSH tunnel persistent via a LaunchAgent (macOS) or a scheduled task that attempts to run as SYSTEM with a Startup-script fallback (Windows). Background scripts retry the tunnel roughly every 60 seconds. - Reports host details and backdoor status via HTTP POST to `/beacon` on port 8099. **Note: The attacker server no longer functions.** - We worked with the cloud provider that was hosting it to take it offline, so the reverse shell and host detail POST are not functional. - These findings concern the identified package. We have no evidence that other versions of the extension or the official distribution are affected. - Additionally, turning on the local SSH service requires admin rights, which the malicious extension does not have on most macOS and Windows hosts. On those hosts the step fails and the attacker could not have logged in through the tunnel. The extension still adds the attacker’s SSH key, installs persistence, and sends host details to the attacker. Follow the remediation steps below regardless. ## What we did - Removed the malicious version from the marketplace immediately upon detection and blocked further distribution. We followed with a full shut down of the VSCode Marketplace out of an abundance of caution. - We audited access and confirmed no other extensions were tampered with. - We rotated our keys, rebuilt the marketplace, and brought it back online - We worked with the hosting provider to take the malicious server offline, disrupting the attack by blocking the connection to that server. ## What you should do If you installed or updated to Anthropic.claude-code 2.1.313 from Cursor VS Code extension marketplace between 2:27am PT and 1:35pm PT on October 29, 2026: 1. Run the check below to validate if you are impacted. 2. Search across endpoint, network, and extension-installation telemetry for the indicators below. 3. Isolate hosts showing evidence of payload execution or backdoor installation. 4. Remove the unauthorized SSH key, persistence mechanisms, and running tunnel processes using the remediation scripts below, and assess whether the host should be rebuilt. Uninstalling the extension may not be sufficient — the payload drops standalone persistence scripts that keep running. 5. Rotate credentials and sessions accessible from affected hosts, from a trusted system. The limited env-var collection does not rule out later credential access over the backdoor. ## Check whether you are impacted The malicious extension appends the attacker's public key, labeled `svc-telemetry`, to your SSH authorized keys. To check for it: On macOS, run: ``` grep -qs svc-telemetry ~/.ssh/authorized_keys && echo "svc-telemetry key found" || echo "No key found; machine not impacted" ``` On Windows, run in PowerShell: ``` $files = "$HOME\.ssh\authorized_keys", "C:\ProgramData\ssh\administrators_authorized_keys" | Where-Object { Test-Path $_ } if ($files -and (Select-String svc-telemetry $files)) { "svc-telemetry key found" } else { "No key found; machine not impacted" } ``` If the key is found, your machine is impacted. Follow steps 3 to 5 above, and run the remediation script for your platform below. These scripts remove the malicious extension, the persistence mechanisms, the running tunnel processes, and the attacker's SSH key. They exit with a non-zero status if anything remains. On macOS, download [remediate-macos.sh](https://cursor.com/static/security/claude-code-extension/remediate-macos.sh) and run it as the affected user, not as root, from the folder you saved it to: ``` bash remediate-macos.sh ``` On Windows, download [remediate-windows.ps1](https://cursor.com/static/security/claude-code-extension/remediate-windows.ps1) and run it from PowerShell opened with **Run as Administrator**, in the folder you saved it to: ``` powershell -ExecutionPolicy Bypass -File .\remediate-windows.ps1 ``` ## Indicators of compromise ### Package - Modified VSIX SHA-256 (darwin-arm64): 432ccdee3801f99e52b8fe31f69ea9870118e96ea7ef9ecabed1479621b5ab62 (MD5 da5469c4221775e9fe2e413e59ca7fd9) - Modified VSIX SHA-256 (win32-x64): 3de1722901165769893bef57c72594e9a54459faa23f3091b136b79966edd081 (MD5 bd3b71ddf3d0cc3af76249afd2c0eda1) - Modified code: extension.js in the anthropic.claude-code-2.1.313-darwin-arm64 (macOS) or anthropic.claude-code-2.1.313-win32-x64 (Windows) extension folder contains 134\[.\]209\[.\]82\[.\]225 and svc-telemetry ### Network - Attacker endpoint: 134\[.\]209\[.\]82\[.\]225 - Reverse SSH: tunnel@134\[.\]209\[.\]82\[.\]225, TCP 22 - External beacon: hxxp://134\[.\]209\[.\]82\[.\]225:8099/beacon (HTTP POST) - Local beacon attempt: 127\[.\]0\[.\]0\[.\]1:8099/beacon (HTTP POST, loopback) - Public IP lookups to ifconfig\[.\]me / api\[.\]ipify\[.\]org — legitimate services; access alone is not an indicator ### SSH - Unauthorized public key: `ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdvylCEJ/k2TpezcTfedrkHyFSK9IZ3vmP6vhY4Ss0P svc-telemetry` - Unauthorized key fingerprint: `SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk` - Reverse-tunnel key fingerprint: `SHA256:KOAU57+ZG6u3MG4WwzPzPX2O5YEe9qdOC1Bl+6MVyDQ` - Key comment: `svc-telemetry` ### Files and persistence - macOS: unauthorized key in `~/.ssh/authorized_keys`; `~/.config/.smt`, `~/.config/.smtk`; `$TMPDIR/.stk_<10 hex>`; `~/Library/LaunchAgents/com.apple.sysmond.plist` (label `com.apple.sysmond`) - Windows: `%USERPROFILE%\.ssh\authorized_keys`, `%USERPROFILE%\.config\smt.cmd`, `%USERPROFILE%\.config\smtk`, `%TEMP%\.stk_<10 hex>`; scheduled task `SysMon` (attempts to run as SYSTEM); fallback `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\sysmon.cmd` ### Process / command-line - `ssh -N -R '*:0:localhost:22'`, `autossh -M 0` - SSH options: `StrictHostKeyChecking=no`, `UserKnownHostsFile=/dev/null`, `ServerAliveInterval=30`, `ServerAliveCountMax=3`, `ExitOnForwardFailure=yes`, `IdentitiesOnly=yes` - `schtasks /create /tn SysMon` - `systemsetup -setremotelogin on` - `Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0` If you have further questions, reach out to security@cursor.com.