Beware Of Malicious Python Packages That Steal Users Sensitive Data

Malicious Python packages uploaded by “dsfsdfds” to PyPI infiltrated user systems by exfiltrating sensitive data to a Telegram bot likely linked to Iraqi cybercriminals. 

Active since 2022 and containing more than 90,000 Arabic messages, it has functioned as both a command-and-control center and an underground marketplace for social media manipulation tools. 

It highlights a broader cybercriminal network, emphasizing the need for in-depth investigation and collaboration within cybersecurity communities.

A malicious script scans the victim’s file system, particularly the root directory and DCIM folder, targeting files with extensions like .py, .php, .zip, .png, .jpg, and .jpeg.  

Once found, the script transmits both file paths and the actual data (files and photos) to the attacker’s Telegram bot without the user’s awareness. This is achieved through a hardcoded Telegram bot token and chat ID within the script, revealing the attacker’s infrastructure details.

Join our free webinar to learn about combating slow DDoS attacks, a major threat today.

Python Packages Data Exfiltration

Analysis of the exfiltrated data revealed hardcoded credentials for a Telegram bot used by the attackers.

Exploiting these credentials, researchers gained direct access to the bot and observed a significant activity history stretching back to at least 2022. 

The messages, primarily in Arabic, provided clues about the bot operator’s location and operations. By analyzing message language and content with tools like GitHub’s TeleTracker, researchers identified the operator as likely being based in Iraq. 

The bot’s activity suggested it was part of a network of bots controlled by the same actor.

Initially, the bot functioned as an underground marketplace, offering various illicit services, which included purchasing social media engagement metrics like views and followers, spam services, and discounted subscriptions to streaming platforms like Netflix.

An investigation into a malicious Python package revealed a hidden Telegram bot, while further analysis of the bot’s message history uncovered evidence of a broader cybercriminal operation.  

The messages hinted at financial theft and appeared to originate from compromised systems, suggesting the packages were a successful initial attack vector and highlighting the need for a deep investigation into cybersecurity. 

In reality, the malicious packages that appeared to be isolated did in fact serve as the entry point to a more complex criminal network that was based on Telegram. 

Researchers at Checkmarx uncovered malicious Python packages on PyPI that exfiltrated user data to a Telegram bot. This exposed a larger Iraqi cybercriminal network and highlighted the dangers of a compromised developer machine. 

In an enterprise setting, such a breach could provide attackers with an initial foothold to launch further attacks within the organization’s network. 

Avoid these four Python packages: testbrojct2, proxyfullscraper, proxyalhttp, and proxyfullscrapers, as they are identified as malicious by exploiting the PyPI repository to install them on unsuspecting systems. 

Once installed, they scrape the files, including potentially sensitive ones like Python scripts, images, and compressed archives, and the stolen data is then sent to a Telegram bot controlled by cybercriminals, which exposes the system to a variety of threats, depending on the criminals’ goals, which could include financial fraud or further system compromise.

Protect Your Business Emails From Spoofing, Phishing & BEC with AI-Powered Security | Free Demo

Raga Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

Threat Actors Exploit Google Docs And Weebly Services For Malware Attacks

Phishing attackers used Google Docs to deliver malicious links, bypassing security measures and redirecting victims…

5 hours ago

Python NodeStealer: Targeting Facebook Business Accounts to Harvest Login Credentials

The Python-based NodeStealer, a sophisticated info-stealer, has evolved to target new information and employ advanced…

5 hours ago

XSS Vulnerability in Bing.com Let Attackers Send Crafted Malicious Requests

A significant XSS vulnerability was recently uncovered in Microsoft’s Bing.com, potentially allowing attackers to execute…

8 hours ago

Meta Removed 2 Million Account Linked to Malicious Activities

 Meta has announced the removal of over 2 million accounts connected to malicious activities, including…

11 hours ago

Veritas Enterprise Vault Vulnerabilities Lets Attackers Execute Arbitrary Code Remotely

Critical security vulnerability has been identified in Veritas Enterprise Vault, a widely-used archiving and content…

12 hours ago

7-Zip RCE Vulnerability Let Attackers Execute Remote Code

A critical security vulnerability has been disclosed in the popular file archiving tool 7-Zip, allowing…

12 hours ago