Control: 5.3 Ensure no security groups allow ingress from ::/0 to remote server administration ports
Description
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 SSH to port 22
and RDP to port 3389
.
Public access to remote server administration ports, such as 22 and 3389, increases resource attack surface and unnecessarily raises the risk of resource compromise.
Remediation
Perform the following to implement the prescribed state:
- Login to the AWS Management Console at https://console.aws.amazon.com/vpc/home.
- In the left pane, click
Security Groups
. - For each security group to remediate, perform the following:
- Select the respective security group.
- Choose the
Inbound Rules
tab. - Click
Edit Inbound rules
button. - Identify the rules to be edited or removed.
- Either A) update the Source field to a range other than ::/0, or, B) Click
Delete
the offending inbound rule. - Click
Save rules
.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.cis_v300_5_3
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.cis_v300_5_3 --share
SQL
This control uses a named query:
vpc_security_group_remote_administration_ipv6