More Info:

Default security groups should block all traffic by default. EC2 instances should not be associated with default security groups.

Risk Level

Medium

Address

Security

Compliance Standards

NIST

Triage and Remediation

Remediation

To remediate the misconfiguration of default security groups allowing all traffic in AWS, follow these steps using the AWS Management Console:

  1. Login to AWS Console: Go to the AWS Management Console (https://aws.amazon.com/console/) and log in with your credentials.

  2. Navigate to the EC2 Dashboard: Click on the “Services” dropdown in the top left corner and select “EC2” under the Compute section.

  3. Access Security Groups: In the EC2 Dashboard, locate and click on the “Security Groups” option in the left-hand navigation pane.

  4. Identify Default Security Group: Look for the default security group in the list of security groups. The default security group usually has the Group Name as “default” and the description as “default VPC security group”.

  5. Edit Inbound Rules: Click on the default security group to select it. Then, navigate to the “Inbound rules” tab at the bottom of the dashboard.

  6. Remove All Inbound Rules: You will see a list of inbound rules that allow traffic to the instances associated with this security group. To block all traffic, you need to remove all existing inbound rules.

  7. Add Necessary Rules: After removing all inbound rules, you can add specific rules based on your requirements. Click on the “Edit inbound rules” button and add rules for the specific ports and protocols that your instances need to communicate with.

  8. Save Changes: Once you have added the necessary rules, click on the “Save rules” button to apply the changes to the default security group.

  9. Verify Changes: Verify that the default security group now only allows traffic based on the rules you have defined.

By following these steps, you have successfully remediated the misconfiguration of default security groups allowing all traffic in AWS.

Additional Reading: