Researchers uncover 29 malicious PyPI packages targeting developers
Threat actors are distributing malicious Python packages to the popular Python Package Index (PyPI) service, using authentic-sounding file names, and hidden imports to deceive developers and steal their data.
The W4SP malware is a data-stealing Python package that is used to steal information. Stealer was discovered by the software supply chain firm Phylum and owned 29 packages in the Python Package Index (PyPI), the official third-party software repository for the Python programming language. The packages also receive relatively harmless names or names that resemble legitimate packages, a practice known as typosquatting. The typosquatting trick resulted in over 5,700 downloads of the packages.
In an effort to contaminate developers’ systems with the W4SP Stealer, an open-source, Python-based trojan designed to steal information about cryptocurrencies, steal data, collect login details from developers’ systems, browser cookies, system metadata, Discord tokens, and data from the MetaMask, the attackers create fake Python packages and apply basic techniques.
The attack began around October 12, 2022 and culminated on October 22. The malicious import was simply injected into the majority of packages’ setup.py or init.py files, especially the older ones. The list of affected packages is as follows: typesutil, typestring, sutiltype, duonet, fatnoob, strinfer, pydprotect, incrivelsim, twyne, pyptext, installpy, faq, colorwin, requests-httpx, colorsama, shaasigma, stringe, felpesviadinho, cypress, pystyte, pyslyte, pystyle, pyurllib, algorithmic, oiu, iao, curlapi, type-color, and pyhints.
The ultimate goal of the attack is to “install the information-stealing trojan W4SP Stealer, which lists the victim’s system, steals passwords stored in the browser, targets cryptocurrency wallets, and searches for interesting files using keywords, such as ‘bank’ and ‘secret,'” Phylum said.
The sources for this piece include an article in TheHackerNews.