CLOUD CONCEPT

Lateral Movement

Lateral movement is an attacker’s progression from an initial foothold to other systems, identities, or resources within an environment.

Cloud Concepts Hub →

What is Lateral Movement

After compromising a workload or identity, an attacker can exploit connectivity, credentials, and trust relationships to reach additional targets. Detecting this progression requires correlating network, DNS, identity, and workload activity rather than monitoring only traffic entering or leaving the environment.

Lateral movement describes how an attacker expands access after gaining an initial foothold. A compromised application server might become a starting point for accessing another server, a database, or an administrative identity. The objective is often to reach valuable data or control systems while using legitimate protocols and credentials. Lateral movement is distinct from initial access and privilege escalation, although an attack can combine all three.

In cloud environments, movement can follow both network paths and identity relationships. An attacker might use stolen credentials to connect to another virtual machine, exploit an exposed internal service, or assume a role that grants access to resources in another account. Network isolation alone therefore does not eliminate lateral movement: an identity with excessive permissions may reach additional resources through cloud APIs without establishing a direct connection between workloads.

Design logging around the actual connectivity model. Identify workload subnets, network interfaces, peering connections, transit hubs, hybrid links, and account boundaries. VPC Flow Logs provide IP traffic metadata for supported interfaces, including addresses, ports, protocol, traffic volume, and ACCEPT or REJECT action. Collect both accepted and rejected traffic when investigating lateral movement. Rejected connections can expose probing, while accepted connections can reveal an attacker successfully using an allowed path.

Transit gateway flow logs add visibility into traffic traversing an AWS Transit Gateway, helping investigators trace movement between attached VPCs and hybrid networks. They do not replace workload-level visibility because traffic that remains inside a VPC does not traverse the transit gateway. Select log fields that preserve attachment and network context, and maintain historical mappings between addresses, interfaces, workloads, accounts, and owners. Otherwise, address reuse and infrastructure changes can make reconstruction unreliable.

Amazon Route 53 Resolver query logging provides DNS context for queries handled by the VPC Resolver. Unexpected lookups for internal administrative services or unfamiliar destinations can support an investigation when correlated with connection attempts. DNS logging does not establish that a connection occurred, and direct-IP connections produce no corresponding lookup. Resolver caching also means repeated queries answered from cache are not individually represented in Resolver query logs.

Network metadata cannot show which command ran or whether authentication succeeded. Correlate it with operating-system authentication logs, endpoint telemetry, application logs, and cloud API audit events. AWS CloudTrail can reveal role assumption and subsequent API activity; relevant data events require explicit configuration. For example, a web server making unusual SSH connections followed by successful logins on another server is stronger evidence than port 22 traffic alone. Suspicious role assumption followed by unusual resource access can reveal identity-based movement even without a direct workload-to-workload connection.

Detection should compare activity with expected communication patterns. New source-to-destination relationships, rapid connections to many internal hosts, and administrative protocols used by an application tier warrant investigation. An ACCEPT record proves neither successful authentication nor compromise, and a REJECT record does not by itself prove malicious intent. Deployment automation, vulnerability scanners, and management systems can produce similar patterns, so enrich alerts with asset roles and approved operational activity.

Broader logging improves reconstruction but increases ingestion, retention, and analysis costs. Flow logs are aggregated metadata rather than packet captures, can contain collection gaps, and are not an instantaneous detection mechanism. Centralize logs with restricted write access, protect retention, and correlate timestamps across sources. Reduce available movement paths through segmentation, narrowly scoped security rules, least-privilege identities, and controlled trust relationships; logging detects and explains movement but does not block it.

Key aspects of Lateral Movement

Effective lateral-movement defense combines restricted network and identity paths with topology-aware logging and correlated evidence.

Post-compromise expansion

Lateral movement starts from an existing foothold and extends access to additional resources. Investigations should reconstruct the sequence of destinations and identities rather than treating each alert as an isolated event.

Network and identity paths

Attackers can move through internal connections or through credentials, role assumptions, and trusted APIs. Combine segmentation with least-privilege permissions because either control alone leaves other paths available.

Topology-aware logging

Place logging where the relevant traffic actually travels. Interface-level flow logs expose workload connections, while transit gateway flow logs expose traffic crossing the transit hub; neither provides universal network coverage.

Multi-source correlation

Combine flow records, DNS queries, API audit events, and workload authentication logs. Correlation helps distinguish probing, permitted connectivity, successful authentication, and subsequent resource access.

Behavioral context

Detect unusual communication relationships and administrative activity relative to each workload’s purpose. Account for approved scanners, deployment tools, and maintenance operations to reduce false positives.

Evidence limitations and retention

Flow records do not contain application payloads, DNS logs do not prove connections, and audit coverage depends on configuration. Protect centralized evidence and retain enough historical asset context to interpret addresses and identities after infrastructure changes.

Cloud services for Lateral Movement

VPC Flow Logs establish workload connection patterns, while transit gateway flow logs reveal traffic crossing shared network boundaries. Route 53 Resolver query logs add destination-name context, and CloudTrail connects suspicious activity to identities and API actions. GuardDuty can surface threat findings that guide investigation across these sources. Centralize retained evidence and correlate timestamps, addresses, network interfaces, attachments, and role sessions with asset inventory. Add endpoint and application authentication logs to establish what actually happened after a connection. Together, these sources support reconstruction of attacker progression without treating any single log record as proof of compromise.

Virtual private cloud VPC_32 image Amazon VPC

VPC Flow Logs record supported network-interface traffic metadata for investigating internal probing and unexpected connections. Capture accepted and rejected traffic, and use security groups and network ACLs to restrict unnecessary communication paths.

Open Amazon VPC →
AWS Transit Gateway image AWS Transit Gateway

Transit gateway flow logs provide visibility into traffic traversing a transit gateway between attached networks. Use attachment context to investigate cross-VPC or hybrid movement, while retaining separate logs for traffic that never reaches the gateway.

Open AWS Transit Gateway →
AWS CloudTrail image AWS CloudTrail

CloudTrail records supported API activity that can expose suspicious role assumptions and subsequent actions across resources or accounts. Configure appropriate trails or event data stores and relevant data events; network flow logs alone cannot reconstruct identity-based movement.

Open AWS CloudTrail →
Amazon GuardDuty image Amazon GuardDuty

GuardDuty analyzes supported AWS activity sources for threats, including behaviors that can indicate compromised credentials or workloads. Its foundational analysis uses independent streams of supported network, DNS, and CloudTrail management-event data; enabling customer-managed flow or Resolver query logs is not a prerequisite, but retaining those logs supports deeper investigation.

Open Amazon GuardDuty →