CYBER SECURITY • NETWORKING AND INTERNET SECURITY

Network Diagrams & Data Flows — Interpret basic network diagrams and data flows

Learn to read, construct, and analyze the visual blueprints that reveal how data traverses networks and where vulnerabilities hide.

Historical Context & Motivation

Long before the term "cybersecurity" entered the lexicon, engineers needed systematic ways to represent the interconnection of computing devices and the movement of information between them. The earliest computer networks of the 1960s were small enough that an engineer could hold the entire topology in mind, but as the ARPANET expanded and organizations deployed their own local area networks, informal sketches gave way to formalized network diagrams — standardized visual representations of nodes, links, and the protocols binding them together. In parallel, software engineers developed data flow diagrams (DFDs) as a structured analysis technique for understanding how information enters, is processed by, and exits a system. Together, these two diagram families form the visual backbone of network security analysis, enabling practitioners to identify trust boundaries, single points of failure, and potential attack surfaces long before a single packet is sniffed.

1969
ARPANET Topology Maps
The original ARPANET linked four nodes (UCLA, SRI, UCSB, and Utah). Hand-drawn topology maps documented each IMP (Interface Message Processor) and its host connections — arguably the first network diagrams used for operational planning.
1979
Structured Analysis & DFDs
Tom DeMarco's "Structured Analysis and System Specification" formalized the data flow diagram notation with processes, data stores, external entities, and data flows. This notation quickly became a standard tool for systems analysts and security reviewers alike.
1993
Cisco Iconography Standardized
Cisco Systems released its widely adopted set of network topology icons — routers, switches, firewalls, clouds — establishing a de facto visual language still in use across the industry today.
2004
STRIDE & Threat-Modeling DFDs
Microsoft's threat-modeling methodology leveraged DFDs augmented with trust boundaries as the primary input artifact, cementing DFDs as a first-class security tool rather than just a software engineering exercise.
2020s
Infrastructure-as-Code Diagrams
Modern cloud platforms auto-generate network diagrams from IaC templates (Terraform, CloudFormation). Security teams now analyze programmatically generated topologies for misconfigured security groups, overly permissive routes, and exposed endpoints.

The central question these diagrams address is deceptively simple: What talks to what, over which path, carrying which data, and who can observe or modify that data in transit? Answering this question visually rather than textually enables faster pattern recognition, more effective communication among multidisciplinary teams, and — critically for security — the identification of trust boundary crossings where threats concentrate.

Core Principles & Definitions

Before diving into specific diagram types, it is essential to internalize several foundational ideas that govern how network professionals and security analysts create and interpret these visual artifacts. A diagram is only as useful as the conventions it obeys; ambiguity in notation leads directly to ambiguity in security analysis.

1

Topology vs. Data Flow

A network topology diagram shows the physical or logical arrangement of devices and links — what is connected to what. A data flow diagram abstracts away physical infrastructure to show how data moves between processes, stores, and external entities. Security analysis requires both perspectives.
2

Nodes & Edges

Every network diagram is fundamentally a graph. Nodes represent devices or processes (routers, servers, clients, firewalls). Edges represent communication links — wired, wireless, or logical tunnels. Directed edges indicate permissible direction of data flow; undirected edges indicate bidirectional communication.
3

Trust Boundaries

A trust boundary is a dashed or colored line separating zones of different privilege or trust levels. Data crossing a trust boundary must be validated, authenticated, or encrypted. These boundaries are the single most important security annotation on any diagram.
4

Abstraction Levels

Diagrams exist at multiple abstraction levels: a context diagram (Level 0) shows the system as a single process with external entities; decomposed levels (Level 1, 2, …) reveal internal processes and data stores. Security reviews typically start at Level 0 and drill down where risk concentrates.
5

Standard Iconography

Industry-standard icons (Cisco, AWS architecture icons, UML component symbols) provide a shared vocabulary. Routers, switches, firewalls, load balancers, databases, and cloud services each have recognizable symbols, preventing misinterpretation across teams.
KEY TAKEAWAY
Think of a network diagram like an architectural blueprint and a data flow diagram like a plumbing schematic for the same building. The blueprint tells you where the rooms and walls are (topology), while the plumbing schematic tells you how water enters, flows through pipes, and exits (data flow). A security analyst is the building inspector who checks both: Are the walls load-bearing where they should be? Does any pipe cross from the sewer line into the drinking water without a backflow preventer? Trust boundaries are those backflow preventers — wherever data crosses one, you must verify it is safe.

Visual Explanation — Network Topology Diagram

This enterprise topology diagram illustrates three security zones: the untrusted Internet (red), a DMZ housing publicly accessible servers (amber), and the trusted internal LAN (green). Two firewalls enforce traffic rules at each trust boundary crossing. The IDS/SIEM (violet) monitors the internal zone for anomalous behavior.

The diagram above follows a layered layout convention widely used in security architecture reviews. Traffic originating from the Internet must pass through Firewall 1 before reaching any DMZ service. If a DMZ server needs to query the internal database, that request must traverse Firewall 2 — which enforces a far more restrictive policy (e.g., only TCP 3306 from the web server's IP to the database). Notice that the directed arrows make it immediately clear which direction initiation of connections is allowed; an analyst can spot, at a glance, that the database should never initiate outbound connections to the Internet.

Reading a topology diagram for security purposes involves scanning every edge and asking: Is this connection necessary? Is the data encrypted in transit? Could an attacker who compromises one node use this link to pivot laterally? These questions are far easier to answer visually than by combing through router ACLs or firewall rule tables.

How Data Flow Diagrams Work

While a network topology diagram answers "what physical or logical connections exist," a data flow diagram (DFD) answers "what data moves where, processed by whom, and stored how." DFDs use a deliberately minimal set of four symbol types, making them straightforward to draw and to analyze for threat modeling. The notation most commonly used in security contexts derives from the Yourdon–DeMarco convention, though the Gane–Sarson variant (rectangles with rounded corners for processes) is also common.

The Four DFD Elements

The four canonical DFD elements and their security implications
ElementSymbolDescriptionSecurity Significance
External EntityRectangleA source or sink of data outside the system boundary — users, third-party APIs, partner systems.All input from external entities is untrusted and must be validated at the system boundary.
ProcessCircle (Yourdon) or Rounded Rect (Gane–Sarson)A transformation applied to data — authentication logic, encryption, data parsing, business rules.Each process is a potential point of code vulnerability: injection, logic flaws, buffer overflows.
Data StoreOpen-ended rectangle (two parallel lines)A repository where data is persisted — databases, log files, configuration stores, caches.Data at rest must be encrypted; access must be authenticated and authorized; backups must be secured.
Data FlowLabeled arrowA directed arrow showing data moving between elements, labeled with the data type (e.g., "HTTP request", "SQL query").Each flow crossing a trust boundary is a candidate for encryption, authentication, and input validation checks.

Decomposition Levels

DFDs are hierarchical. A Level 0 (context) diagram depicts the entire system as a single process, surrounded by external entities and the data flows connecting them. This provides the highest-level view, ideal for executive briefings and initial threat modeling. A Level 1 diagram decomposes that single process into its major sub-processes and internal data stores, revealing how data is routed internally. Further decomposition into Level 2 and beyond is performed selectively, typically only for high-risk sub-processes. The rule of thumb in security analysis is to decompose until every trust boundary crossing is visible and every process handling sensitive data is explicitly represented.

🔐 Trust Boundary Annotation
In security-oriented DFDs, a fifth element is added: a trust boundary drawn as a dashed line enclosing elements that share the same privilege level. Every data flow that crosses this boundary is a potential attack surface and must be documented as such in a threat model. Microsoft's STRIDE framework, for example, systematically analyzes each boundary-crossing flow for Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege threats.

Detailed Breakdown — Anatomy of a Data Flow Diagram

This Level 1 DFD decomposes a web application's login subsystem into three processes: P1 (Auth Handler) validates credentials against the User DB, P2 (Session Manager) creates and stores session tokens, and P3 (Audit Logger) records events. The red dashed line represents the server trust boundary — note that the User and Admin external entities sit outside this boundary, meaning all incoming data flows must be treated as untrusted.

Examining this DFD from a security perspective reveals several critical analysis points. First, the "credentials" flow from User to P1 crosses the trust boundary — this flow must use TLS encryption (HTTPS) to prevent eavesdropping. Second, P1's lookup to D1 (User DB) should use parameterized queries to prevent SQL injection. Third, the session token stored in D2 is a high-value target; if an attacker gains access to the Session Store, they can hijack any active session. Fourth, P3's audit log provides a detective control — but only if the log itself is tamper-resistant and stored with appropriate access controls. Each of these observations emerges naturally from reading the diagram's flows and boundary crossings.

Reading Strategy for DFDs

  1. Enumerate all external entities — these are the entry and exit points of the system and the primary sources of untrusted input.
  2. Trace each data flow — follow every arrow from source to destination. Ask: What type of data does this carry? Is it sensitive (PII, credentials, tokens)?
  3. Identify trust boundary crossings — every arrow that crosses a dashed boundary is a candidate for authentication, authorization, encryption, and input validation.
  4. Examine data stores — for each store, determine what data it holds, who can read from it, who can write to it, and whether the data is encrypted at rest.
  5. Apply threat categories — use a framework like STRIDE to systematically assess each element and flow for relevant threats.

Worked Example — Threat Identification via DFD Analysis

Consider the Level 1 DFD from Section 5. A security analyst is asked to enumerate threats for the login subsystem using the STRIDE framework. Below is a systematic walkthrough of how to interpret the diagram and produce actionable security findings.

Threat Analysis of the Login DFD
1
Step 1 — Identify External Entities & Entry PointsFrom the diagram, two external entities interact with the system: User and Admin. The User sends credentials to P1 (Auth Handler) and receives an auth result. The Admin sends log queries to P3 (Audit Logger) and receives log results. These four data flows cross the server trust boundary.
4 boundary-crossing data flows identified
2
Step 2 — Analyze Trust Boundary Crossings for STRIDE ThreatsFor the "credentials" flow (User → P1), apply each STRIDE category. Spoofing: An attacker could impersonate a legitimate user with stolen credentials — mitigate with multi-factor authentication. Tampering: Credentials could be modified in transit — mitigate with TLS. Information Disclosure: Credentials could be intercepted — mitigate with TLS. Denial of Service: Brute-force login attempts could overwhelm P1 — mitigate with rate limiting.
4 threats identified for a single boundary-crossing flow
3
Step 3 — Analyze Data StoresD1 (User DB) stores password hashes. Threats include: unauthorized access leading to credential theft (Information Disclosure), injection attacks via the hash lookup flow (Tampering), and deletion of user records (Denial of Service). Mitigations include encrypting data at rest, using parameterized queries, applying principle of least privilege for DB account permissions, and maintaining regular backups.
3 additional threats identified for D1 alone
4
Step 4 — Analyze Internal FlowsThe internal flow from P1 to P2 ("user ID") does not cross the trust boundary, so it inherits the trust level of the server zone. However, if P1 and P2 run as separate microservices, an internal trust boundary may exist — the DFD should be updated to reflect this. The flow from P2 to D2 ("session token") stores a high-value artifact; if the session store is in-memory (e.g., Redis without authentication), an attacker with network access to the server segment could steal tokens.
Potential missing trust boundary identified → DFD revision needed
5
Step 5 — Compile Threat RegisterAggregating all findings, the analyst produces a threat register: 4 threats for the credentials flow, 4 for the auth result flow, 3 for D1, 2 for D2, 2 for D3, and additional threats for each process and remaining flows. The total for this simple three-process DFD typically reaches 15–25 distinct threats, each paired with a mitigation recommendation. This demonstrates why DFD-driven analysis is systematic and auditable — the diagram ensures nothing is overlooked.
15–25 threats documented with corresponding mitigations

Strengths, Limitations & Diagram Comparisons

No single diagram type provides a complete security picture. Understanding the strengths and limitations of network topology diagrams versus data flow diagrams — and when to use each — is essential for effective security analysis.

Network topology vs. data flow diagrams for security analysis
CriterionNetwork Topology DiagramData Flow Diagram
Primary focusPhysical or logical device interconnections, IP addressing, network segmentsData movement between processes, stores, and external entities
Best forInfrastructure review, firewall rule validation, network segmentation analysisApplication-layer threat modeling, privacy impact assessments, compliance reviews
Shows trust boundariesImplicitly via VLANs, subnets, and firewall placementExplicitly via dashed boundary lines — a first-class element
Abstraction levelTypically a single flat view; may use layered diagrams (L1/L2/L3)Hierarchical decomposition (Level 0 → Level 1 → Level 2 …)
LimitationDoes not show application-level data semantics (what data is carried, how it is transformed)Does not show physical device details, IP addresses, or link media types
Staleness riskHigh — infrastructure changes rapidly; auto-discovery tools helpModerate — changes with application redesigns, but data semantics evolve more slowly
KEY TAKEAWAY
Topology diagrams and DFDs are complementary, not competing. In a thorough security assessment, the topology diagram reveals network-layer attack surfaces (misconfigured firewalls, exposed management ports, lack of segmentation), while the DFD reveals application-layer attack surfaces (injection points, unencrypted data flows, overprivileged data stores). Think of them as two orthogonal cross-sections through the same system: one cuts along the infrastructure axis, the other along the data axis. A robust security review uses both.

Connection to Advanced Theory — Threat Modeling & Zero Trust

The network diagrams and DFDs covered in this lesson form the input artifacts for more sophisticated security methodologies. Understanding these diagrams is a prerequisite for advanced frameworks used in industry and research.

From foundational diagrams to advanced security frameworks
Concept in This LessonAdvanced Extension
Trust boundaries on DFDsSTRIDE threat modeling — systematically applies six threat categories to each DFD element and boundary crossing
Firewall placement in topology diagramsZero Trust Architecture (ZTA) — eliminates implicit trust zones; every flow requires authentication regardless of network location
DFD decomposition levelsAttack trees & attack graphs — formal graph models that enumerate all paths an attacker can take to reach an asset, often derived from DFD analysis
Network segmentation zonesSoftware-defined networking (SDN) / microsegmentation — programmatic, fine-grained network control that dynamically enforces segmentation policies
Manual diagram creationAutomated topology discovery — tools like Nmap, cloud provider APIs, and network management platforms automatically generate and continuously update network diagrams

The shift toward Zero Trust Architecture is particularly noteworthy because it fundamentally challenges the perimeter-based trust model depicted in traditional three-zone topology diagrams. In a zero-trust paradigm, every data flow — whether it crosses a traditional trust boundary or not — is treated as potentially hostile. This means the DFD becomes even more critical, since the analyst must annotate every flow with its authentication mechanism, encryption status, and authorization policy, not just those at the perimeter. Future coursework in this area will build directly on the diagramming skills developed in this lesson.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain the difference between a network topology diagram and a data flow diagram. In what specific scenario would a security analyst prefer a DFD over a topology diagram, and why?
PROBLEM 2BASIC APPLICATION
Given a simple network with: (1) an external user on the Internet, (2) a firewall, (3) a web server in a DMZ, (4) an internal database server, and (5) a second firewall between the DMZ and internal LAN — list all the trust boundaries and identify each data flow that crosses a trust boundary.
PROBLEM 3INTERMEDIATE
An organization's Level 1 DFD shows a process labeled "P2: Payment Processor" that receives credit card numbers from an external entity (Customer), queries a data store (D1: Transaction Log), and sends an authorization request to another external entity (Payment Gateway). The trust boundary encloses P2 and D1 but excludes both external entities. Identify at least four distinct threats using the STRIDE model, specifying which DFD element or flow each threat applies to.
PROBLEM 4APPLIED
You are a security consultant reviewing a startup's cloud architecture. They provide you with a network topology diagram showing: a single VPC with no subnets, all services (web app, API, database, admin panel) running as containers on the same host, exposed to the Internet via a single public IP with no WAF or firewall rules beyond the default "allow all outbound." Describe at least three specific security issues you would identify from this diagram and propose corresponding architectural changes, sketching how the revised topology would look.
PROBLEM 5CRITICAL THINKING
A colleague argues that in a Zero Trust Architecture, traditional network topology diagrams with perimeter-based trust zones are obsolete and that only DFDs with per-flow authentication annotations matter. Critically evaluate this claim. Are there aspects of security analysis for which topology diagrams remain indispensable even in a zero-trust environment? Under what conditions might the two diagram types need to be unified into a single representation?

Lesson Summary

This lesson introduced two foundational visual tools for security analysis. Network topology diagrams depict the physical and logical arrangement of devices, links, and security zones — organizing infrastructure into untrusted, DMZ, and trusted zones separated by firewalls. Data flow diagrams (DFDs) abstract away infrastructure to show how data moves between external entities, processes, and data stores, using hierarchical decomposition from Level 0 (context) through Level 1 and beyond. The most critical element in security-oriented diagrams is the trust boundary — every data flow crossing a trust boundary represents a potential attack surface requiring authentication, encryption, and input validation.

Together, these diagram types enable systematic threat modeling using frameworks like STRIDE, where each DFD element and boundary crossing is analyzed for spoofing, tampering, repudiation, information disclosure, denial of service, and elevation of privilege threats. Looking forward, these skills connect directly to Zero Trust Architecture, attack graph analysis, and automated topology discovery — advanced topics that all build upon the ability to read, construct, and critically interpret network diagrams and data flows.

Varsity Tutors • Cyber Security • Network Diagrams & Data Flows