Malicious PyPI package installs Crytominer on Linux Systems
A malicious PyPI package identified as secretslib is used by Monero cryptominer on Linux systems. The malicious package activity was uncovered by security researchers at Sonatype.
Although secretslib describes itself as “secrets matching and verification made easy,” careful research by researchers shows that the package is embedded with the ability to run cryptominers on users’ Linux machines directly from their RAM.
After the installation, secretslib downloads a file called tox and gives it permission to execute, and run at an elevated level. As soon as it runs, the files are deleted. According to researchers, the malicious code dropped by tox is a cryptominer that mines the privacy coin Monero.
Researchers explained that “tox” is an executable Linux file, an ELF binary that is stripped. Stripping an executable file means removing debugging information contained in it that would otherwise help a reverse engineer understand what the program does.
“The package covertly runs cryptominers on your Linux machine in memory (directly from your RAM), a technique largely employed by fileless malware and crypters. The package covertly runs cryptominers on your Linux machine in memory (directly from your RAM), a technique largely employed by fileless malware and crypters,” Sonatype researcher Ax Sharma said in a report.
While the package claims to help synchronize and verify secrets, researchers have been unable to identify any code that would help a developer “synchronize” or verify secrets of any kind.
The sources for this piece include an article in DEVELOPER.