Check your Elastic Compute Service (ECS) security groups for inbound rules that allow unrestricted access (i.e. 0.0.0.0/0) on TCP port 3389 and limit the access to trusted IP addresses or IP ranges only in order to implement the Principle of Least Privilege (POLP) and reduce the attack surface. TCP port 3389 is used for secure remote GUI login to Windows VM instances by connecting an RDP client application with an RDP server.
Exposing TCP port 3389 (Remote Desktop Protocol - RDP) to the Internet can increase opportunities for malicious activities such as hacking, Man-In-The-Middle (MITM) attacks and brute-force attacks, therefore it is strongly recommended to configure your Elastic Compute Service (ECS) security groups to limit inbound traffic on TCP port 3389 to known and trusted IP addresses only.
Audit
To determine if your Alibaba Cloud ECS security groups allow unrestricted access on TCP port 3389 (RDP), perform the following operations:
Remediation / Resolution
To update the inbound rule configuration for your ECS security groups in order to limit RDP access to trusted entities only (i.e. authorized IP addresses and IP ranges, or other trusted security groups) or to remove the non-compliant rule entirely, perform the following operations:
References
- Alibaba Cloud Documentation
- Security group rules
- Best practices of the security group (part 1)
- Best practices for ECS security groups (security group authorization)
- Best practices for ECS security groups (security group settings)
- ossutil Documentation
- DescribeSecurityGroups
- DescribeSecurityGroupAttribute
- ModifySecurityGroupRule
- RevokeSecurityGroup