Infostealer Malware Impersonates DeepSeek AI Tools on PyPI

Malicious Packages Target Developers on Python Package Index
Overview of the Threat
Recently, there has been a rising trend of malicious activities aimed at developers during the growing popularity of a Chinese AI platform known as DeepSeek. Cybercriminals are exploiting this increased interest by distributing harmful software disguised as legitimate developer tools on the Python Package Index (PyPI). The packages, named "deepseeek" and "deepseekai," were designed to mimic legitimate Python clients for the DeepSeek AI platform. These threats showcased a troubling trend where threat actors attempt to monetize their malicious efforts by targeting unsuspecting developers.
Details of the Malware
The malicious packages were uploaded to PyPI on January 29, 2025, with only a narrow twenty-minute interval between the two releases. The account that uploaded them was created in June 2023 and showed no prior activity, raising suspicions about its legitimacy. Researchers from Positive Technologies uncovered this nefarious scheme, identifying the packages as infostealers, which are specifically designed to harvest information from developers using the software.
When a developer executes one of these packages, it activates a malicious payload. This not only compromises sensitive user and system data but also collects crucial environment variables, which include API keys, database credentials, and access tokens crucial for cloud services and infrastructure.
How the Infostealer Functions
Mechanism of Action
Once a developer runs the commands for either deepseeek
or deepseekai
via the command line, the malicious functions begin collecting information. According to the Positive Technologies report, the payload is intentionally designed to siphon critical information which could lead to severe security breaches.
The theft of environment variables can lead to unauthorized access to applications and systems, as they often contain the necessary credentials to operate cloud services or interact with databases.
Exfiltration Process
Stolen data is transmitted to a command and control (C2) server hosted on a legitimate automation platform called Pipedream. This process allows the threat actors to maintain control over the stolen information while camouflaging their activities behind a legitimate service, making detection more challenging.
Impact on Developers
Victim Statistics
In total, 222 developers downloaded the malicious packages before they were reported and subsequently removed from PyPI. The majority of these downloads originated from the United States, followed by countries like China, Russia, Germany, Hong Kong, and Canada. The swift action taken by Positive Technologies and PyPI in quarantining the packages helped mitigate further threats, though the impact on those who downloaded them could still be significant.
Immediate Actions for Affected Developers
For developers who may have inadvertently installed these malicious packages, it is crucial to take immediate precautions to secure their environments. Here are recommended steps:
- Rotate API Keys: Update any API keys that could have been exposed.
- Change Passwords: Alter passwords for accounts that may be linked to the compromised credentials.
- Review Access Permissions: Check cloud and service accounts to determine if any unauthorized access has occurred.
- Conduct Security Audits: Assess the potential vulnerabilities in the system that could be targeted by further malicious activities.
Summary of Security Measures
The incident surrounding the deepseeek and deepseekai packages underscores the importance of vigilance in software development environments. Developers should ensure they are downloading software from reliable sources and routinely audit their systems for security vulnerabilities. By taking proactive measures and staying informed about potential threats, developers can better protect their projects and sensitive information from malicious actors.