๐ก๏ธ AWS RDS Instance uses default endpoint port๐ข
- Contextual name: ๐ก๏ธ Instance uses default endpoint port๐ข
- ID:
/ce/ca/aws/rds/instance-default-port - Tags:
- ๐ข Policy with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicโ
- ๐ง prod.logic.yaml๐ข
Similar Policiesโ
- Internal:
dec-x-fd0bfd1b
Similar Internal Rulesโ
| Rule | Policies | Flags |
|---|---|---|
| โ๏ธ dec-x-fd0bfd1b | 1 |
Descriptionโ
Descriptionโ
Ensure that your Amazon RDS database instances are not using their default endpoint ports (e.g., MySQL/Aurora port 3306, SQL Server port 1433, PostgreSQL port 5432) to enhance security through port obfuscation. Changing the default endpoint ports can add an extra layer of defense against non-targeted attacks.
Rationaleโ
Using default endpoint ports for Amazon RDS database instances can make them more susceptible to automated attacks and scans that target common database ports.
Port obfuscation adds an extra layer of security by making it more difficult for attackers to identify and target your database instances. Non-standard ports are less likely to be targeted by generic scanning and exploitation tools, reducing the overall attack surface of your database environment.
Auditโ
This policy evaluates the following endpoint port configurations of Amazon RDS database instances:
Database Engine Default Port MySQL/Aurora/MariaDB 3306 PostgreSQL/Aurora 5432 Oracle 1521 Microsoft SQL Server 1433 ... see more
Remediationโ
Remediationโ
From Command Lineโ
Modify the Endpoint Portโ
For each incompliant RDS instance, modify the endpoint port to a non-default value. Ensure the new port is within the allowed range and does not conflict with other services.
Run the following command to modify the port of a specific RDS instance:
aws rds modify-db-instance
--db-instance-identifier {{db-instance-identifier}}
--port {{new-port}}
--apply-immediatelyReplace
{{db-instance-identifier}}with the ID of your RDS instance and{{new-port}}with the new port number.To apply changes immediately rather than in the next maintenance window, use the
--apply-immediatelyparameter when calling the AWS CLI.Update Security Groupsโ
Ensure that the security groups associated with your RDS instances allow inbound traffic on the new port.
Run the following command to update the security group:
aws ec2 authorize-security-group-ingress
--group-id {{security-group-id}}
--protocol tcp
--port {{new-port}}
--cidr {{your-cidr-block}}Replace
{{security-group-id}}with the ID of your security group,{{new-port}}with the new port number, and{{your-cidr-block}}with your IP range.... see more