"PyPI Users Targeted With PoweRAT Malware"

Security researchers at Phylum have identified a malicious attack targeting Python Package Index (PyPI) users with the PoweRAT backdoor and information stealer.  The campaign was first detected on December 22, 2022, when a malicious package named PyroLogin was identified as Python malware designed to fetch code from a remote server and execute it silently.  The researchers noted that between December 28 and 31, they observed five additional packages containing code similar to PyroLogin being published to PyPI: EasyTimeStamp, Discorder, Discord-dev, Style.py, and PythonStyles.  The infection chain, which involves the execution of various scripts and the abuse of legitimate operating system functions, begins with a setup.py file, meaning that the malware is automatically deployed if the malicious packages are installed using Pip.  The researcher's analysis of the execution process revealed the use of obfuscation and attempts to prevent static analysis.  A message claiming "dependencies" are being installed is displayed to prevent raising victims' suspicion while the malicious code is executed in the background.  The researchers noted that the infection chain also includes the installation of multiple potentially invasive packages, including libraries that allow the attackers to control and monitor mouse and keyboard input, capture the screen, and dropping malicious code into the Windows startup folder for persistence.  Once up and running on the victim's machine, the malware allows the attackers to steal sensitive information such as browser cookies and passwords, crypto wallets, Discord tokens, and Telegram data.  The harvested information is exfiltrated in a ZIP archive.  Acting as a command-and-control (C&C) client, the researchers noted that the Flask app allows the attackers to extract information such as usernames, IPs, and machine details, run shell commands, download and execute remote files, and even run arbitrary Python code.  The malware, which functions as an information stealer combined with a remote access trojan (RAT), also contains a function that sends to the attackers a constant stream of images of the victim's screen and allows them to trigger mouse click and button presses.  The malware is named Xrat, but Phylum decided to call it PoweRAT "because of its early reliance on PowerShell in the attack chain."  The researchers noted that even if the attacker fails to establish persistence or fails to get the remote desktop utility working, the stealer portion will still ship off whatever it found.  

 

SecurityWeek reports: "PyPI Users Targeted With PoweRAT Malware"

Submitted by Anonymous on