Single Sign-On, Double Trouble: Credential Theft Using AWS Access Tokens
Summary: Link(s):
AWS Single Sign-On (SSO) access tokens are critical credentials used for authenticating users to AWS resources. If these tokens are exposed or mishandled, they can be exploited by threat actors to assume the identity of legitimate users, bypassing standard authentication mechanisms. The Red Canary report highlights how the exposure of these tokens, often due to insecure practices in development environments or logging systems, presents a significant security risk to organizations relying on AWS SSO for identity management.
Security Officer Comments:
AWS SSO tokens are JSON Web Tokens (JWTs) containing claims and metadata that authenticate users within AWS. These tokens are typically stored locally when a user authenticates using the AWS Command Line Interface (CLI) or SDK. If exposed, an attacker can parse the token to retrieve sensitive claims, such as the user identity and expiration time, and potentially use it to invoke AWS API actions or assume roles within the victim's AWS environment.
Threat actors may exploit poorly configured development environments, where tokens are often stored in plaintext in temporary cache files, environment variables, or CI/CD pipelines. Tools like jq and base64 decoding make it trivial for attackers to analyze the JWT structure and extract critical information. Moreover, misconfigured logging systems that inadvertently capture token data can also serve as an entry point for exploitation.
To complicate detection, attackers may leverage the same legitimate user agent strings and IP addresses used by the compromised token's original owner, making anomalous activity detection more challenging. Security teams should focus on proactive controls like monitoring CloudTrail logs for high-privilege actions originating from unexpected locations, timeframes, or device fingerprints. Advanced detections can leverage AWS CloudTrail Insights or third-party SIEMs to detect deviations in baseline user behavior.
Suggested Corrections:
https://redcanary.com/blog/threat-detection/aws-sso-access-tokens/