Impair Defenses: Disable Cloud Logs

Other sub-techniques of Impair Defenses (4)

An adversary may disable cloud logging capabilities and integrations to limit what data is collected on their activities and avoid detection.

Cloud environments allow for collection and analysis of audit and application logs that provide insight into what activities a user does within the environment. If an attacker has sufficient permissions, they can disable logging to avoid detection of their activities. For example, in AWS an adversary may disable CloudWatch/CloudTrail integrations prior to conducting further malicious activity.

AWS Specific Content


A 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 disable cloud logging capabilities and integrations to limit what data is collected on their activities and avoid detection. Using this technique, threat actors can deactivate or modify AWS CloudTrail prior to conducting unauthorized actions in order to hide their activities and evade defenses.

Detection

AWS Specific Content


When this technique is used by the threat actor, actions taken by the threat actor using the credentials obtained will be logged in CloudTrail. You can use the Event history page in the AWS CloudTrail console to view the last 90 days of management events in an AWS Region for the events listed in the AWS CloudTrail Event Name(s) section, such as cloudtrail:PutEventSelectors.

A separate CloudTrail trail will give you an ongoing record of events in your AWS account past 90 days and can be configured to log events in multiple regions. You can also review events using the console as well as the AWS CLI.

It is also possible to create a CloudWatch metric filter to watch for when specific AWS API calls are used and perform notification actions if logged, and additionally configure CloudWatch to automatically perform an action in response to an alarm.

If Amazon GuardDuty is configured within the AWS account, an IAMUser/CloudTrailLoggingDisabled finding may be created if this technique is used. This finding is presented in GuardDuty when a CloudTrail trail within your AWS environment was deleted or updated.


Mitigation

AWS Specific Content


You can make sure that principals are scoped with the least-privileged permissions necessary to perform duties, limiting the ability to perform unauthorized actions in an AWS account when not required. One possible method of applying the principle of least-privileged permissions is to use Service Control Policies to restrict the maximum available permissions for the IAM users and IAM roles within your AWS Organizations accounts (note - you should test SCPs in a development environment before deploying them in production).

You can also use IAM Access Analyzer to regularly review and verify access and manage permissions across your AWS environment, which will highlight AWS identities with excessive permissions and the actions performed by those identities.

Additionally, you can use AWS Config to configure a custom remediation rule to re-enable CloudTrail in the event that it has been modified by a threat actor.


References

AWS Specific Information


AWS Services:
  • AWS CloudTrail
  • Amazon CloudWatch
AWS CloudTrail Event Names:
  • cloudtrail:DeleteTrail
  • cloudtrail:StopLogging
  • cloudtrail:UpdateTrail
  • cloudtrail:PutEventSelectors
  • cloudwatch:DeleteLogGroup
  • cloudwatch:DeleteLogStream
  • cloudwatch:PutRetentionPolicy

Technique Information

ID: T1562.008
Aliases: T1562.008
Sub-technique of: T1562
Tactics:
  • Defense Evasion
Platforms:
  • IaaS
  • Amazon Web Services (AWS)
Created: 12 Oct 2020
Last Modified: 30 May 2025