Creating a Data Flow Diagram (DFD)
What you'll learn: How to draw a simple visual map of your system that shows where data moves and where it might be vulnerable.
What Is a Data Flow Diagram?
A Data Flow Diagram (DFD) is a visual blueprint of your system that shows how information moves through it. Think of it like a subway map—it doesn't show every street detail, but it clearly shows stations (where things happen), tracks (how data moves), and connection points (where passengers enter or exit).
In threat modeling, DFDs help you see the trust boundaries and entry points you identified earlier, making it easier to spot where attackers might strike.
The Four Building Blocks
Every DFD uses four simple symbols:
- External Entities (rectangles): People or systems outside your control (users, third-party APIs)
- Processes (circles): Actions that transform or handle data (login service, payment processor)
- Data Stores (parallel lines): Where data sits (databases, file systems, caches)
- Data Flows (arrows): How information moves between the above elements
Why Security Teams Love DFDs
When you draw your system this way, threats become visible. You can ask: "What if someone intercepts this arrow?" or "What if they tamper with this data store?" Each arrow crossing a trust boundary is a potential attack vector. Each process handling sensitive data needs proper complete mediation.
Key Takeaway: A DFD turns abstract system architecture into a concrete visual tool that reveals where data flows—and where threats can flow with it.