Ensure no security groups allow ingress from 0.0.0.0/0 to RDP (TCP:3389)

Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as RDP to port 3389.

Risk Level: High
Cloud Entity: Amazon VPC
CloudGuard Rule ID: D9.TF.AWS.NET.02
Covered by Spectral: No
Category: Compute

GSL LOGIC

aws_security_group should not have ingress with [(from_port<=3389 and to_port>=3389) and (cidr_blocks contain ['0.0.0.0/0'] or ipv6_cidr_blocks contain ['::/0'])]

REMEDIATION

  1. Run aws ec2 describe-security-groups 2. For each group allow ingress for 0.0.0.0/0 to SSH (port 3389/tcp) 2.1 Run aws ec2 delete-security-configuration --group-ids <group>

Amazon VPC

Amazon Virtual Private Cloud (Amazon VPC) lets you provision a logically isolated section of the AWS Cloud where you can launch AWS resources in a virtual network that you define. You have complete control over your virtual networking environment, including selection of your own IP address range, creation of subnets, and configuration of route tables and network gateways. You can use both IPv4 and IPv6 in your VPC for secure and easy access to resources and applications.

Compliance Frameworks

  • Terraform AWS CIS Foundations