Temporary Advertisements:
Ad
Ad
Ad
SSH keys stolen by stream of malicious PyPI and npm packages
by En3ronthegreat - Thursday September 28, 2023 at 02:46 PM
#1
A stream of malicious npm and PyPi packages have been found stealing a wide range of sensitive data from software developers on the platforms.

The campaign started on September 12, 2023, and was first discovered by Sonatype, whose analysts unearthed 14 malicious packages on npm.

Phylum reports that after a brief operational hiatus on September 16 and 17, the attack has resumed and expanded to the PyPI ecosystem.

Since the start of the campaign, the attackers have uploaded 45 packages on npm (40) and PyPI (5), with variants in the code indicating a rapid evolution in the attack.

Malicious packages
The complete list of the malicious packages distributed in this campaign can be found in the bottom section of Phylum's report.

However, it is worth noting that the following packages utilized typosquatting to resemble legitimate popular packages, which can trick developers into installing them:

According to Phylum, at least seven distinct attack waves and several phases featured code modifications to enhance stealth and add more specific targeting.

The first attack waves occurred between September 12 and 15, with the threat actors uploading new package sets daily, reaching a total of 33 packages.

The later attack waves occurred on September 18 (three packages), September 20 (five packages), and September 24 (4 packages).

In the initial waves, the packages had hardcoded data collection and exfiltration routines, containing the data collection code in plain text form internally, which made them susceptible to detection.

The middle iterations introduced more complex mechanisms like retrieving and executing the data-collecting bash script from an external domain.

The most recent packages utilized base64 encoding to evade analysis, which was later upgraded to double base64 encoding.

In general, the attackers engaged in a continuous code testing and refinement process and even delivered packages that specialized in some aspects of data collection more than others.

Info-stealing threat
The data stolen by the packages includes sensitive machine and user information.

Collected machine and user details include hostname, username, current path, OS version, external and internal IP addresses, and Python version for PyPI packages.

These details and the Kubernetes configurations stored on kubeconfig files and SSH private keys in ~/.ssh/id_rsa are written in a text file (ConceptualTest.txt) and sent to the attackers' servers.


The stolen information can be used to expose the real identities of developers and give the attackers unauthorized access to systems, servers, or infrastructure accessible through the stolen SSH private keys.

If stolen Kubernetes configurations contain credentials to access clusters, the attackers could modify deployments, add malicious containers, access sensitive data stored in the cluster, move laterally, or launch a ransomware attack.

Users of code distribution platforms such as PyPI and npm are advised to be cautious with what packages they download and launch on their systems, as there's a constant influx of malware in those ecosystems.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  NO LOGS VPN: Best VPN for clear and dark web Crockett 373 75,585 Sep 06, 2026, 02:15 AM
Last Post: 1330winter1300
  MFA Prompt Bombing meshki 3 621 Sep 02, 2026, 01:03 PM
Last Post: loshadkaggg
  Spy Tech: The GPS Numbers Station joepa 0 410 Jun 09, 2026, 07:03 PM
Last Post: joepa
  Plug-in for privacy amn319 16 2,553 Jun 06, 2026, 05:43 AM
Last Post: meshki
  RCE flaw in Gogs from a path traversal in the PutContents API agent_peanut 5 1,053 Jun 06, 2026, 05:42 AM
Last Post: meshki

Forum Jump:


 Users browsing this forum: