CloudWiki
Rules
Medium

Ensure default security groups do not allow unrestricted traffic

Security & Compliance
Description

Default security groups are created automatically for every VPC in AWS. By default, these security groups allow all inbound and outbound traffic within the VPC, which can result in unrestricted traffic and security vulnerabilities. Therefore, it is important to ensure that default security groups do not allow unrestricted traffic.

Remediation

To remediate the issue of default security groups allowing unrestricted traffic, follow these steps:

  1. Open the Amazon EC2 console.
  2. In the navigation pane, choose "Security Groups".
  3. Choose the default security group for your VPC.
  4. Choose the "Inbound Rules" tab.
  5. Review the rules and remove any that allow unrestricted traffic (i.e., 0.0.0.0/0).
  6. Create new inbound rules that allow traffic from specific IP addresses, subnets, or security groups, as needed.
  7. Choose the "Outbound Rules" tab.
  8. Review the rules and remove any that allow unrestricted traffic.
  9. Create new outbound rules that allow traffic to specific IP addresses, subnets, or security groups, as needed.
  10. Repeat the process for all default security groups in your VPC.
  11. Consider creating additional security groups with more specific rules to meet your specific networking needs.
  12. Test your application and ensure that it still functions properly with the new security group rules in place.
  13. Monitor your security groups regularly and update the rules as necessary to maintain a secure environment.
Enforced Resources
Note: Remediation steps provided by Lightlytics are meant to be suggestions and guidelines only. It is crucial to thoroughly verify and test any remediation steps before applying them to production environments. Each organization's infrastructure and security needs may differ, and blindly applying suggested remediation steps without proper testing could potentially cause unforeseen issues or vulnerabilities. Therefore, it is strongly recommended that you validate and customize any remediation steps to meet your organization's specific requirements and ensure that they align with your security policies and best practices.