<?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>Attack.t1078.002 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/attack.t1078.002/</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>Thu, 11 Jul 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/attack.t1078.002/feed.xml" rel="self" type="application/rss+xml"/><item><title>Malicious Usage of AWS IMDS Credentials Outside of Expected Services</title><link>https://feed.craftedsignal.io/briefs/2024-07-aws-imds-abuse/</link><pubDate>Thu, 11 Jul 2024 00:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-07-aws-imds-abuse/</guid><description>Compromised EC2 instances may be leveraged to exfiltrate and misuse AWS Instance Metadata Service (IMDS) credentials to perform actions outside of the expected AWS Simple Systems Manager (SSM) service, indicating potential lateral movement or data exfiltration.</description><content:encoded><![CDATA[<p>This activity focuses on the potential misuse of AWS Instance Metadata Service (IMDS) credentials. When an EC2 instance is compromised, an attacker can extract the temporary credentials stored within the IMDS. These credentials, associated with an assumed role, grant the attacker the ability to interact with other AWS services. The abnormal use of these credentials outside of the expected AWS Simple Systems Manager (SSM) service may indicate malicious activity such as lateral movement, data exfiltration, or resource compromise. This is particularly concerning when the compromised instance is being used as a pivot point to access other AWS resources.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An EC2 instance is compromised through an initial access vector (e.g., software vulnerability, misconfiguration, or credential compromise).</li>
<li>The attacker gains access to the compromised EC2 instance&rsquo;s operating system.</li>
<li>The attacker queries the IMDS endpoint (http://169.254.169.254/latest/meta-data/iam/security-credentials/) to obtain temporary AWS credentials associated with the instance&rsquo;s IAM role.</li>
<li>The attacker configures their local AWS CLI or SDK with the exfiltrated credentials.</li>
<li>The attacker attempts to perform actions against other AWS services using the exfiltrated credentials.</li>
<li>The attacker attempts to escalate privileges or move laterally within the AWS environment.</li>
<li>The attacker attempts to access, modify, or exfiltrate sensitive data from other AWS services.</li>
<li>The attacker maintains persistence by creating new IAM users or roles with excessive permissions.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to unauthorized access to sensitive data stored in AWS services such as S3, DynamoDB, and RDS. This could result in data breaches, financial loss, and reputational damage. Attackers can also leverage the compromised credentials to pivot to other AWS resources, potentially impacting critical infrastructure and services. Organizations with lax security configurations and overly permissive IAM roles are at higher risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Malicious Usage Of IMDS Credentials Outside Of AWS Infrastructure&rdquo; to your SIEM and tune for your environment to detect anomalous use of IMDS credentials.</li>
<li>Review and restrict IAM roles assigned to EC2 instances to follow the principle of least privilege, limiting the scope of potential damage from credential exfiltration.</li>
<li>Monitor CloudTrail logs for unusual API calls originating from EC2 instances with assumed roles, specifically those not related to SSM.</li>
<li>Harden EC2 instances to prevent initial compromise by applying security patches, configuring strong authentication, and regularly scanning for vulnerabilities.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>attack.privilege-escalation</category><category>attack.initial-access</category><category>attack.persistence</category><category>attack.stealth</category><category>attack.t1078</category><category>attack.t1078.002</category></item></channel></rss>