π AWS VPC Route Table for VPC Peering does not follow the least privilege principle π’
- Contextual name: π Route Table for VPC Peering does not follow the least privilege principle π’
- ID:
/ce/ca/aws/vpc/route-table-for-vpc-peering-least-privilege
- Located in: π AWS VPC
Flagsβ
- π’ Impossible policy
- π’ Policy with categories
- π’ Policy with type
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Descriptionβ
Descriptionβ
Once a VPC peering connection is established, routing tables must be updated to establish any connections between the peered VPCs. These routes can be as specific as desired - even peering a VPC to only a single host on the other side of the connection.
Rationaleβ
Being highly selective in peering routing tables is a very effective way of minimizing the impact of breach as resources outside of these routes are inaccessible to the peered VPC.
Auditβ
Review routing tables of peered VPCs for whether they route all subnets of each VPC and whether that is necessary to accomplish the intended purposes for peering the VPCs.
From Command Lineβ
- List all the route tables from a VPC and check if
GatewayId
is pointing to a<peering_connection_id>
(e.g. pcx-1a2b3c4d) and ifDestinationCidrBlock
is as specific as desired:aws ec2 describe-route-tables --filter "Name=vpc-id,Values=<vpc_id>" --query "RouteTables[*].{RouteTableId:RouteTableId, VpcId:VpcId, Routes:Routes, AssociatedSubnets:Associations[*].SubnetId}"
... [see more](description.md)
Remediationβ
Remediationβ
Remove and add route table entries to ensure that the least number of subnets or hosts as is required to accomplish the purpose for peering are routable.
From Command Lineβ
- For each
<route_table_id>
containing routes non compliant with your routing policy (which grants more than desiredleast access
), delete the non compliant route:aws ec2 delete-route --route-table-id <route_table_id> --destination-cidr-block <non_compliant_destination_CIDR>
- Create a new compliant route:
aws ec2 create-route --route-table-id <route_table_id> --destination-cidr-block <compliant_destination_CIDR> --vpc-peering-connection-id <peering_connection_id>
policy.yamlβ
Linked Framework Sectionsβ
Section | Sub Sections | Internal Rules | Policies | Flags |
---|---|---|---|---|
πΌ CIS AWS v1.2.0 β πΌ 4.4 Ensure routing tables for VPC peering are "least access" | 1 | |||
πΌ CIS AWS v1.3.0 β πΌ 5.4 Ensure routing tables for VPC peering are "least access" | 1 | |||
πΌ CIS AWS v1.4.0 β πΌ 5.4 Ensure routing tables for VPC peering are "least access" | 1 | |||
πΌ CIS AWS v1.5.0 β πΌ 5.5 Ensure routing tables for VPC peering are "least access" - Level 2 (Manual) | 1 | |||
πΌ CIS AWS v2.0.0 β πΌ 5.5 Ensure routing tables for VPC peering are "least access" - Level 2 (Manual) | 1 | |||
πΌ CIS AWS v3.0.0 β πΌ 5.5 Ensure routing tables for VPC peering are "least access" - Level 2 (Manual) | 1 | |||
πΌ CIS AWS v4.0.0 β πΌ 5.6 Ensure routing tables for VPC peering are "least access" (Manual) | 1 | |||
πΌ CIS AWS v4.0.1 β πΌ 5.6 Ensure routing tables for VPC peering are "least access" (Manual) | 1 | |||
πΌ CIS AWS v5.0.0 β πΌ 5.6 Ensure routing tables for VPC peering are "least access" (Manual) | 1 | |||
πΌ Cloudaware Framework β πΌ Secure Access | 43 |