Security

Research

WASP malware stings Python developers

Info-stealing trojan hides in malicious PyPI packages on GitHub


Malware dubbed WASP is using steganography and polymorphism to evade detection, with its malicious Python packages designed to steal credentials, personal information, and cryptocurrency.

Researchers from Phylum and Check Point earlier this month reported seeing new malicious packages on PyPI, a package index for Python developers. Analysts at Checkmarx this week connected the same attacker to both reports and said the operator is still releasing malicious packages.

A Checkmarx report detailed hundreds of successful infections of the WASP info-stealer malware, and found a number of interesting features to ensure persistence in a compromised PC and to evade cybersecurity tools.

"The attack seems related to cybercrime as the attacker claims that these tools are undetectable to increase sales," wrote Jossef Harush, Checkmarx's head of engineering, noting that the malware's developer claims WASP is undetectable.

The operator is selling copies of WASP for $20 to other criminals, with payment coming in cryptocurrency or gift cards.

PyPI, an open source repository used by developers to share Python packages used in projects, is an increasingly popular target in software supply chain attacks for uploading malicious code via fake packages. The malicious packages are given names that sound legitimate or are similar to real packages, a technique called typosquatting. Developers are therefore fooled into using booby-trapped packages that appear to be useful and legit.

Check Point noted that such packages used for attacks on open source operations – not only PyPI but also others, like NPM – usually involve three steps: malicious code to download and run a virus, carrier code for sneaking the malicious code in, and luring victims – such as through typosquatting – to install the malicious package.

The community behind PyPI in August warned about the first-known phishing attack against its users.

The malicious package becomes an initial infection point if a developer loads it onto their system, with other malware following – in this case, the WASP (also referred to as W4SP) info-stealing trojan.

The Phylum analysts identified the malicious payload as W4SP, noting the attackers had created 29 copies of popular PyPI software packages in a campaign that started in October. Check Point researchers detected the use of steganography – hiding code in other files – to infect PyPI users through open source projects on GitHub.

Checkmarx also saw the use of steganography as well as polymorphic malware – where the payload changes in new installs – and the ability to remain persistent even if the system is rebooted.

"The malware is targeted at stealing all the victim's Discord accounts, passwords, crypto wallets, credit cards, and other interesting files on the victim's PC, sending them back to the attacker through a hard-coded Discord webhook address," Harush wrote.

After the malicious package is loaded, the setup script installs additional Python packages, including judyb, which provides the steganography capabilities. A .png image is downloaded and saved in the OS's temp directory, with another function in the judyb package used to extract the hidden code.

Other code is then fetched to ensure persistence through multiple reboots and to deliver the polymorphic malware, where different code is introduced after every second or third-stage URL download, according to Harush. He added that it's the first time he's seen polymorphic malware used in software supply chain attacks.

One of the URLs redirects to a link inviting others to join the attacker's Discord server, which is managed by a single Discord user. Further investigation found an account on the Steam gaming marketplace and a YouTube channel linked to the Discord user, Harush wrote.

Checkmarx analysts were able to track the WASP operator as he moved across different user accounts and notified PyPI of new activities. The crook claimed he was working on an "exe version" of the malware and was seen this week with a new identity – PyPI user "halt" – uploading typosquatting packages that also use the Starjacking technique, which is stealing GitHub Stars from a legitimate package to make the malicious one look popular.

"It seems this attack is ongoing, and whenever the security team of Python deletes his packages, he quickly maneuvers and creates a new identity or simply uses a different name," Harush wrote. ®

Send us news
9 Comments

Memory-safe languages so hot right now, agrees Lazarus Group as it slings DLang malware

Latest offensive cyber group to switch to atypical programming for payloads

US readies prison cell for another Russian Trickbot developer

Hunt continues for the other elusive high-ranking members

Microsoft touts Visual Studio Code as a Java juggernaut

2.5 million devs can't be wrong – or can they?

North Korea makes finding a gig even harder by attacking candidates and employers

That GitHub repo an interviewer wants you to work on could be malware

You can't deepfake diversity, and that's a good thing

Fresh thinking and new approaches can only come from varied cohorts of people

CISA details twin attacks on federal servers via unpatched ColdFusion flaw

Tardy IT admins likely to get a chilly reception over the lack of updates

DevTernity conference collapses amid claims women speakers were faked

Anna? Oh, she was just a demo persona, says organizer

Novel backdoor persists even after critical Confluence vulnerability is patched

Got a Confluence server? Listen up. Malware said to have wide-ranging capabilities

Fresh find shines new light on North Korea’s latest macOS malware

Months of work reveals how this tricky malware family targets... the financial services sector

MOVEit cybercriminals unearth fresh zero-day to exploit on-prem SysAid hosts

Second novel zero-day exploited by Lace Tempest this year offers notable demonstration of skill, especially for a ransomware affiliate

Open source work makes me appreciate software testing. It's not an academic exercise

Literally...

Cybercrooks amp up attacks via macro-enabled XLL files

Neither Excel nor PowerPoint safe as baddies continue to find ways around protections