Numerous Harmful Python Packages Detected Extracting Confidential Information
Numerous Harmful Python Packages Detected Extracting Confidential Information

Image: Sigmund (unsplash)

A pernicious endeavor observed by researchers to have intensified in intricacy over recent months has been distributing on open-source platforms an alarming number of packages designed to extract valuable information. These packages have seen an estimated 75,000 downloads.

The initiative has been under close observation since the beginning of April by experts from the Checkmarx’s Supply Chain Security team. These experts identified 272 packages containing code designed to extract sensitive data from specific systems.

Over time, this malicious activity has undergone significant evolution. The creators of these packages have integrated progressively advanced obfuscation methods and techniques to evade detection.

Information and Cryptocurrency Extraction

From early April 2023, the researchers detected a recurring pattern within the Python environment.

One distinct sample is the “_init_py” file. This file initiates only after verifying that it operates on a specific target system and not within a virtualized environment. This behavior is a common indicator of a malware examination host.

When activated, it focuses on extracting the following details from the infected systems:

  1. Active antivirus tools on the device.
  2. Tasks list, system details, and Wi-Fi passwords.
  3. Saved credentials, browsing history, cookies, and payment data on internet browsers.
  4. Information within cryptocurrency apps, such as Atomic and Exodus.
  5. Data from Discord, including badges, contact numbers, email IDs, and nitro status.
  6. User data from Minecraft and Roblox.

Moreover, this harmful software can capture screen images and extract specific files from the affected systems, including directories like Desktop, Pictures, Documents, and more.

The software also constantly observes the victim’s clipboard for cryptocurrency details. It then replaces the legitimate addresses with the perpetrator’s address, redirecting payments to their wallets. The experts approximate that this initiative has directly siphoned off around $100,000 in cryptocurrency.

Application Tampering

According to Checkmarx, the harmful software in this initiative exhibits behavior exceeding regular information extraction endeavors. It interferes with application data to inflict more substantial harm.

For instance, the electron archive of the Exodus cryptocurrency app is modified to adjust essential files, thereby allowing perpetrators to circumvent Content-Security-Policy and transmit data.

In the case of Discord, given certain conditions, the harmful software incorporates a JavaScript code that activates upon client reboot.

Furthermore, the software uses a PowerShell script in a heightened terminal to alter Windows “hosts.” This ensures that security applications on the compromised device fail to communicate with their primary servers.

Attack Progression

The experts mention that the detrimental code in April’s packages was transparent, being in an unencrypted format.

However, by May, package creators began implementing encryption to obstruct scrutiny. Come August, multi-layered obfuscation was observed.

In a distinct report by Checkmarx’s expert, Yahuda Gelb, it was highlighted that two of the newest packages had no fewer than 70 obfuscation layers.

By the same month, the creators of the harmful software included a function to disable antivirus tools, incorporated Telegram in the list of targeted apps, and introduced an alternative data extraction method.

The experts emphasize that open-source networks and developer environments remain vulnerable to such intrusive attacks. Malicious agents continue to upload detrimental packages onto popular repositories and version control systems daily.

Individuals are advised to thoroughly vet the projects and package creators they trust and remain wary of typo-squatted package titles.

A compilation of the harmful packages associated with this initiative can be accessed at the provided link.