VPC and Network Enumeration
Network topology shapes what is reachable from a compromised resource. VPC peering, transit gateways, and direct connections extend the blast radius far beyond a single VPC.
Key network components to enumerate:
- VPCs and their CIDR ranges
- Subnets with public IP auto-assign enabled
- Internet gateways and NAT gateways
- VPC peering connections, especially cross-account
- Transit gateway attachments linking multiple VPCs
VPCs
Multiple VPCs in an account often indicate environment separation (dev/staging/prod). VPC peering between them is a lateral movement path.
Subnets
MapPublicIpOnLaunch: true = instances launched here get public IPs automatically.
Internet Gateways
A VPC with an internet gateway attached and a route table pointing 0.0.0.0/0 to it has public internet access.
Route Tables
Look for routes to igw-* (internet gateway) on 0.0.0.0/0: those subnets have outbound internet access.
VPC Peering Connections
Peering connections link VPCs: a compromised instance in one VPC may reach resources in the peer:
Check if cross-account peering exists: AccepterVpcInfo.OwnerId differs from RequesterVpcInfo.OwnerId.
Transit Gateways
Transit gateways connect multiple VPCs and on-premises networks. Presence indicates a larger connected environment:
NAT Gateways
NAT gateways give private subnets outbound internet access. Useful for understanding egress paths from internal resources:
VPC Flow Logs
Check if VPC flow logs are enabled: relevant for understanding detection coverage:
ACTIVE flow logs mean network traffic is being logged to CloudWatch or S3. Adjust lateral movement techniques accordingly.
Network ACLs
NACLs are stateless filters at the subnet level: stricter than security groups and harder to bypass:
A default NACL allows all traffic. Custom NACLs with DENY rules on specific ports block traffic even if the security group allows it.