top of page
Search

VPC Connectivity in AWS and Preventing Lateral Movement

  • Writer: Adam Mason
    Adam Mason
  • Oct 29, 2024
  • 3 min read

I wanted to write up a article between the worlds of cloud and networking, with a focus on Security. In the article that follows we will take a brief look at ways in which you can secure your cloud environment at a high level, including security concepts, cloud services, and architectural decisions to help your business stay secure in the modern day of constant never ending threat actors.

1. Understanding VPC and Network Isolation in AWS

  • AWS Virtual Private Cloud (VPC) forms the backbone/logical underpinning of network segmentation and connectivity. Within a VPC, resource isolation is achieved by configuring subnets, route tables, Network Access Control Lists (NACLs), and security groups. These elements help define network boundaries and control east-west (internal) and north-south (external) traffic flows. VPC's not to be confused with virtual port channels (vPC's) in the traditional networking world, can be isolated onto physical hardware dedicated to your organization or shared between multiple tenants for cost efficiency at the cost of security. This more applies to the services and endpoints, as to the best of my knowledge, Amazon can't separate routing functionality onto separate hardware.

  • AWS Firewall Manager and AWS Network Firewall enforce policies that prevent unauthorized cross-boundary communication, limiting the risk of lateral movement within isolated segments. If you preferred a separate vendors flavor, you have the option of using Network Function Virtualization and hosting virtualized (and probably containerized versions of) the vendors security solution for different or additional segmentation needs.

2. Advanced Segmentation Strategies

  • Network Segmentation and Multi-Account Strategy: To help prevent against lateral movement from occurring, segment environments across different AWS accounts, each with strict network boundaries. Adopting a multi-account strategy enhances isolation, especially for sensitive production workloads, by separating development, staging, and production resources into isolated accounts. AWS Organizations aids in managing such segmented environments effectively, or outside vendors such as Aviatrix provide helpful tools to manage these relationships and interconnect various regional gateways.

  • Micro-segmentation: Apply fine-grained access policies at the workload level with security groups, isolating even workloads within the same VPC (reference back to NFV appliances). This minimizes exposure, making lateral movement more challenging for attackers (provided proper rules are set up based on intended traffic flows).


3. Implementing Least Privilege and Identity-Based Controls


  • Enforcing the principle of least privilege is crucial in restricting access across different parts of the VPC environment. Configuring IAM policies to grant only the minimum permissions required for each resource or service reduces the risk of privilege escalation.

  • Use IAM roles to properly provide privileges based on least privilege principal's, leveraging services such as AWS Key Management Service (KMS) and Identity and Access Management (IAM) to avoid storing sensitive data in unencrypted forms or cleartext, if passwords or authentication keys are needed for downstream services that need to be accessed. To that point Implementing multi-factor authentication (MFA) and regularly rotating keys further enhances security, even though it can be a pain to implement or do on a ongoing basis depending on how the environment is setup initially.


4. AWS Networking and Endpoint Security for Preventing Lateral Movement


  • AWS PrivateLink and VPC Endpoints: With PrivateLink, services within a VPC can connect securely to other AWS services without exposing data to the internet. VPC Endpoints enable controlled connections to Amazon S3 and DynamoDB (innate public cloud services controlled by AWS Service accounts), which limits access within the AWS network and restricts lateral movement across public-facing networks.

  • NACLs and Security Group Rules: Both Network ACLs and Security Groups provide essential firewall functionality like for example access rules. Use these tools to restrict port access and control communication flows to only approved IP addresses and protocols. For optimal results, apply strict outbound and inbound rules, blocking unnecessary inter-VPC or cross-subnet traffic. This will be your basic blocking for layers 3 and 4 of network services.


I hope you have enjoyed this little write up, it has been far too long since I last posted, and am hoping to be better about that in the future.

 
 
 

Recent Posts

See All

Comments


Reach out to me below

  • Black LinkedIn Icon

Thanks for submitting!

Senior Network Engineer and Technology Enthusiast

bottom of page