🚨 The $5.3 Million Holiday DDoS Disaster
In November 2023, an Indonesian e-commerce platform faced the largest retail DDoS attack ever recorded—2.3 million requests per second during their Black Friday sale. The attack originated from over 6,300 IP addresses and escalated within just 6 minutes.
in lost holiday sales, server costs, and emergency mitigation fees during their peak shopping period. The attack exploited weak VPC network controls that could have been prevented with proper security group and NACL configurations.
The root cause? Their VPC had overly permissive security groups (0.0.0.0/0 on multiple ports), no WAF protection, and missing DDoS shields—creating the perfect storm for disaster.
🎯 Want Our Complete AWS Security Checklist?
Don't just secure your VPC—get our comprehensive 20-point security checklist covering all critical AWS configurations. Used by 500+ companies to prevent security incidents and maintain continuous compliance.
🎯 Why VPC Security Misconfigurations Are So Dangerous
Your AWS VPC is the foundation of your entire cloud security posture. Unlike other vulnerabilities that might affect individual resources, VPC misconfigurations expose your entire network infrastructure to attack, potentially compromising hundreds of resources simultaneously.
🏰 The Multi-Layer VPC Defense Architecture
Internet Gateway → WAF → Shield → NACL → Security Groups → EC2 Instances
Each layer provides specific protection against different attack vectors
The Five Most Critical VPC Attack Vectors
🌊 Layer 3/4 DDoS Attacks (Network/Transport Layer)
Volumetric attacks that flood your network with massive amounts of traffic—UDP floods, SYN floods, and amplification attacks. These can overwhelm your VPC's network capacity and knock out entire subnets.
🎯 Layer 7 DDoS Attacks (Application Layer)
Sophisticated HTTP floods targeting your web applications with seemingly legitimate requests. These bypass basic network filters and can exhaust application resources while appearing normal.
🔓 Overly Permissive Security Groups
Security groups with 0.0.0.0/0 access on critical ports (22, 3389, 3306) expose instances to brute force attacks, data exfiltration, and lateral movement within your VPC.
🕳️ Missing NACL Protection
Default NACLs that allow all traffic remove your subnet-level defense, enabling attackers to move freely between subnets once they breach the perimeter.
🚫 No Application Layer Filtering
Without WAF protection, attackers can exploit application vulnerabilities like SQL injection, XSS, and OWASP Top 10 attacks directly against your web applications.
🏗️ VPC Security Architecture Design
Before implementing individual components, it's crucial to understand how VPC security layers work together to create a comprehensive defense strategy.
🛡️ Layer 1: AWS Shield (Network Edge)
Purpose: Protects against network and transport layer (L3/L4) DDoS attacks at the AWS network edge.
Coverage: Automatic protection for all AWS resources, enhanced protection with Shield Advanced.
Detection Time: Seconds to minutes for volumetric attacks.
🔥 Layer 2: AWS WAF (Application Gateway)
Purpose: Filters malicious application layer (L7) traffic and advanced DDoS attacks.
Coverage: Web application protection, bot management, rate limiting.
Detection Time: Real-time request inspection and blocking.
🚧 Layer 3: Network ACLs (Subnet Level)
Purpose: Stateless firewall that controls traffic entering and leaving VPC subnets.
Coverage: Subnet-level traffic filtering with allow/deny rules.
Scope: Affects all instances within the subnet.
🔐 Layer 4: Security Groups (Instance Level)
Purpose: Stateful firewall that controls traffic to individual EC2 instances.
Coverage: Instance-level protection with allow-only rules.
Scope: Granular control per instance or group of instances.
Defense in Depth Strategy
Each layer provides specific protection capabilities:
- Shield: Absorbs volumetric attacks before they reach your VPC
- WAF: Blocks malicious application requests and bot traffic
- NACLs: Provide subnet boundaries and network segmentation
- Security Groups: Create micro-segmentation around individual resources
Prerequisites:
- AWS CLI configured with appropriate permissions
- VPC creation permissions (ec2:CreateVpc, ec2:CreateSubnet, etc.)
- Understanding of CIDR block allocation
Design Principles:
- Network Segmentation: Separate public and private subnets across multiple AZs
- Least Privilege: Default deny with explicit allow rules
- Defense in Depth: Multiple security layers
- Monitoring: Enable VPC Flow Logs for all traffic
Console Steps:
1.1 Create VPC with Secure Defaults
- Navigate to VPC Dashboard → "Create VPC"
- Select "VPC and more" for guided setup
- Name:
secure-vpc-production
- IPv4 CIDR:
10.0.0.0/16
(65,536 IP addresses) - IPv6 CIDR: None (unless specifically required)
- Tenancy: Default
- Enable DNS hostnames and DNS resolution
1.2 Create Multi-AZ Subnet Architecture
1.3 Enable VPC Flow Logs
Security groups act as virtual firewalls at the instance level. We'll create purpose-built security groups following the principle of least privilege.
Console Steps:
2.1 Create Web Tier Security Group
2.2 Create Application Tier Security Group
2.3 Create Database Tier Security Group
2.4 Configure Bastion Host Security Group