Sonatype, an information security company, discovered that the PyPI repository openly advertises an infostealer that can steal confidential data and send it to the attacker's Discord server.
Researchers at Sonatype linked the campaign to Spanish-based MaaS-based SylexSquad. The group's malware has the uncomplicated name "reverse-shell". A reverse shell is a scheme in which the attacker's machine acts as a server and the victim's machine acts as a client and initiates a connection to the attacker's listening server.
It turned out that the program is much more than a simple reverse shell. The program is capable of stealing the following information:
- Browser history;
- Files from the "Downloads" folder;
- Credit card details;
"The infostealer has a low degree of obfuscation and looks like a Discord bot that executes commands on the infected machine. Malware can extract cookies, take screenshots, run shell commands, steal browsing history and send all this data to the attacker's Discord server," experts say.
In addition, the functions of the program include the options "Clone a GitHub repository and execute a file", "Replace with the URL of the GitHub repository" and "The path where you want to clone the repository." Options indicate that the program works according to the MaaS model.
Experts believe that such an open publication in a public repository can be a way for the group to deliberately draw attention to their product. In addition, hosting malicious files on PyPI gives attackers more control over them - hackers have the ability to delete, update, or even control payload versions.
Among other benefits, hosting on PyPI allows malware to be distributed much more widely and can confuse many antivirus programs that use common signatures, such as actual bytes, to determine whether a file is malicious or not.
In other words, instead of pre-delivering malware that virus scanners can quickly detect, hackers can simply link to their malicious code elsewhere. By providing a link to GitHub, attackers may bypass this check.