Python PyPI Supply Chain Attack: Hackers Hide Malware in Fake DeepSeek Packages

by | Feb 4, 2025 | News




Join our Patreon Channel and Gain access to 70+ Exclusive Walkthrough Videos.

Patreon
Reading Time: 3 Minutes

Cybersecurity researchers at the Positive Technologies Expert Security Center (PT ESC) have uncovered a malware campaign targeting the Python Package Index (PyPI), a widely used repository for Python software. The attack specifically targeted developers, machine learning engineers, and AI enthusiasts who might integrate DeepSeek AI into their projects.

Discovery of the Attack

  • The attack began on January 29, 2025, when a suspicious user named “bvk” uploaded two malicious packages: deepseeek and deepseekai.
  • The account had been inactive since its creation in June 2023.
  • These packages mimicked legitimate DeepSeek integrations but contained malicious code designed to steal sensitive information.

Hackers Hide Malware in Fake DeepSeek PyPI PackagesMalicious DeepSeek packages (Via PT ESC)

Malicious Package Behavior

  • Once installed, the malware executed commands that:

    • Collected system information.
    • Stole environment variables, which often contain credentials for cloud storage, database access, or infrastructure resources.
    • Sent the stolen data to a command-and-control (C2) server hosted on Pipedream, a developer integration platform.
  • Researchers suspect that AI-powered tools were used to generate parts of the malware, as evidenced by comments in the malicious code.

See Also: So, you want to be a hacker?
Offensive Security, Bug Bounty Courses




Discover your weakest link. Be proactive, not reactive. Cybercriminals need just one flaw to strike.

Rapid Response and Removal

  • Positive Technologies immediately alerted PyPI administrators, who quarantined and deleted the packages within an hour.
  • Despite the swift response, the packages were downloaded 222 times before removal.

Download Statistics by Country

  • United States – 117 downloads
  • China – 36 downloads
  • Russia – 12 downloads
  • Other downloads reported in Germany, Canada, and Hong Kong.

Exploiting DeepSeek’s Popularity

  • The attack highlights how cybercriminals exploit trending technologies to deceive users.

  • DeepSeek’s growing user base made it an attractive target for threat actors.

  • Jason Soroko, Senior Fellow at Sectigo, emphasized the importance of securing open-source ecosystems, stating:
    “This report underscores how attackers exploit trusted naming conventions and the reliance on authentic package sources within the open-source ecosystem. While the threat was neutralized quickly, it serves as a reminder of the growing risks associated with software supply chains.”




Protecting Yourself from Similar Threats

  • Use Security Tools – Services like PyAnalysis monitor PyPI for malicious activity in real time.
  • Verify Package Sources – Download only from trusted and well-established repositories.
  • Scan Dependencies – Analyze package code before installing.
  • Monitor Environment Variables – Limit exposure of sensitive system data.

Are u a security researcher? Or a company that writes articles about Cyber Security, Offensive Security (related to information security in general) that match with our specific audience and is worth sharing? If you want to express your idea in an article contact us here for a quote: [email protected]

Source: hackread.com

Source Link

Merch

Recent News

EXPLORE OUR STORE

Offensive Security & Ethical Hacking Course

Begin the learning curve of hacking now!


Information Security Solutions

Find out how Pentesting Services can help you.


Join our Community

Share This