Cybersecurity experts have uncovered a malicious malware campaign targeting users of the Python Package Index (PyPI) repository. Attackers have deployed fake libraries disguised as “time” utilities, secretly harvesting sensitive data, including cloud access tokens.
Rising Malware Threat in Software Supply Chains
ReversingLabs, a software supply chain security firm, identified two clusters of 20 malicious packages. Collectively, these packages have been downloaded over 14,100 times, posing a significant risk to developers and enterprises alike. Below are some of the most downloaded packages:
- snapshot-photo (2,448 downloads)
- time-check-server (316 downloads)
- time-check-server-get (178 downloads)
- time-server-analysis (144 downloads)
- time-server-analyzer (74 downloads)
- time-server-test (155 downloads)
- time-service-checker (151 downloads)
- aclient-sdk (120 downloads)
- acloud-client (5,496 downloads)
- acloud-clients (198 downloads)
- acloud-client-uses (294 downloads)
- alicloud-client (622 downloads)
- alicloud-client-sdk (206 downloads)
- amzclients-sdk (100 downloads)
- awscloud-clients-core (206 downloads)
- credential-python-sdk (1,155 downloads)
- enumer-iam (1,254 downloads)
- tclients-sdk (173 downloads)
- tcloud-python-sdks (98 downloads)
- tcloud-python-test (793 downloads)
Hidden Malicious Functions
The first set of malicious packages was designed to siphon data to the attackers’ infrastructure, while the second cluster masqueraded as cloud client utilities supporting Alibaba Cloud, Amazon Web Services, and Tencent Cloud. These packages facilitated unauthorized access to sensitive credentials.
All identified packages have since been removed from PyPI, but the damage may already be done for users who installed them before their takedown.
Further investigation revealed that three compromised packages—acloud-client, enumer-iam, and tcloud-python-test—were listed as dependencies in a GitHub project named accesskey_tools. This project, which has been forked 42 times and starred 519 times, inadvertently contributed to the spread of malicious code.
A key indicator of the threat emerged from a commit referencing tcloud-python-test on November 8, 2023, confirming that the package has been available for download since then. Statistics from pepy.tech indicate that it has been downloaded 793 times.
This warning follows another alarming disclosure from Fortinet FortiGuard Labs, which identified thousands of suspicious packages across PyPI and npm. Many of these were found to contain hidden install scripts designed to execute malicious code or establish unauthorized communication with external servers.
“Suspicious URLs are a key indicator of potentially malicious packages, as they are often used to download additional payloads or establish command-and-control (C&C) connections,” explained cybersecurity researcher Jenna Wang.
“In 974 packages, these URLs present a high risk of data exfiltration, malware deployment, and further system compromise. It is crucial to monitor external URLs in package dependencies to prevent exploitation.”
Mitigating the Risks
Developers and security teams must remain vigilant when incorporating open-source dependencies. Best practices include:
- Regularly auditing dependencies for unusual activity.
- Verifying package authenticity by checking commit histories and contributor reputations.
- Monitoring for suspicious outbound connections that might indicate data exfiltration.
As open-source ecosystems continue to face increasing threats, robust security measures are more critical than ever to safeguard user data and infrastructure integrity.