Control: 23 RDS databases and clusters should not use a database engine default port
Description
This control checks whether the RDS cluster or instance uses a port other than the default port of the database engine.
If you use a known port to deploy an RDS cluster or instance, an attacker can guess information about the cluster or instance. The attacker can use this information in conjunction with other information to connect to an RDS cluster or instance or gain additional information about your application.
When you change the port, you must also update the existing connection strings that were used to connect to the old port. You should also check the security group of the DB instance to ensure that it includes an ingress rule that allows connectivity on the new port.
Remediation
To modify the default port of an existing DB instance
Open the Amazon RDS console
Choose
Databases
.Select the DB instance to modify
Choose
Modify
.Under
Database options
, changeDatabase port
to a non-default value.Choose
Continue
.Under
Scheduling of modifications
, choose when to apply modifications. You can choose eitherApply during the next scheduled maintenance window
orApply immediately
.For clusters, choose
Modify cluster
. For instances, chooseModify DB Instance
.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.foundational_security_rds_23
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.foundational_security_rds_23 --share
SQL
This control uses a named query:
rds_db_instance_and_cluster_no_default_port