Potential Abuse of AWS Console GetSigninToken
Adversaries may abuse the AWS GetSigninToken API to create temporary federated credentials for obfuscating compromised AWS access keys and pivoting to console sessions without MFA, potentially leading to lateral movement within the AWS environment.
The AWS GetSigninToken API, typically used for legitimate console access, can be abused by attackers to generate temporary, federated credentials. This technique, often facilitated by tools like aws_consoler, allows attackers to obfuscate the compromised access keys used to generate the tokens. By pivoting from the AWS CLI to console sessions with these temporary credentials, adversaries bypass MFA requirements and complicate forensic investigations. This activity is crucial for defenders to monitor, especially in environments not configured for AWS SSO, as it can indicate unauthorized access and lateral movement within the AWS infrastructure. The tool aws_consoler is specifically designed to automate this process, creating a streamlined path for malicious actors to leverage compromised credentials for further exploitation.
Attack Chain
- An attacker gains initial access to AWS environment using compromised credentials (access key, secret key).
- The attacker uses the compromised credentials with the AWS CLI or SDK to call the
GetSigninTokenAPI. - AWS CloudTrail logs the
GetSigninTokenevent with the event sourcesignin.amazonaws.comand event nameGetSigninToken. - The
GetSigninTokenAPI returns a temporary sign-in token. - The attacker uses the temporary token along with the AWS account ID to construct a sign-in URL.
- The attacker accesses the AWS Management Console via the crafted URL, bypassing MFA if the original compromised credentials required it.
- Once in the console, the attacker performs reconnaissance, identifies valuable resources, and escalates privileges as needed.
- The attacker moves laterally within the AWS environment, accessing and potentially exfiltrating sensitive data, or disrupting services.
Impact
Successful abuse of the GetSigninToken API can lead to unauthorized access to the AWS Management Console, enabling lateral movement and data exfiltration. The obfuscation of the original compromised credentials makes incident response more difficult. While the exact number of victims is unknown, this technique has been observed in intrusions targeting telecom and BPO companies. The impact includes potential data breaches, service disruptions, and reputational damage.
Recommendation
- Deploy the provided Sigma rule to your SIEM to detect suspicious
GetSigninTokenevents in AWS CloudTrail logs. - Investigate any
GetSigninTokenevents originating from outside of expected AWS SSO user agents or other known legitimate sources. - Monitor AWS CloudTrail logs for
GetSigninTokenevents where the requesting user identity does not match expected patterns. - Implement and enforce MFA for all AWS IAM users, even though this attack bypasses it for console access using the temporary tokens.
- Review and restrict IAM policies to adhere to the principle of least privilege, minimizing the potential impact of compromised credentials.
Detection coverage 2
AWS Console GetSigninToken Potential Abuse
mediumDetects potentially suspicious events involving GetSigninToken API calls, which may indicate credential abuse or lateral movement.
AWS Console GetSigninToken Called by Uncommon User Agent
lowDetects GetSigninToken calls using a user agent string that is not commonly associated with legitimate AWS console access.
Detection queries are kept inside the platform. Get full rules →