Persistence
The adversary is trying to maintain their foothold. Persistence consists of techniques that adversaries use to keep access to AWS services across restarts/updates, changed credentials, and other interruptions that could cut off their access. Techniques used for persistence include any access, action, or configuration changes that let them maintain their foothold on the AWS environment, such as creating a new IAM user with programmatic access.
Techniques
Techniques: 16
ID | Name | Description | |
---|---|---|---|
T1098 | Account Manipulation |
Adversaries may manipulate accounts to maintain and/or elevate access to victim systems. Account manipulation may consist of any action that preserves or modifies adversary access to a compromised account, such as modifying credentials or permission groups. These actions could also include account activity designed to subvert security policies, such as performing iterative password updates to bypass password duration policies and preserve the life of compromised credentials. |
|
↳ | T1098.001 | Additional Cloud Credentials |
Adversaries may add adversary-controlled credentials to a cloud account to maintain persistent access to victim accounts and instances within the environment. AWS Specific ContentA prerequisite for this technique is that a threat actor has already gained control of an AWS identity with the permissions to perform the actions in the AWS CloudTrail Event Name(s) section. With access to an AWS identity that has the appropriate permissions, threat actors may add adversary-controlled credentials to maintain persistent access to compromised AWS resources or IAM users, and import or create SSH keys for EC2 instances within the account. Actions that threat actors take against IAM users with this technique include creating an additional access key, or updating an access key. Up to a maximum of two access keys can be configured for an IAM user. Additional IAM user actions include the creation of a login profile to allow a user to connect to an AWS account using the AWS Management Console. Actions that threat actors take against EC2 instances with this technique include the import or the creation of key pairs, as well as the use of the ec2-instance-connect:SendSSHPublicKey CLI command using EC2 Instance Connect.With the appropriate permissions, threat actors can also use the sts:GetFederationToken (or sts:GetSessionToken ) action to create a temporary set of credentials tied to the permissions of the IAM user invoking the sts:GetFederationToken (or sts:GetSessionToken ) command. These temporary credentials remain valid for the specified duration, from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is 43,200 seconds (12 hours). The credentials remain valid for the duration of their lifetime even if the original access keys for the IAM user are deactivated or deleted. Temporary credentials can be obtained using sts:GetFederationToken (or sts:GetSessionToken ) for the root user, and in this case, the credentials are valid for a maximum duration of 3,600 seconds (1 hour) and cannot be revoked during that time. |
↳ | T1098.003 | Additional Cloud Roles |
An adversary may add additional roles or permissions to an adversary-controlled cloud account to maintain persistent access to a tenant. For example, adversaries may update IAM policies in cloud-based environments or add a new global administrator in Office 365 environments. With sufficient permissions, a compromised account can gain almost unlimited access to data and settings (including the ability to reset the passwords of other admins).
AWS Specific ContentA prerequisite for this technique is that a threat actor has already gained control of an AWS identity with the permissions to perform the actions in the AWS CloudTrail Event Name(s) section. With access to an AWS identity that has the appropriate permissions, threat actors may add IAM Roles to the AWS account or add IAM policies to identities that the threat actor has control over in order to provide persistent access to a threat actor, or alter the level and type of access previously granted. |
AT1667 | Application API Abuse |
Application API Abuse refers to techniques that leverage vulnerabilities or misconfigurations in application APIs to gain unauthorized access and establish persistence within a target environment. This can include abusing authentication/authorization mechanisms, exploiting API design flaws, or misusing API functionality to achieve malicious objectives. |
|
↳ | AT1667.001 | API Gateway |
AWS Specific ContentA prerequisite for this technique is that a threat actor has already gained control of an AWS identity with the permissions to perform the actions in the AWS CloudTrail Event Name(s) section. With access to an AWS identity that has the appropriate permissions, threat actors may add unauthorized resources that support Amazon API Gateways and associate them with other adversary-controlled resources, such as Lambda functions, within the AWS account. This allows the threat actor to maintain access by invoking the API Gateway endpoint to activate the other AWS resources. Upon activation, the Lambda functions can then be used to perform actions such as starting EC2 instances or creating new users with administrative privileges. The new users created with this technique are fully controlled by the threat actor and provide them with a method of persistent access. |
T1538 | Cloud Service Dashboard |
An adversary may use a cloud service dashboard GUI with stolen credentials to gain useful information from an operational cloud environment, such as specific services, resources, and features. For example, the GCP Command Center can be used to view all assets, findings of potential security risks, and to run additional queries, such as finding public IP addresses and open ports. AWS Specific ContentA prerequisite for this technique is that a threat actor has already compromised the login credentials and gained control of an AWS identity with a login profile configured. Alternatively, a threat actor with control over long-term credentials can also generate a URL for access to the AWS Management Console for an IAM user without a login profile configured A Cloud Service Dashboard is a GUI that provides access to cloud services. In AWS, the Cloud Service Dashboard is the AWS Management Console. Using a compromised AWS identity, threat actors can access the identitys AWS account using the AWS Management Console which provides a threat actor with a more intuitive way of navigating the AWS account and a more efficient way to view and interact with resources than with the AWS CLI. Note that the ability to view and access resources are still restricted to the permissions granted to the AWS identity that the threat actor has control over. In some cases, accessing the AWS Management Console will be the Initial Access vector that the threat actor has used to attempt to gain access to the AWS account by obtaining the credentials for a root user, an IAM User, or an AWS IAM Identity Center user. Access to log in to the console is typically granted to an IAM user by creating a login profile and enabling console access, however, threat actors can also utilize scripts to create a URL for IAM users to log on to the AWS Management Console without a login profile. In this scenario, while it is still possible to log in to the AWS Management Console, the ability to view and edit resources in the AWS account is still bound by the permissions granted to the IAM or Identity Center user. |
|
T1136 | Create Account |
A threat actor using credentials with appropriate permissions is able to create an account within an AWS organization that will use the payment method registered to the management or payer account. The theat actor will then be able to create resources and workloads within the newly created account that may not be subject to existing detections. By default, Service Control Policies are not assigned to new accounts during the creation of the account within an organization. |
|
↳ | T1136.003 | Create Cloud Account |
Adversaries may create a cloud account to maintain access to victim systems. With a sufficient level of access, such accounts may be used to establish secondary credentialed access that does not require persistent remote access tools to be deployed on the system. AWS Specific ContentA prerequisite for this technique is that a threat actor has already gained control of an AWS identity with the permissions to perform the actions in the AWS CloudTrail Event Name(s) section. In AWS, an AWS account is a container where you can create and manage your AWS resources. An account is also a unique identity, typically associated with a user, that grants access to a specific system or resource, for example, an IAM user or an AWS IAM Identity Center user. With access to an AWS identity that has the appropriate permissions, threat actors may create additional IAM users within an AWS account. The threat actor will then use the new IAM user to perform unauthorized activity to limit defenders from being alerted to evidence of the original user being compromised. |
T1648 | Serverless Execution |
Adversaries may abuse serverless computing, integration, and automation services to execute arbitrary code in cloud environments. Many cloud providers offer a variety of serverless resources, including compute engines, application integration services, and web servers. |
|
↳ | T1648.A001 | Invoking Lambda Function |
AWS Specific ContentA prerequisite for this technique is that a threat actor has already gained control of an AWS identity with the permissions to perform the action in the Event Name(s) section. AWS Lambda is a compute service that provides a way to run code without provisioning or managing servers. You can invoke Lambda functions directly with the Lambda console, the Lambda API, the AWS SDK, the AWS CLI, and AWS toolkits. You can also configure other AWS services to invoke a Lambda function, or Lambda can be configured to read from a stream or queue and invoke a function. With access to an AWS identity that has the appropriate permissions, threat actors may use Lambda to run code in response to events, such as changes to data in an Amazon S3 bucket or an Amazon DynamoDB table; to run code in response to HTTP requests using Amazon API Gateway; or invoke code using API calls made using AWS SDKs. |
T1199 | Trusted Relationship |
Adversaries may breach or otherwise leverage organizations who have access to intended victims. Access through trusted third party relationship abuses an existing connection that may not be protected or receives less scrutiny than standard mechanisms of gaining access to a network. |
|
↳ | T1199.A002 | Role Assumption and Federated Access |
AWS Specific ContentA prerequisite for this technique is that a threat actor has already gained control of an AWS identity with the permissions to perform the actions in the AWS CloudTrail Event Name(s) section, and that the AWS identity is permitted by the role it is attempting to assume. A role is an IAM identity that you can create in your account that has specific permissions. Roles and users are both AWS identities with permissions policies that determine what the identity can and cannot do in AWS. However, instead of being uniquely associated with one person, a role is intended to be assumed by anyone who needs it. Also, a role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides you with temporary security credentials for your role session. With access to an AWS identity that has the appropriate permissions, threat actors can use the sts:AssumeRole action to get credentials in another AWS account if cross account roles are present. When using AWS Organizations, the management account creates one of these cross account roles in the member account by default. The AssumeRole action is also performed when an identity is provided federated access into an AWS account, for example, through AWS Identity Center |
T1078 | Valid Accounts |
Adversaries may obtain and abuse credentials of existing accounts as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Compromised credentials may be used to bypass access controls placed on various resources on systems within the network and may even be used for persistent access to remote systems and externally available services, such as VPNs, Outlook Web Access, network devices, and remote desktop. Compromised credentials may also grant an adversary increased privilege to specific systems or access to restricted areas of the network. Adversaries may choose not to use malware or tools in conjunction with the legitimate access those credentials provide to make it harder to detect their presence. |
|
↳ | T1078.A002 | Account Root User |
AWS Specific ContentA prerequisite for this technique is that a threat actor has already gained control of an AWS account root user. This technique identifies when a threat actor uses the root user to perform unauthorized actions. When you first create an Amazon Web Services (AWS) account, you begin with an identity that has complete access to the AWS services and resources in the account. This identity is called the AWS account root user. The email address and password that you used to create your AWS account are the credentials you use to sign in as your root user. The account root user has complete access to the AWS services and resources in the account, and if compromised by a threat actor, would give the adversary complete access to the AWS account. |
↳ | T1078.A001 | IAM Users |
AWS Specific ContentA prerequisite for this technique is that a threat actor has already gained control of an AWS IAM user. This technique identifies when a threat actor uses an IAM user to perform unauthorized actions through either long-term credentials or through the AWS Management Console. An IAM user is an entity that you create in your AWS account. The IAM user represents the human user or workload who uses the IAM user to interact with AWS resources. An IAM user consists of a name and credentials. An IAM user with administrator permissions is not the same as the AWS account root user. For more information about the root user, see AWS account root user |