<?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>AWS STS — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/aws-sts/</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 18:22:30 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/aws-sts/feed.xml" rel="self" type="application/rss+xml"/><item><title>Suspicious AWS SAML Activity Detection</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-aws-suspicious-saml/</link><pubDate>Wed, 03 Jan 2024 18:22:30 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-aws-suspicious-saml/</guid><description>This rule identifies suspicious SAML activity in AWS, such as AssumeRoleWithSAML and UpdateSAMLProvider events, which could indicate an attacker gaining backdoor access, escalating privileges, or establishing persistence.</description><content:encoded><![CDATA[<p>This detection identifies potentially malicious Security Assertion Markup Language (SAML) activity within Amazon Web Services (AWS). The activity includes monitoring for <code>AssumeRoleWithSAML</code> and <code>UpdateSAMLProvider</code> events. An adversary might exploit SAML to gain unauthorized access, escalate privileges, move laterally within the AWS environment, or establish persistent backdoor access. The focus is on detecting unusual or unauthorized modifications to SAML configurations and role assumptions, which could indicate a compromised identity provider or malicious actor leveraging SAML for illicit purposes. Defenders should prioritize monitoring SAML-related API calls to identify and mitigate potential threats early in the attack chain.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker compromises or creates a malicious SAML identity provider.</li>
<li>The attacker configures the AWS environment to trust the malicious SAML provider using <code>UpdateSAMLProvider</code>.</li>
<li>The attacker crafts a SAML assertion to assume a specific role within the AWS environment.</li>
<li>The attacker uses the <code>AssumeRoleWithSAML</code> API call to authenticate with AWS using the crafted SAML assertion.</li>
<li>AWS STS validates the SAML assertion and, if valid, provides temporary credentials for the assumed role.</li>
<li>The attacker uses the temporary credentials to perform actions within AWS, potentially escalating privileges.</li>
<li>The attacker moves laterally within the AWS environment, accessing resources and services authorized for the assumed role.</li>
<li>The attacker establishes persistent access by creating backdoors or modifying existing IAM policies, leveraging the initially gained access.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation via SAML manipulation can lead to a complete compromise of the AWS environment. Attackers can gain unauthorized access to sensitive data, disrupt critical services, and deploy malicious infrastructure. The impact includes potential data breaches, financial losses, and reputational damage. The number of affected resources depends on the permissions associated with the roles assumed by the attacker.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule for <code>AssumeRoleWithSAML</code> events to detect suspicious role assumptions (see &ldquo;AssumeRoleWithSAML Detection Rule&rdquo;).</li>
<li>Deploy the Sigma rule for <code>UpdateSAMLProvider</code> events to detect unauthorized SAML provider modifications (see &ldquo;UpdateSAMLProvider Detection Rule&rdquo;).</li>
<li>Investigate any <code>AssumeRoleWithSAML</code> events originating from unfamiliar user agents or IP addresses by reviewing CloudTrail logs.</li>
<li>Monitor <code>UpdateSAMLProvider</code> events for unexpected changes to SAML provider configurations. Review associated CloudTrail logs for user identity, user agent, and hostname to ensure authorized access.</li>
<li>Tune the provided Sigma rules for your environment, addressing false positives by exempting known, legitimate behavior.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>aws</category><category>saml</category><category>cloudtrail</category><category>initial-access</category><category>lateral-movement</category><category>persistence</category><category>privilege-escalation</category><category>stealth</category></item><item><title>AWS STS GetFederationToken with AdministratorAccess in Request</title><link>https://feed.craftedsignal.io/briefs/2024-01-aws-sts-admin-access/</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-aws-sts-admin-access/</guid><description>Detection of AWS STS GetFederationToken calls with AdministratorAccess in the request parameters, indicating potential privilege escalation or dangerous automation via broadly privileged temporary credentials.</description><content:encoded><![CDATA[<p>The AWS Security Token Service (STS) GetFederationToken API allows for the creation of temporary security credentials for federated users. These credentials inherit permissions from the calling IAM user and any session policy included in the request. This detection focuses on instances where the request parameters of GetFederationToken reference AdministratorAccess, either directly or through an equivalent string. The inclusion of AdministratorAccess within the session policy grants overly broad privileges to the temporary credentials, potentially leading to privilege escalation or abuse. This scenario is often indicative of legacy systems, misconfigured tooling, or malicious intent, posing a significant risk to the security posture of AWS environments. Defenders should prioritize identifying and mitigating instances of this behavior to enforce least privilege principles and prevent unauthorized access.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to an AWS account, potentially through compromised IAM user credentials or an exploited vulnerability.</li>
<li>The attacker identifies an IAM user with the necessary permissions to call the STS GetFederationToken API.</li>
<li>The attacker crafts a GetFederationToken API request, including a session policy that directly references &ldquo;AdministratorAccess&rdquo; or includes a policy ARN that grants administrator privileges.</li>
<li>The GetFederationToken API call is successfully executed, generating temporary security credentials with broad administrator permissions.</li>
<li>The attacker uses the temporary credentials to perform privileged actions within the AWS environment, such as modifying IAM policies, accessing sensitive data, or deploying malicious resources.</li>
<li>The attacker may attempt to laterally move within the AWS environment by leveraging the newly acquired administrator privileges to compromise other resources or accounts.</li>
<li>The attacker could establish persistence by creating new IAM users or roles with elevated permissions, ensuring continued access even after the temporary credentials expire.</li>
<li>The attacker achieves their final objective, which could include data exfiltration, service disruption, or financial gain.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to complete compromise of the AWS environment. An attacker with temporary administrator credentials can modify security configurations, access sensitive data, and disrupt critical services. While no specific victim counts or sectors are mentioned, the broad permissions granted by AdministratorAccess make any AWS environment vulnerable to significant damage. The risk score of 73 highlights the potential for severe impact.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;AWS STS GetFederationToken with AdministratorAccess in Request&rdquo; to your SIEM to detect instances of this activity (rule title).</li>
<li>Investigate any alerts generated by the Sigma rule, focusing on the <code>aws.cloudtrail.request_parameters</code> to identify the specific policy being used (rule title).</li>
<li>Revoke or rotate the IAM user access keys involved in the GetFederationToken call and enforce least privilege on the user (rule description).</li>
<li>Monitor CloudTrail logs for subsequent events using <code>response_elements.credentials.accessKeyId</code> from the same response to identify actions taken with the temporary credentials (rule description).</li>
<li>Review and update IAM policies to ensure that session policies used with GetFederationToken adhere to the principle of least privilege (rule description).</li>
<li>Implement automated checks to prevent the creation or modification of IAM policies that grant AdministratorAccess except in explicitly approved scenarios (rule description).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>aws</category><category>privilege-escalation</category><category>lateral-movement</category><category>sts</category><category>getfederationtoken</category></item><item><title>AWS STS AssumeRole Misuse for Lateral Movement and Privilege Escalation</title><link>https://feed.craftedsignal.io/briefs/2024-01-aws-assumerole-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-aws-assumerole-misuse/</guid><description>Abuse of AWS STS AssumeRole can allow attackers to move laterally within an AWS environment and escalate privileges, potentially leading to unauthorized access to sensitive resources and data.</description><content:encoded><![CDATA[<p>The AWS Security Token Service (STS) AssumeRole function allows users or applications to assume a different IAM role, granting temporary access to resources and permissions associated with that role.  Attackers who gain initial access to an AWS account can misuse AssumeRole to move laterally to other roles and escalate their privileges. This can occur if the initial role has overly permissive trust relationships or if an attacker can manipulate the role assumption process.  This activity is detected through CloudTrail logs that record the AssumeRole event. The impact of this activity can be significant, depending on the permissions associated with the roles assumed.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to an AWS account, potentially through compromised credentials or an exploited vulnerability.</li>
<li>The attacker identifies IAM roles within the AWS environment that they may be able to assume.</li>
<li>The attacker attempts to use the <code>AssumeRole</code> API call to assume a different role. This call includes parameters specifying the target role ARN and a session name.</li>
<li>AWS STS validates the request.  Successful validation depends on the trust policy of the target role and the permissions of the initial user or role.</li>
<li>If the validation is successful, AWS STS returns temporary security credentials (access key ID, secret access key, and session token) to the attacker.</li>
<li>The attacker uses these temporary credentials to access AWS resources and perform actions authorized by the assumed role.</li>
<li>The attacker continues to move laterally and escalate privileges by assuming additional roles.</li>
<li>The attacker achieves their objective, such as accessing sensitive data, modifying configurations, or disrupting services.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to a wide range of impacts, including unauthorized access to sensitive data stored in S3 buckets or databases, modification or deletion of critical infrastructure configurations, and disruption of AWS services. The scope of the impact depends on the permissions associated with the roles that the attacker is able to assume. This can affect any organization using AWS, and the consequences can range from data breaches and financial losses to reputational damage and regulatory penalties.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the provided Sigma rule to your SIEM and tune for your environment to detect suspicious <code>AssumeRole</code> activity based on <code>userIdentity.type</code> and <code>userIdentity.sessionContext.sessionIssuer.type</code>.</li>
<li>Review and harden IAM role trust policies to ensure that only authorized entities can assume roles.</li>
<li>Monitor CloudTrail logs for unusual patterns of <code>AssumeRole</code> API calls, especially those originating from unfamiliar user identities or locations.</li>
<li>Implement multi-factor authentication (MFA) for all IAM users to reduce the risk of credential compromise.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>attack.lateral-movement</category><category>attack.privilege-escalation</category><category>attack.t1548</category><category>attack.t1550</category><category>attack.t1550.001</category></item></channel></rss>