<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Iac - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/iac/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 19 Jun 2026 15:50:17 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/iac/feed.xml" rel="self" type="application/rss+xml"/><item><title>Azure VM Managed Run Command Abuse for Execution and Persistence</title><link>https://feed.craftedsignal.io/briefs/2026-06-azure-vm-run-command-abuse/</link><pubDate>Fri, 19 Jun 2026 15:50:17 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-06-azure-vm-run-command-abuse/</guid><description>Adversaries can abuse the Azure VM Managed Run Command feature (MICROSOFT.COMPUTE/VIRTUALMACHINES/RUNCOMMANDS/WRITE) to achieve code execution as System or root and establish persistence on Azure Virtual Machines or Virtual Machine Scale Sets by an unusual identity, potentially evading detections focused solely on action-based Run Commands.</description><content:encoded><![CDATA[<p>Adversaries are known to leverage legitimate cloud platform functionalities for malicious purposes, and the Azure VM Managed Run Command is one such target. This feature allows for the creation or update of a persistent resource on an Azure Virtual Machine or Virtual Machine Scale Set, which executes a supplied script with high privileges (System on Windows, root on Linux). Unlike the ephemeral &quot;runCommand/action,&quot; the managed Run Command, identified by operations such as &quot;MICROSOFT.COMPUTE/VIRTUALMACHINES/RUNCOMMANDS/WRITE,&quot; leaves a durable object, making it suitable for establishing persistence. This technique allows attackers to evade detection mechanisms that primarily monitor transient command executions. Detection focuses on identifying instances where an identity that has not previously performed this operation initiates a managed run command, signaling unusual or unauthorized activity.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li><strong>Initial Access:</strong> An attacker gains initial access to an Azure environment, typically through compromised credentials for an Azure Active Directory principal with sufficient permissions (e.g., Virtual Machine Contributor, Owner role on a resource group or subscription).</li>
<li><strong>Reconnaissance:</strong> The attacker identifies target Azure Virtual Machines or Virtual Machine Scale Sets that can be accessed and abused for execution and persistence.</li>
<li><strong>Defense Evasion:</strong> To avoid detection by security tools monitoring common execution methods, the attacker opts to use the less commonly scrutinized Managed Run Command (<code>runcommands/write</code>) instead of the action-based <code>runCommand/action</code>.</li>
<li><strong>Execution via Managed Run Command:</strong> The compromised principal creates or updates a Managed Run Command resource on the target VM/VMSS, embedding a malicious script. This action executes the script as System (Windows) or root (Linux) upon creation/update.</li>
<li><strong>Persistence Establishment:</strong> The Managed Run Command resource itself serves as a persistent backdoor, allowing the attacker to re-execute the script or maintain a foothold.</li>
<li><strong>Command and Control (C2):</strong> The executed script establishes a C2 channel, allowing the attacker to remotely control the compromised VM.</li>
<li><strong>Lateral Movement / Data Exfiltration:</strong> With C2 established and high privileges, the attacker proceeds with further objectives, such as lateral movement within the Azure environment or exfiltration of sensitive data.</li>
<li><strong>Impact:</strong> The attacker maintains control and can perform arbitrary actions on the compromised virtual machine.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this technique grants adversaries System (Windows) or root (Linux) level code execution on targeted Azure Virtual Machines and Virtual Machine Scale Sets. This leads to persistent access to the compromised resources, allowing attackers to establish command and control, deploy additional malware, steal sensitive data, pivot to other resources within the Azure subscription, or disrupt operations. The persistent nature of the managed run command means that even after a potential reboot, the attacker's script could re-execute, maintaining the breach. While specific victim counts are not available for this technique, it poses a significant risk to any organization utilizing Azure IaaS with insufficient logging or monitoring.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the provided Sigma rules to your SIEM solution to detect suspicious Azure Managed Run Command operations.</li>
<li>Configure Azure Activity Logs to be ingested into your SIEM for correlation and analysis, specifically for the <code>MICROSOFT.COMPUTE/VIRTUALMACHINES/RUNCOMMANDS/WRITE</code> operation.</li>
<li>Baseline expected service principals, managed identities, and administrator users that legitimately create or update Azure VM Managed Run Commands and exclude them from alerting to reduce false positives.</li>
<li>Investigate <code>azure.activitylogs.identity.authorization.evidence.principal_id</code> for any unusual principal executing managed run commands.</li>
<li>Review the RBAC roles assigned to principals triggering these alerts, focusing on least privilege.</li>
<li>Correlate alerts with <code>source.ip</code> to identify if the activity originates from unusual or untrusted IP addresses.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>cloud</category><category>azure</category><category>execution</category><category>persistence</category><category>defense-evasion</category><category>vm</category><category>iac</category></item></channel></rss>