HomeSecurityDozens of PyPI packages found to be "dropping" info-stealing malware W4SP

Dozens of PyPI packages found to be leaking info-stealing malware W4SP

Over two dozen Python packages in the PyPI registry were found to spread info-stealing malware, as researchers discovered.

Most of them contain obfuscated code that drops the “W4SP” info-stealer onto infected machines, while others use malware that is supposedly created only for “educational purposes”.

See also: Vodafone Italia reveals data breach – a reseller was hacked

PyPI

31 typosquats drop ‘W4SP’ info-stealer

Researchers identified over two dozen Python packages in the PyPI registry that mimic popular libraries, but instead they drop info-stealers as they infect machines.

The packages are typosquats (see below) – that is, the threat actors who published them intentionally named them similar to well-known Python libraries, in the hope that developers trying to retrieve the real library will make a spelling mistake and accidentally retrieve one of the malicious libraries.

Yesterday, the company Phylum, which operates in the software supply chain security field, disclosed 29 packages in its report.

  1. algorithmic
  2. colorsama
  3. colorwin
  4. curlapi
  5. cypress
  6. duonet
  7. FAQ
  8. fatnoob
  9. felpesviadinho
  10. iao
  11. incrivelsim
  12. installpy
  13. oiu
  14. pydprotect
  15. pyhints
  16. pyptext
  17. pyslyte
  18. pystyle
  19. pystyte
  20. pyurllib
  21. requests-httpx
  22. shaasigma
  23. strinfer
  24. stringe
  25. sutiltype
  26. twyne
  27. type-color
  28. typestring
  29. typesutil

The research showed that the “typesutil” threat injects malicious code into code bases that come from legitimate libraries. This particular issue of importing via the “__import__” statement is something we have seen many times.

info-stealing malware
Thousands of PyPI packages were found to "drop" info-stealing malware W4SP

In the report, the researchers explain in great detail the challenges they faced while analyzing the obfuscated code that spans over 71,000 characters, which was «quite a bit of mud» they had to get through.

See also: Emotet returns after a five-month hiatus

Ultimately, researchers discovered that the malware in these packages was W4SP Stealer. This exfiltrates Discord tokens, cookies , and saved passwords from your device.

According to the statistics from Pepy.tech, Phylum researchers report that all packages combined have been downloaded more than 5,700 times.

PyPI

Additionally, software developer and researcher Hauke Lübbers discovered the PyPI packages “pystile” and “threadings” that contain malware masquerading as the “GyruzPIP”.

Thousands of PyPI packages were found to "drop" info-stealing malware W4SP

The researcher noted that this malicious software is based on an open-source project called evil-pip. They warn, however, that this project was published for “educational purposes only”.

The code inside these two typosquats was very simple to parse: with each function name stating its purpose, e.g. stealing Chrome, browser cookies, Discord tokens, and uploading this data to a Discord.

PyPI

Lübbers, who has reported these packages to PyPI maintainers, told BleepingComputer that for these projects to exhibit malicious behavior, they would likely need to be included as dependencies in a program.

See also: Hackers managed to introduce SocGholish malware into hundreds of news sites

The incident of this week is just one of the many recent typosquatting attacks that target developers who use open-source software distribution platforms such as PyPI and npm.

PyPI (Python Package Index) is a software repository for the Python programming language. It is similar to CPAN, the repository for Perl. PyPI helps you find and install software that has been developed and shared by the Python community. Currently there are more than 350,000 Python packages available on PyPI.

Information source: bleepingcomputer.com

📧
Subscribe to the SecNews Newsletter

The most important Security & Technology news in your Inbox.

Teo Ehc
Teo Ehchttps://www.secnews.gr
Be the limited edition.

SEARCH

FOLLOW US

📧
Newsletter SecNews
The most important Security & Technology news in your inbox.

LIVE NEWS