New tactics are used every day by hackers trying to get a foot in the door using malware to take over victims’ computers. Another in an endless sea of options is using the Microsoft Build Engine (MBE) to filelessly deliver malware to targeted victims.
Research firm Anomali discovered the practice about a month ago and reported it on their website last Thursday. In their blog post, the company stated that ‘Anomali Threat Research discovered a campaign in which threat actors used MSBuild - a tool used for building apps and gives users an XML schema “that controls how the build platform processes and builds software” - to filelessly deliver RemcosRAT, and RedLine stealer using callbacks. The malicious MSBuild files we observed in this campaign contained encoded executables and shellcode, with some, hosted on Russian image-hosting site, “joxi[.]net.” While we were unable to determine the distribution method of the .proj files, the objective of these files was to execute either Remcos or RedLine Stealer. The majority of the samples we analyzed deliver Remcos as the final payload.’
The files are embedded with malicious code that allows these bad actors to install backdoors, take control of the victim’s machine, and steal personal/sensitive information for identity theft or fraud.
What is Microsoft Build Engine?
Microsoft’s Build Engine is an open-source tool used by .NET and Visual Studio developers. It is used for compiling source code, packaging, testing, and deploying applications.
According to The Hacker News “In using MSBuild to filelessly compromise a machine, the idea is to stay under the radar and thwart detection, as such malware makes use of a legitimate application to load the attack code into memory, thereby leaving no traces of infection on the system and giving attackers a high level of stealth.”
So far, only one infected file has been identified as malicious by antivirus/anti-malware software (“vwnfmo.lnk”). Another uploaded to VirusTotal on April 18 (“72214c84e2.proj”) cannot be detected as malicious by any antivirus/anti-malware software. Threat researchers have identified dozens of infected files that do not appear as malicious when tested using threat resources.
What is the Threat?
Once installed, Remcos (Remote Control and Surveillance software) takes complete control of the machine, allowing the remote user to record keystrokes, access microphones, and webcams. Quasar is used for keylogging and password stealing. The threat known as Redline Stealer compromises machines by stealing credentials from browsers, VPNs, messaging programs, and hijacking cryptocurrency wallets.
Anomali threat researchers Tara Gould and Gage Male commented that “The threat actors behind this campaign used fileless delivery as a way to bypass security measures, and this technique is used by actors for a variety of objectives and motivations. This campaign highlights that reliance on antivirus software alone is insufficient for cyber defense, and the use of legitimate code to hide malware from antivirus technology is effective and growing exponentially.”
How Can Developers Stay Safe?
Now that this news is out there, Microsoft will take action to secure all files available in the MBE. However, as a developer, never download files from untrusted sources. Review the code within the files before executing files or installing anything. Additionally, take these steps to stay safe: