Recently observed malicious campaigns have abused Microsoft Build Engine (MSBuild) to execute a Cobalt Strike payload on compromised machines.
Designed for the creation of applications on Windows, MSBuild uses a project file element called ‘Tasks’ to designate components that are executed during project building, and threat actors are abusing these Tasks to run malicious code disguised as MSBuild.
Over the past week, Morphus Labs security researcher and SANS Internet Storm Center (ISC) handler Renato Marinho says, two different malicious campaigns were observed abusing MSBuild for code execution.
[ READ: Microsoft Build Engine Abused for Fileless Malware Delivery ]
The threat actors typically gain access to the target environment using a valid remote desktop protocol (RDP) account, leverage remote Windows Services (SCM) for lateral movement, and abuse MSBuild to execute the Cobalt Strike Beacon payload.
The malicious MSBuild project was designed to compile and execute specific C# code that in turn decodes and executes Cobalt Strike.
Marinho also says that, after he confirmed that Beacon was indeed used in the attack, he was also able to decrypt the communication with the command and control (C&C) server, which was SSL encrypted.
The researcher also notes that, to stay protected from such attacks, organizations should set the Windows Defender Application Control (WDAC) policy to block the Microsoft-signed applications that can allow for the execution of other code. MSBuild composes a list of such applications.
“There is a note for MSBuild.exe, though, that if the system is used in a development context to build managed applications, the recommendation is to allow MSBuild.exe in the code integrity policies,” Marinho concludes.
Related: Cobalt Strike Beacon Reimplementation ‘Vermilion Strike’ Targets Windows, Linux
Related: ‘Sunspot’ Malware Used to Insert Backdoor Into SolarWinds Product in Supply Chain Attack
Related: FBI Warns of Cuba Ransomware Attacks on Critical Infrastructure

More from Ionut Arghire
- Ransomware Gang Publishes Data Allegedly Stolen From Maritime Firm Royal Dirkzwager
- Zoom Paid Out $3.9 Million in Bug Bounties in 2022
- Malicious NuGet Packages Used to Target .NET Developers
- Google Pixel Vulnerability Allows Recovery of Cropped Screenshots
- Millions Stolen in Hack at Cryptocurrency ATM Manufacturer General Bytes
- NBA Notifying Individuals of Data Breach at Mailing Services Provider
- Adobe Acrobat Sign Abused to Distribute Malware
- Latitude Financial Services Data Breach Impacts 300,000 Customers
Latest News
- Google Suspends Chinese Shopping App Amid Security Concerns
- Verosint Launches Account Fraud Detection and Prevention Platform
- Ransomware Gang Publishes Data Allegedly Stolen From Maritime Firm Royal Dirkzwager
- Zoom Paid Out $3.9 Million in Bug Bounties in 2022
- Oleria Scores $8M Seed Funding for ID Authentication Technology
- Exploitation of 55 Zero-Day Vulnerabilities Came to Light in 2022: Mandiant
- News Analysis: UK Commits $3 Billion to Support National Quantum Strategy
- Malicious NuGet Packages Used to Target .NET Developers
