<?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>GetSessionToken — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/getsessiontoken/</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 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/getsessiontoken/feed.xml" rel="self" type="application/rss+xml"/><item><title>Suspicious AWS STS GetSessionToken Usage</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-aws-sts-getsessiontoken-misuse/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-aws-sts-getsessiontoken-misuse/</guid><description>The AWS STS GetSessionToken API is being misused to create temporary tokens for lateral movement and privilege escalation within AWS environments by potentially compromised IAM users.</description><content:encoded><![CDATA[<p>The AWS Security Token Service (STS) GetSessionToken API allows IAM users to create temporary security credentials. Attackers can abuse this functionality by generating tokens with elevated privileges or for lateral movement within an AWS environment if an IAM user&rsquo;s credentials have been compromised. This activity can be difficult to detect as GetSessionToken is a legitimate function, but unusual patterns or IAM users generating tokens where it is not expected should be investigated. This activity is of particular concern because it bypasses normal IAM role assumption logging and creates a separate credential for an attacker to abuse, making access more difficult to track. The impact is significant, allowing attackers to perform actions as the compromised IAM user or escalate privileges.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to an AWS environment, potentially through compromised IAM user credentials.</li>
<li>The attacker authenticates to AWS using the compromised IAM user credentials.</li>
<li>The attacker calls the STS GetSessionToken API, specifying desired permissions or roles (if permitted by the IAM user&rsquo;s policies).</li>
<li>AWS STS generates a new set of temporary credentials (access key ID, secret access key, and session token).</li>
<li>The attacker configures their AWS CLI or SDK to use the newly acquired temporary credentials.</li>
<li>The attacker leverages these temporary credentials to perform actions within the AWS environment, potentially escalating privileges or moving laterally.</li>
<li>The attacker covers their tracks by deleting the CloudTrail logs.</li>
<li>The attacker exfiltrates sensitive data, deploys malware, or causes disruption within the AWS environment using the acquired privileges.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Compromised AWS environments can lead to data breaches, service disruptions, and financial losses. Successful exploitation via GetSessionToken misuse allows attackers to move laterally, escalate privileges, and perform unauthorized actions within the AWS infrastructure. The number of affected organizations is currently unknown, but any organization relying on AWS is potentially at risk. If successful, attackers can steal sensitive data, compromise critical systems, and disrupt business operations.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;AWS STS GetSessionToken Misuse&rdquo; to your SIEM to detect suspicious GetSessionToken API calls (see rules section).</li>
<li>Investigate GetSessionToken calls where <code>userIdentity.type</code> is <code>IAMUser</code> to determine if the request is legitimate.</li>
<li>Monitor CloudTrail logs for unusual patterns of GetSessionToken usage, particularly from unfamiliar user agents or hosts.</li>
<li>Implement strong IAM policies and MFA to minimize the risk of compromised IAM user credentials.</li>
<li>Review the false positives section of the Sigma rule to tune the rule for your specific environment.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>aws</category><category>cloud</category><category>lateral-movement</category><category>privilege-escalation</category><category>sts</category><category>GetSessionToken</category></item></channel></rss>