Mandiant researchers reported that the UNC2565 group behind the GOOTLOADER malware (aka Gootkit) continues to improve their code by adding new components and implementing new obfuscation techniques.
Gootkit runs on an access-a-as-a-service model, it is used by different groups to drop additional malicious payloads on the compromised systems. Gootkit has been known to use fileless techniques to deliver threats such as the SunCrypt, and REvil (Sodinokibi) ransomware, Kronos trojans, and Cobalt Strike.
In the past, Gootkit distributed malware masquerading as freeware installers and it used legal documents to trick users into downloading these files.
The attack chain starts with a user searching for specific information in a search engine. Attackers use black SEO technique to display a website compromised by Gootkit operators among the results.
Upon visiting the website, the victim will notice that it is presented as an online forum directly answering his query. This forum hosted a ZIP archive that contains the malicious .js file, which is used to establish persistence and drop a Cobalt Strike binary in the memory of the infected system.
In November 2022, Mandiant researchers spotted a new variant of GOOTLOADER, tracked as GOOTLOADER.POWERSHELL, that used a new infection chain. The new variant writes a second .JS file to disk and creates a scheduled task to execute it. Below is the attack chain of this new variant:
Mandiant researchers observed the UNC2565 group adopting three obfuscation techniques, such as hiding the code within altered versions of legitimate JavaScript libraries such as jQuery, Chroma.js, and Underscore.js, in an attempt to evade detection.
Variant 1 | Variant 2 | Variant 3 | |
First Observed | Feb 2021 | Oct 2021 | Nov 2022 |
Malicious Code | One obfuscated block of code, easily recognizable. | Malicious code has been nested within the file. Early samples had all the variables in one block of code, later samples spread the code throughout the file. | Malicious code has been nested throughout the file. Additional string variables added for the second deobfuscation iteration. |
Payload (See Infection Chain) | GOOTLOADER | GOOTLOADER | GOOTLOADER.POWERSHELL |
“Beginning in November 2022, Managed Defense observed a new obfuscation variant, tracked as variant 3, with modified infection that is more complex than the previous variants. This new variant contains additional string variables that are used in a second deobfuscation stage.” reads the report published by Mandiant. “This new variant has been observed trojanizing several legitimate JavaScript libraries, including jQuery, Chroma.js, and Underscore.js”
Upon successful execution of the GOOTLOADER file, additional payloads are downloaded, including FONELAUNCH and Cobalt Strike BEACON or SNOWCONE that will be stored in the registry. Then the payloads are executed via PowerShell in the later stages.
FONELAUNCH is a .NET-based launcher, it loads an encoded payload from the registry into memory. Since May 2021, the researchers have observed threat actors using three different variants of FONELAUNCH that differ in their loading mechanism:
The report published by Mandiant also includes Indicators of Compromise (IoCs) and YARA rules associated with these threats.
Follow me on Twitter: @securityaffairs and Facebook and Mastodon
(SecurityAffairs – hacking, GOOTLOADER)