EHA
Home Hacks Hackers Abusing StackOverflow to Trick Victims into Downloading Windows Malware

Hackers Abusing StackOverflow to Trick Victims into Downloading Windows Malware

0

A malicious PyPI package called “pytoileur” was flagged by automated detection systems, which disguised itself as an API management tool written in Python. It downloaded trojanized Windows binaries upon installation, aiming to steal cryptocurrency, monitor user activity, and establish persistence. 

“Pytoileur” is part of a larger “Cool Package” campaign that uses typosquatting (e.g., referencing “pystob” instead of “Pyston”) to target developers, which was downloaded 264 times before being taken down. 

Project description

A suspicious package on PyPI by a new user, PhilipsPY, contains a hidden malicious code in its setup.py file, as the code is cleverly concealed using excessive whitespaces after an ordinary print statement, making it easy to miss unless noticing the unusual scrollbar. 

The malicious code itself is base64-encoded, a common technique but not inherently suspicious, which aims to bypass human inspection by placing the code in a location reviewers might overlook. 

Setup.py

A malicious script encoded in Base64 downloads a Windows executable named “Runtime.exe” from a remote server by leveraging PowerShell and VBScript to install itself and persist on the system. 

It includes anti-detection techniques and drops additional executables, and one of these, “main.exe,”  steals user data from browsers like Chrome and Firefox and targets financial information from cryptocurrency wallets and payment services. 

Runtime.exe

Attackers are leveraging StackOverflow to spread a malicious Python package called “Pytoileur.” by creating a new account “EstAYA G” to recommend the package as a solution to unrelated questions, tricking developers into downloading it. 

“Pytoileur” is linked to a wider campaign from 2023 where attackers used similarly named packages (“Cool package”) with vague descriptions to deploy trojanized Windows binaries and steal cryptocurrency. 

Stack Overflow questions

The analysis by Sonatype identified malicious PyPI packages (“gpt-requests”, “pyefflorer”) targeting developers, by masquerading as legitimate tools but deploying obfuscated payloads to achieve various malicious actions. 

Lalalaopti directly attempts clipboard hijacking, persistence, keylogging, webcam access, and screenshot capture, revealing the attackers’ intent for comprehensive user data exfiltration and system control. 

Suspicious tasks

Threat actors are using primitive malicious packages on PyPI, like “lalalaopti,” to test their methods, which are likely precursors to more complex attacks. 

Researchers have identified a list of malicious packages associated with this campaign, including those targeting AI and machine learning developers (“gpt-requests”) and those targeting users of popular Python frameworks (“pystallerer”). 

In order to target a wider variety of developers and cast a wider net, attackers can use the strategy of reusing older packages that have been slightly modified. 

Also Read:

NO COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Exit mobile version