This plugin ensures DMS encryption is using a valid Customer-managed KMS key
Risk Level: Medium
Description:
This plugin ensures DMS encryption is using a valid Customer-managed KMS key. The data transfer process in AWS Data Migration Service must be encrypted in order to secure the data flow. If the KMS key is invalid, no encryption will be enabled.
About the Service :
AWS Database Migration Service (AWS DMS) enables you to rapidly and securely move databases to AWS. During the migration, the source database remains fully operational, reducing downtime to applications based on the database. The AWS Database Migration Service can move your data from and to the commercial and open source most often used databases.
Impact :
It is highly recommended to properly encrypt AWS DMS migration process with customer-managed KMS keys. In case, the keys are invalid or deleted, the encryption will not be enabled and the data will be visible to an attacker if compromised.
Steps to reproduce :
- Log in to AWS Console.
- Navigate to the DMS i.e. Database Migration Service dashboard. You can use the link (https://us-east-2.console.aws.amazon.com/dms/ ) if already logged in.
- Select Replication Instances in the left navigation panel.
- Click on the instance that you want to examine by clicking on its Name.
- Move to the Overview Details tab.
- In the Advanced security and network configuration section, copy the KMS key arn.
- Move to the KMS management console and shift to Customer-managed keys from the left navigation pane.
- In the filter keys search bar, paste the Key ARN copied before. If no keys are displayed in the result, the vulnerability exists.
- Repeat steps for other replication instances.
Steps for remediation :
Create a new DMS replication instance for all vulnerable instances and enable encryption using KMS CMKs.
- Log in to AWS Console.
- Navigate to the DMS i.e. Database Migration Service dashboard. You can use the link (https://us-east-2.console.aws.amazon.com/dms/ ) if already logged in.
- Select Replication Instances in the left navigation panel.
- Click on Create replication instance.
- Specify all the required details necessary. Expand the Advanced security and network configuration section and select Enter a key ARN in the KMS key section.
- Enter a valid and existing CMK ARN and click on Create.
- Click on the instance vulnerable by clicking on the checkbox next to it.
- From the Action menu, click on Delete.
- Repeat steps for all the vulnerable replication instances.