# Lateral Movement

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

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/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.

Practice exams covering Lateral Movement: [ANS-C01 AWS Certified Advanced Networking - Specialty](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [SCS-C03 AWS Certified Security - Specialty](https://blowstack.com/practice-exams/aws-certified-security-specialty).

## 6 key aspects of Lateral Movement

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

1. **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.
2. **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.
3. **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.
4. **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.
5. **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.
6. **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.

- **[Amazon VPC](https://blowstack.com/tools/cloud-services-hub/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.
- **[AWS Transit Gateway](https://blowstack.com/tools/cloud-services-hub/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.
- **[AWS CloudTrail](https://blowstack.com/tools/cloud-services-hub/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.
- **[Amazon GuardDuty](https://blowstack.com/tools/cloud-services-hub/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.

## Lateral Movement exam questions

Real practice exam questions on Lateral Movement, with the correct answer and its explanation.

### Question 1 (DEA-C01)

**Question:**

A security team discovers stolen credentials on an application instance. The team wants to investigate whether the instance is being used to probe or reach other internal workloads, including workloads in the same VPC.

A data engineer uses Amazon Athena to query a curated table named internal_flows. It contains VPC Flow Log records for traffic between internal workloads on administrative ports. Historical network-interface mappings have already resolved each record to source_workload_id and destination_workload_id. Each record also contains a five-minute window_start and an action of ACCEPT or REJECT. Multiple records can exist for the same source-destination pair within a window, including both actions.

The engineer must return one row per source workload per five-minute window with two metrics:
• The number of distinct destination workloads contacted, regardless of whether traffic was accepted or rejected.
• The number of distinct destination workloads for which at least one record shows accepted traffic.

Which Athena query meets these requirements?

**Correct answer:** SELECT source_workload_id, window_start,
       COUNT(DISTINCT destination_workload_id) AS destinations_contacted,
       COUNT(DISTINCT CASE WHEN action = 'ACCEPT'
                           THEN destination_workload_id END) AS destinations_allowed
FROM internal_flows
GROUP BY source_workload_id, window_start;

**Explanation:** Grouping by source workload and window preserves the investigation's starting point and time interval. The first distinct count includes both blocked probes and permitted traffic without counting destinations repeatedly. The conditional distinct count includes each destination with accepted traffic once. Accepted traffic indicates a permitted network path, not proof that authentication or compromise succeeded.

## Practice Lateral Movement in a full exam

Questions on Lateral Movement in each practice exam, with every answer option and an explanation for each:

- [SCS-C03](https://blowstack.com/practice-exams/aws-certified-security-specialty): 2 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 1 question
- [ANS-C01](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty): 1 question

## What is Lateral Movement

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.

## Learn Lateral Movement in lessons

3 short lessons on Lateral Movement in 2 certification courses.

- DEA-C01: Lateral Movement: internal activity baselines (Premium), https://app.blowstack.com/lessons/lateral-movement-internal-activity-baselines-dea-c01
- SCS-C03: Lateral Movement: linking evidence across trust boundaries (Premium), https://app.blowstack.com/lessons/lateral-movement-linking-evidence-across-trust-boundaries-scs-c03
- SCS-C03: Lateral Movement: log coverage for reachable paths (Premium), https://app.blowstack.com/lessons/lateral-movement-log-coverage-for-reachable-paths-scs-c03
