<?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>Service Principal — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/service-principal/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 14:30:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/service-principal/feed.xml" rel="self" type="application/rss+xml"/><item><title>Detection of Azure Service Principal Creation</title><link>https://feed.craftedsignal.io/briefs/2024-01-azure-sp-creation/</link><pubDate>Wed, 03 Jan 2024 14:30:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-azure-sp-creation/</guid><description>Detects the creation of a service principal in Azure, which could indicate potential attacker activity for lateral movement or persistence.</description><content:encoded><![CDATA[<p>The creation of service principals in Azure can be a legitimate administrative task, but it can also be an indicator of malicious activity. Attackers may create service principals to establish persistence, move laterally within the Azure environment, or gain unauthorized access to resources. This activity is particularly concerning when performed by unfamiliar users or from unusual locations. Monitoring for unexpected service principal creation is crucial for detecting potential security breaches in Azure environments. This alert focuses on detecting the &ldquo;Add service principal&rdquo; message within Azure Activity Logs.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to an Azure account, possibly through compromised credentials or a vulnerable application.</li>
<li>The attacker authenticates to the Azure portal or uses Azure CLI with the compromised credentials.</li>
<li>The attacker executes commands to create a new service principal using tools like Azure CLI or PowerShell.</li>
<li>Azure Activity Logs record the &ldquo;Add service principal&rdquo; event.</li>
<li>The attacker assigns roles and permissions to the newly created service principal, granting it access to specific resources.</li>
<li>The attacker leverages the service principal for lateral movement, accessing resources or services within the Azure environment.</li>
<li>The service principal is used for persistence, allowing the attacker to maintain access even if the initial access method is revoked.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful creation and misuse of a service principal can lead to unauthorized access to sensitive data, resources, and services within the Azure environment. The impact can range from data breaches and service disruption to complete control over the Azure subscription, potentially affecting hundreds or thousands of resources and users. The attacker can leverage the compromised service principal to perform actions with the permissions assigned to it, leading to significant damage and financial loss.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Azure Service Principal Created&rdquo; to your SIEM and tune for your environment to detect suspicious service principal creations.</li>
<li>Investigate any alerts generated by the &ldquo;Azure Service Principal Created&rdquo; rule (logsource: azure) by verifying the user identity, user agent, and hostname associated with the event.</li>
<li>Review and audit existing service principals and their assigned permissions to identify any anomalies or overly permissive configurations.</li>
<li>Implement multi-factor authentication (MFA) for all user accounts to reduce the risk of credential compromise and unauthorized access.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>azure</category><category>cloud</category><category>service principal</category><category>persistence</category><category>lateral movement</category></item><item><title>Azure Service Principal Removal Detection</title><link>https://feed.craftedsignal.io/briefs/2024-01-azure-service-principal-removed/</link><pubDate>Wed, 03 Jan 2024 14:27:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-azure-service-principal-removed/</guid><description>Detection of a service principal removal in Azure, potentially indicating malicious activity or an attempt to remove evidence of a compromise.</description><content:encoded><![CDATA[<p>The removal of a service principal within an Azure environment can be indicative of various activities, ranging from legitimate administrative tasks to malicious actions undertaken by threat actors attempting to cover their tracks. While service principals are routinely removed as part of lifecycle management, unauthorized or unexpected removals should be investigated promptly. This detection focuses on identifying such removals through Azure Activity Logs, allowing security teams to quickly respond to potentially suspicious events.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains unauthorized access to an Azure account through compromised credentials or other means.</li>
<li>The attacker identifies a service principal used for malicious purposes or to maintain persistence.</li>
<li>The attacker attempts to remove the service principal to evade detection or disrupt incident response efforts.</li>
<li>The attacker executes the necessary commands or uses the Azure portal to initiate the service principal removal. This action is logged in the Azure Activity Logs.</li>
<li>The Azure Activity Logs record an event with the message &ldquo;Remove service principal&rdquo;.</li>
<li>The detection rule triggers based on the &ldquo;Remove service principal&rdquo; message in the Azure Activity Logs.</li>
<li>Security analysts investigate the event, examining the user identity, user agent, and hostname associated with the removal.</li>
<li>If the removal is deemed unauthorized or suspicious, further incident response procedures are initiated.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful removal of a service principal by a malicious actor can disrupt legitimate applications relying on that principal for authentication and authorization. It can also hinder incident response efforts by eliminating a potential avenue for investigation or remediation. The impact can range from service disruptions to prolonged breaches if the attacker successfully covers their tracks. The number of affected applications and the severity of the disruption depend on the role and permissions associated with the removed service principal.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Azure Service Principal Removed&rdquo; to your SIEM and tune for your environment, focusing on identifying legitimate administrator activity to reduce false positives.</li>
<li>Investigate any detected instance of service principal removal, focusing on the user identity, user agent, and hostname from the Azure Activity Logs to determine legitimacy.</li>
<li>Review Azure AD audit logs for related activities occurring before and after the service principal removal.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>azure</category><category>service principal</category><category>stealth</category><category>cloud</category></item></channel></rss>