Researchers from Kaspersky discovered a sophisticated malware, dubbed StripedFly, that remained under the radar for five years masquerading as a cryptocurrency miner.
In 2022, the researchers detected within the WININIT.EXE process an older code that was associated with the NSA-linked Equation malware. Further analysis revealed that the malware has been used since at least 2017. Kaspersky discovered that the detections between 2017 and 2022 had previously misclassified as a cryptocurrency miner.
The malicious code has a complex modular structure that supports both Linux and Windows. The malicious code relies on a built-in TOR network tunnel for C2 communications, it supports an update and delivery functionality through trusted services such as GitLab, GitHub, and Bitbucket.
Kaspersky researchers discovered that over one million updates have been downloaded from the C2 infrastructure since 2017.
The StripedFly malware includes a custom EternalBlue SMBv1 exploit that was used to infiltrate targets’ systems.
“The kernel shellcode, delivered via an exploit, injects an additional shellcode into the user space. The payload is then deployed, which includes a framework with plugin-like expandable functionality along with an extremely lightweight TOR network client. Once this process is completed, the gates are permanently sealed, and the malware proceeds to disable the SMBv1 protocol on the infected system.” reads the analysis published by Kaspersky. “The worming functionality attempts to propagate within the local network, relying not only on the exploit but also on the SSH protocol, using keys found on the victim’s machine.”
The malware uses different techniques to maintain persistence depending on the presence of the PowerShell interpreter and the privileges granted for the process. Typically, it modifies the registry or creates scheduler tasks on Windows systems. The experts reported that the malicious code also uses multiple methods on Linux as well.
The functionality within the malware modules are divided into two types, service and extended functionality modules.
The malware uses the modules for storing its configuration, upgrading and uninstalling itself, establishing a reverse proxy, harvesting credentials, performing reconnaissance and files, taking screenshots, executing processes, recording microphone input, and mining for Monero.
While investigating this malware, Kaspersky also discovered an apparently related ransomware variant called. Similarities include the Tor client and multiple modules observed in StripedFly.
“What was the real purpose? That remains a mystery. While ThunderCrypt ransomware suggests a commercial motive for its authors, it raises the question of why they didn’t opt for the potentially more lucrative path instead. The prevailing narrative often centers around ransomware actors collecting anonymous ransoms, but this case seems to defy the norm.” concludes the report”The question remains, but only those who crafted this enigmatic malware hold the answer. It’s difficult to accept the notion that such sophisticated and professionally designed malware would serve such a trivial purpose, given all the evidence to the contrary.”
Follow me on Twitter: @securityaffairs and Facebook and Mastodon
(SecurityAffairs – hacking, StripedFly)