Detection of AWS Route 53 Resolver Query Log Deletion
Adversaries may delete Amazon Route 53 Resolver Query Log configurations to evade detection by disabling DNS query and response logging for VPC-based resources.
What's new
- 1. added detection rule: Detect AWS Route 53 Domain Transfer Lock Disablement Sep 18, 19:41 via elastic
Adversaries targeting AWS environments may attempt to disable security monitoring by deleting Amazon Route 53 Resolver Query Log configurations. These logs provide critical visibility into DNS activity across VPCs, including queries initiated by EC2 instances, containerized workloads, and Lambda functions. By successfully invoking the DeleteResolverQueryLogConfig API call, an attacker immediately halts DNS logging, effectively creating a blind spot that hides evidence of command-and-control (C2) communication, lateral movement, and data exfiltration. This tactic is classified as a method of impairing defenses within cloud environments, forcing defenders to rely on fragmented telemetry when investigating unauthorized resource access or configuration tampering.
Attack Chain
- Attacker gains initial access to an AWS account via compromised IAM credentials or a service role.
- Attacker performs reconnaissance to identify enabled security logging configurations, specifically checking Route 53 Resolver Query Log settings.
- Attacker evaluates existing IAM permissions to determine if the
route53resolver:DeleteResolverQueryLogConfigaction is authorized. - Attacker executes the
DeleteResolverQueryLogConfigAPI call through the AWS CLI, SDK, or Console. - AWS CloudTrail logs the successful deletion event, while the Resolver service stops logging DNS traffic for the associated VPCs.
- Attacker proceeds with malicious activity (e.g., C2 beaconing or data exfiltration) under the cover of the logging gap.
- Defender loses visibility into DNS-based C2 indicators, delaying incident detection and response.
Impact
The deletion of query log configurations results in the immediate loss of visibility into DNS activity across one or more VPCs. This impairment hinders the ability to detect malicious domains or suspicious DNS query patterns, which are often the primary indicators of C2 and exfiltration in cloud-native attacks. If left undetected, this allows attackers to operate within the environment for extended periods without leaving logs for forensic analysis.
Recommendation
Prioritize the monitoring of logging-related API calls in your cloud environment to detect unauthorized tampering.
- Deploy the provided Sigma rule to alert on
DeleteResolverQueryLogConfigevents in your SIEM or logging platform. - Audit existing IAM policies to ensure the
route53resolver:DeleteResolverQueryLogConfigpermission is granted only to highly privileged, authorized administrative roles. - Implement AWS Service Control Policies (SCPs) or IAM boundary conditions to restrict the deletion of logging configurations to specific, trusted principal ARNs or network origins.
- Use AWS Config or Security Hub to monitor for non-compliance regarding the existence of active Resolver Query Log configurations on critical VPCs.
Immediate actions
Deploy Sigma detection rule to monitor CloudTrail for DeleteResolverQueryLogConfig.
Threat Hunt
Audit CloudTrail history for DeleteResolverQueryLogConfig occurrences in the last 6 months.
Data: CloudTrail logs
Mitigations
Restrict IAM permissions for route53resolver:DeleteResolverQueryLogConfig to authorized personnel only.
T1562.008
Detection coverage 2
Detect AWS Route 53 Resolver Query Log Deletion
mediumDetects successful execution of DeleteResolverQueryLogConfig which disables DNS logging for VPCs.
Detect AWS Route 53 Domain Transfer Lock Disablement
highDetects successful execution of DisableDomainTransferLock in AWS CloudTrail
Detection queries are available on the platform. Get full rules →