Impair Defenses: Disable or Modify GuardDuty
AWS Specific Sub-Technique
Other sub-techniques of Impair Defenses (4)
ID | Name |
---|---|
T1562.008 | Disable Cloud Logs |
T1562.007 | Disable or Modify Cloud Firewall |
T1562.A001 | Disable or Modify GuardDuty |
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 delete or modify Amazon GuardDuty within an AWS account to evade the continuous security monitoring that GuardDuty provides. Threat actors will perform this technique as a precursor to other actions in the AWS account in order to hide and block defenders from being alerted to their unauthorized activities.
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
guardduty:DeleteDetector
.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.
You can also use AWS Config Rules to check if Amazon GuardDuty is enabled in your AWS account and AWS Region. AWS Security Hub controls can also evaluate the use of the Amazon GuardDuty service, such as checking whether GuardDuty is enabled in your account and region.
Mitigation
AWS Specific Content
If using AWS Organizations, GuardDuty can be enabled in a specified GuardDuty administrator account to manage certain aspects of GuardDuty on behalf of the member accounts.
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.
References
- AWS CLI Command Reference - delete-detector
- AWS CLI Command Reference - update-detector
- AWS CLI Command Reference - disassociate-from-master-account
- AWS CLI Command Reference - stop-monitoring-members
- AWS CLI Command Reference - create-ip-set
- AWS CLI Command Reference - archive-findings
- Amazon GuardDuty