Lesson 4 of 4 VPC Network Security

Finding Unintended Network Paths

This lesson explains how analysis tools find network paths that should not exist before an attacker does, and provide auditors with evidence that they do not, since network configurations drift and complex routing hides unintended paths.

Learning outcomes

After completing this lesson, you will be able to:

  • Choose between Network Access Analyzer, Reachability Analyzer and other tools.
  • Define a Network Access Analyzer scope that proves no internet path reaches a tier.
  • Describe continuous checks with AWS Config and Security Hub.

Analysis tools

Four tools find network paths that permit unintended access, and each answers a different question. Network Access Analyzer checks your whole network against a rule you define, a Network Access Scope, and reports every path that violates it. For example, a scope might state that there is no path from any internet gateway to subnets tagged data. Reachability Analyzer examines one source and one destination and explains why traffic can or cannot pass, naming the blocking component, which makes it the tool for troubleshooting connectivity.

Inspector network reachability findings report EC2 ports open to networks outside the VPC and the path that exposes them. Security Hub controls flag security groups that allow 0.0.0.0/0 on risky ports such as SSH and RDP. The following table summarises the tools.

ToolAnswers
Network Access AnalyzerEvery path violating a Network Access Scope, for example "no path from any internet gateway to subnets tagged data"
Reachability AnalyzerWhy one source can or cannot reach one destination
Inspector network reachabilityEC2 ports open to outside networks
Security Hub controlsSecurity groups allowing 0.0.0.0/0 on risky ports
Sort into groups

Which analysis tool?

Exam skills 3.3.5

Choose the tool that answers each network question.

Log in to try this activity Interactive activities are free with an account.

Network Access Analyzer in practice

Network Access Analyzer analyses network configuration, including route tables, security groups, network ACLs, gateways and load balancers, to find paths that match a defined network access scope. It works by reasoning about the configuration rather than by sending traffic, so it can find every possible path, including ones nobody has used yet. It is most effective as a repeatable process. The process consists of the following steps.

  1. Define scopes

    Describe forbidden access, such as the internet reaching data subnets.

  2. Run analyses

    Run them on a schedule and after network changes.

  3. Review findings

    Each finding lists the full path: gateway, route table, load balancer, security group.

  4. Fix or accept

    Remove the path or document an accepted exception.

The following diagram follows a Network Access Analyzer analysis from its access scope to the audit evidence it produces.

Network Access Analyzer as audit evidence. An access scope describes the forbidden access, from any internet gateway to the cardholder data subnets; an analysis evaluates every path, and FindingsFound = false is the evidence. Run on a schedule, it stays current; any finding lists the exact path to remove.
The scenario is illustrative.
Put in order

Network Access Analyzer as a process

Exam skills 3.3.5

Arrange the steps of a repeatable Network Access Analyzer process.

Log in to try this activity Interactive activities are free with an account.

Continuous checks

Network Access Analyzer runs analyses on demand or on a schedule, so other services provide continuous checks between analyses. AWS Config managed rules, such as restricted-ssh and vpc-sg-open-only-to-authorized-ports, evaluate security groups whenever they change. Security Hub controls report the same issues in the organisation's security posture. Firewall Manager content audit policies check security groups across the organisation against approved rules and can remove overly permissive rules automatically, and Config rules can trigger SSM Automation remediation.

Match the pairs

Continuous network checks

Exam skills 3.3.5 · 6.3.1

Match each continuous check with what it does.

Log in to try this activity Interactive activities are free with an account.
Worked example

Proving no internet path reaches the data tier

An auditor asks for evidence that no network path exists from the internet to the subnets holding cardholder data. Network Access Analyzer evaluates every path against a scope that describes the forbidden access:

SCOPE_ID=$(aws ec2 create-network-insights-access-scope --match-paths '[{
  "Source":      { "ResourceStatement": { "ResourceTypes": ["AWS::EC2::InternetGateway"] } },
  "Destination": { "ResourceStatement": { "Resources": ["subnet-0pci1", "subnet-0pci2"] } }
}]' --query NetworkInsightsAccessScope.NetworkInsightsAccessScopeId --output text)

ANALYSIS=$(aws ec2 start-network-insights-access-scope-analysis --network-insights-access-scope-id $SCOPE_ID \
  --query NetworkInsightsAccessScopeAnalysis.NetworkInsightsAccessScopeAnalysisId --output text)
aws ec2 describe-network-insights-access-scope-analyses \
  --network-insights-access-scope-analysis-ids $ANALYSIS --query '[0].FindingsFound'

false is the evidence the auditor wants, and running the analysis on a schedule keeps it current. If findings exist, each lists the exact path so the team can remove it.

Check yourself

Which tool explains why instance A cannot reach instance B?

Show answer

Reachability Analyzer. Network Access Analyzer finds unintended paths that should not exist.

Exam Tips

Remember for the exam

  • To prove that no internet path leads to sensitive subnets, use Network Access Analyzer.
  • To find out why instance A cannot reach B, use Reachability Analyzer.
  • Inspector reports EC2 ports reachable from outside networks.
  • Run Network Access Analyzer on a schedule and after changes.
  • Firewall Manager content audit policies remediate open security group rules.