Detection of Unauthorized AWS RDS Instance Restoration
Threat actors with compromised AWS credentials may use RDS restoration operations to duplicate sensitive database environments, facilitating unauthorized data access, staging, and exfiltration while bypassing production monitoring controls.
Adversaries possessing valid AWS credentials can exploit the RDS restoration functionality to rehydrate database snapshots or S3-based backups into new instances. By creating a duplicate environment, attackers can bypass production-level logging, security guardrails, or deletion protection to access historical, sensitive, or supposedly deleted data. This technique is often used for staging data for exfiltration or establishing shadow environments for persistent malicious operations. Because this action involves legitimate API calls, defenders must distinguish between standard administrative maintenance - such as disaster recovery drills, patch testing, or automated CI/CD migrations - and anomalous restoration requests that originate from unexpected IAM principals, unusual source IP addresses, or occur without an associated change management record.
Impact
Successful exploitation allows attackers to gain unauthorized access to sensitive datasets, potentially leading to large-scale data exfiltration. Furthermore, by creating an isolated or shadow database environment, an attacker can perform intensive data analysis or dumps without triggering alerts tied to the production database's performance metrics or audit logs. This may expose organizations to significant compliance violations and loss of intellectual property.
Recommendation
- Implement the detection rule below to monitor for
RestoreDBInstanceFromDBSnapshotandRestoreDBInstanceFromS3API calls in CloudTrail. - Establish an alert triage process that cross-references RDS restoration events with change management systems, automation account signatures, and authorized user identity ARNs.
- Apply the principle of least privilege to IAM roles; restrict the ability to perform
rds:RestoreDBInstanceFromDBSnapshotandrds:RestoreDBInstanceFromS3to specific, authorized principals and networks using IAM condition keys. - Monitor AWS Config and Security Hub for the creation of publicly accessible RDS instances or instances with non-compliant security group configurations.
- Review CloudTrail logs for associated post-compromise activity, including unauthorized snapshot exports, cross-account permissions modifications, or the deletion of the original database instance.
Immediate actions
Deploy the provided Sigma rule for RDS restoration monitoring.
Threat Hunt
Search for instances restored by non-authorized IAM principals or outside of planned maintenance windows.
Data: CloudTrail logs
Mitigations
Enforce least privilege IAM policies for RDS restoration permissions.
T1578
Detection coverage 1
Detect Unauthorized AWS RDS Instance Restoration
mediumDetects successful execution of RestoreDBInstanceFromDBSnapshot or RestoreDBInstanceFromS3, which may indicate unauthorized database duplication for data staging or evasion.
Detection queries are available on the platform. Get full rules →