Adversaries may use stolen application access tokens to bypass the typical authentication process and access restricted accounts, information, or services on remote systems. These tokens are typically stolen from users or services and used in lieu of login credentials.

Application access tokens are used to make authorized API requests on behalf of a user or service and are commonly used to access resources in cloud, container-based applications, and software-as-a-service (SaaS).[1]

OAuth is one commonly implemented framework that issues tokens to users for access to systems. These frameworks are used collaboratively to verify the user and determine what actions the user is allowed to perform. Once identity is established, the token allows actions to be authorized, without passing the actual credentials of the user. Therefore, compromise of the token can grant the adversary access to resources of other sites through a malicious application.[2]

For example, with a cloud-based email service, once an OAuth access token is granted to a malicious application, it can potentially gain long-term access to features of the user account if a "refresh" token enabling background access is awarded.[3] With an OAuth access token an adversary can use the user-granted REST API to perform functions such as email searching and contact enumeration.[4]

Compromised access tokens may be used as an initial step in compromising other services. For example, if a token grants access to a victim’s primary email, the adversary may be able to extend access to all other services which the target subscribes by triggering forgotten password routines. In AWS and GCP environments, adversaries can trigger a request for a short-lived access token with the privileges of another user account.[5],[6] The adversary can then use this token to request data or perform actions the original account could not. If permissions for this feature are misconfigured – for example, by allowing all users to request a token for a particular account - an adversary may be able to gain initial access to a Cloud Account or escalate their privileges.[7]

Direct API access through a token negates the effectiveness of a second authentication factor and may be immune to intuitive countermeasures like changing passwords. For example, in AWS environments, an adversary who compromises a user’s AWS API credentials may be able to use the sts:GetFederationToken API call to create a federated user session, which will have the same permissions as the original user but may persist even if the original user credentials are deactivated.[8] Additionally, access abuse over an API channel can be difficult to detect even from the service provider end, as the access can still align well with a legitimate workflow.

References

  1. Auth0. (n.d.). Why You Should Always Use Access Tokens to Secure APIs. Retrieved September 12, 2019.
  2. okta. (n.d.). What Happens If Your JWT Is Stolen?. Retrieved September 12, 2019.
  3. Cai, S., Flores, J., de Guzman, C., et. al.. (2019, August 27). Microsoft identity platform access tokens. Retrieved October 4, 2019.
  4. Stalmans, E.. (2017, August 2). Phishing with OAuth and o365/Azure. Retrieved October 4, 2019.
  5. Google Cloud. (2022, March 31). Creating short-lived service account credentials. Retrieved April 1, 2022.
  6. AWS. (n.d.). Requesting temporary security credentials. Retrieved April 1, 2022.
  7. Spencer Gietzen. (2018, August 8). Assume the Worst: Enumerating AWS Roles through ‘AssumeRole’. Retrieved April 1, 2022.
  8. Vaishnav Murthy and Joel Eng. (2023, January 30). How Adversaries Can Persist with AWS User Federation. Retrieved March 10, 2023.

Saincheisteanna nasctha

Naisc
Cineál naisc Saincheist
is related to Techniques
is blocked by Behavioral Detection Strategy for Use Alternate Authentication Material: Application Access Token (T1550.001)
is blocked by Account Use Policies
is blocked by Audit
is blocked by Restrict Web-Based Content
is blocked by Application Developer Guidance
is blocked by Encrypt Sensitive Information
is blocked by Configuration Management Program
is blocked by Secure Baseline Configurations
is blocked by Configure Technology Assets, Applications and/or Services (TAAS) for High-Risk Areas
is blocked by Continuous Monitoring Policy
is blocked by Cryptographic Management
is blocked by Cryptographic Cipher Suites and Protocols Inventory
is blocked by Encrypting Data In Transit
is blocked by Sensitive Data Inventories
is blocked by Media Storage
is blocked by Digital Media Sanitization
is blocked by Documented Endpoint Security Protection Measures
is blocked by Identity & Access Management (IAM)
is blocked by Management Approval For New or Changed Accounts
is blocked by Centralized Management Of Mobile Devices
is blocked by Zero Trust Architecture (ZTA)
is blocked by Software Usage Restrictions
is blocked by Restrict Roles Permitted To Install Software
is blocked by Continuous Monitoring
is blocked by Integrity of Data In Transit
is blocked by Encrypting Data At Rest
is blocked by Use of External Technology Assets, Applications and/or Services (TAAS)
is blocked by Media & Data Retention
is blocked by Cybersecurity & Data Protection Attributes
is blocked by Endpoint File Integrity Monitoring (FIM)
is blocked by Standardized Identifier Management (User Names)
is blocked by Identification & Authentication for Organizational Users
is blocked by Access Control For Mobile Devices
is blocked by Remote Access