Alibaba Cloud RDS instances should only accept connections from trusted networks and IP addresses. This check verifies that the IP whitelist does not contain entries such as 0.0.0.0/0 or 0.0.0.0 that would allow access from anywhere on the internet. Only specific, trusted IP addresses should be whitelisted to minimize the attack surface of the database server.
Risk
Allowing public access (0.0.0.0/0) to the database significantly increases the risk of brute-force attacks, unauthorized access, and data exfiltration. Databases exposed to the internet are prime targets for attackers, and a successful breach can compromise confidentiality, integrity, and availability of all stored data.
prowler alibabacloud --checks rds_instance_no_public_access_whitelist
Recommendation
Restrict the RDS IP whitelist to only trusted IP addresses. Remove any entries that allow unrestricted access such as 0.0.0.0/0.
Remediation
aliyun rds ModifySecurityIps --DBInstanceId <instance_id> --SecurityIps <trusted_ip_list>
- Log on to the RDS Console.
- Select the target RDS instance.
- Go to Data Security > Whitelist Settings tab.
- Remove any
0.0.0.0or0.0.0.0/0entries. - Add only the specific IP addresses that need to access the instance.
- Click OK to save changes.
Source Code
Resource Type
ALIYUN::RDS::DBInstance