Skip to content
Threat Feed
medium advisory

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 RestoreDBInstanceFromDBSnapshot and RestoreDBInstanceFromS3 API 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:RestoreDBInstanceFromDBSnapshot and rds:RestoreDBInstanceFromS3 to 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.

Detection Engineering 24h

Threat Hunt

Search for instances restored by non-authorized IAM principals or outside of planned maintenance windows.

T1578.002 high high confidence hunt now

Data: CloudTrail logs

Mitigations

Enforce least privilege IAM policies for RDS restoration permissions.

immediate IT Operations

T1578

Detection coverage 1

Detect Unauthorized AWS RDS Instance Restoration

medium

Detects successful execution of RestoreDBInstanceFromDBSnapshot or RestoreDBInstanceFromS3, which may indicate unauthorized database duplication for data staging or evasion.

sigma tactics: defense_evasion techniques: T1578.002, T1578.004 sources: webserver, aws

Detection queries are available on the platform. Get full rules →