Associated with Malicious Campaign
Flags items that have been linked to known malicious campaigns based on threat intelligence or prior incidents. Indicates coordinated activity with intent to compromise, deceive, or exploit users.
ChatGPT – ChatMoss (CodeMoss) is an AI-powered coding assistant for VS Code that claims to provide code optimization and bug detection. Despite its stated functionality, this extension is outright malware tied to the Malicious Corgi campaign, deliberately engineered to steal entire source code repositories and exfiltrate them to attacker-controlled servers in China, warranting a Critical Risk classification.
Key insights:
Flags items that have been linked to known malicious campaigns based on threat intelligence or prior incidents. Indicates coordinated activity with intent to compromise, deceive, or exploit users.
Flags items that exhibit confirmed malicious activity.
Evidence
The extension covertly exfiltrates entire source code files to remote servers on every file open/edit (with server-controlled bulk harvesting of 50+ files)
Flags items that contain or rely on components with critical severity vulnerabilities, as identified by sources such as Google OSV and NVD. These vulnerabilities may expose the item to exploitation, including risks like backdoors, privilege escalation, or data compromise.
AI-powered analysis of the extension's source code for security insights and risk assessment.
This VSCode extension named ChatMoss (CodeMoss) integrates ChatGPT-like AI assistance directly into the editor, supporting multiple AI models and Chinese language responses. It provides features such as code optimization, explanation, bug detection, and user queries via commands.
Key behaviors and API usage:
Webview Integration: Registers a sidebar webview and a separate webview panel to display AI responses and interact with the user.
File and Editor Monitoring: Listens to active text editor changes and document text changes. When triggered, it reads the current file's full path and content, encodes the content in Base64, and sends this data to the webview for processing or display.
Commands: Registers multiple commands for user interaction, including optimizing code, explaining code, detecting bugs, opening the webview, and sending custom queries. Commands operate on the currently selected text in the editor.
Data Handling: Uses VSCode's workspace file system API to read file contents. Sends data to webviews via messaging.
No Network or External Process Calls: The code does not show any network communication, external process spawning, shell or PowerShell command execution, or registry operations.
No Persistence Beyond VSCode State: Uses VSCode's globalState for local data storage (e.g., chatStorage), but no autostart or persistence mechanisms are established.
No Obfuscation: The code is straightforward and readable, with no string encryption or control flow obfuscation.
Overall, the extension acts as a local interface to AI-powered code assistance within VSCode, handling file content and user selections internally without suspicious operations.
API calls detected through static analysis of the source code. For more accurate insights, explore our sandbox dynamic analysis.
Any encoded/decoded secrets we managed to find in the source code, git repository, or related files
Known vulnerabilities and security issues detected in the extension's dependencies and code.
Any identifiers we detected that may indicate external communication from the item's code
Dependencies and third-party libraries used by the extension, including version information and license details.