Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Endpoint Security

Threat Actors Abuse MSBuild for Cobalt Strike Beacon Execution

Recently observed malicious campaigns have abused Microsoft Build Engine (MSBuild) to execute a Cobalt Strike payload on compromised machines.

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.

Advertisement. Scroll to continue reading.

“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

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

Expert Insights

Related Content

Cybercrime

The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.

Cybercrime

A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...

Malware & Threats

The NSA and FBI warn that a Chinese state-sponsored APT called BlackTech is hacking into network edge devices and using firmware implants to silently...

Endpoint Security

Today, on January 10, 2023, Windows 7 Extended Security Updates (ESU) and Windows 8.1 have reached their end of support dates.

Application Security

Virtualization technology giant VMware on Tuesday shipped urgent updates to fix a trio of security problems in multiple software products, including a virtual machine...

Cyberwarfare

An engineer recruited by intelligence services reportedly used a water pump to deliver Stuxnet, which reportedly cost $1-2 billion to develop.

Malware & Threats

Unpatched and unprotected VMware ESXi servers worldwide have been targeted in a ransomware attack exploiting a vulnerability patched in 2021.

Malware & Threats

Apple’s cat-and-mouse struggles with zero-day exploits on its flagship iOS platform is showing no signs of slowing down.