Threat Modeling Diagrams

Diagrams make threats visible
Drawing your system architecture reveals components , data flows , trust boundaries , and attack surfaces that text descriptions miss

Diagram Types

Data Flow Diagrams (DFD) Most common threat modeling diagram type

  • External Entity - Outside the system boundary (user, third-party API)
  • Process - System component that processes data
  • Data Store - Where data is stored (database, filesystem)
  • Data Flow - Movement of data between elements
  • Trust Boundary - Where privilege level changes

Trust Boundaries

Identify these explicitly because threats cross boundaries:

  • Network boundary (internal vs external)
  • Process boundary (user-space vs kernel)
  • Privilege boundary (user vs admin)
  • Organizational boundary (your system vs third-party)
  • Security domain boundary (different classification levels)

Example Mermaid DFD:

Attack Trees

Visualize attacker goals and sub-goals:

Sequence Diagrams for Threats

Show the order of operations in an attack:

Common Diagramming Tools

  • Draw.io / diagrams.net - Free, integrates with Google/OneDrive
  • Microsoft Threat Modeling Tool - Built for STRIDE, generates threat lists
  • OWASP Threat Dragon - Open-source web-based
  • Mermaid.js - Code-to-diagram (MkDocs compatible)
  • PlantUML - Code-based diagrams
  • Lucidchart - Commercial , collaboration features

What Every Threat Model Diagram Needs

  1. All entry points (where data enters the system)
  2. All trust boundaries (where privilege levels change)
  3. All data stores (where data persists)
  4. All data flows (how data moves between components)
  5. External dependencies (third-party services, APIs)
  6. Authentication/authorization points

For Each Element Ask

  • External Entity - Can it be impersonated?
  • Process - Can it be compromised?
  • Data Flow - Is it encrypted? Authenticated?
  • Data Store - Who can read/write? Is it encrypted at rest?
  • Trust Boundary - Is the boundary enforced?

Posted · Updated