Threat Modeling¶
Threat modeling is identifying what could go wrong before it does
Instead of reacting to breaches you systematically analyze a system to find vulnerabilities , prioritize risks , and implement mitigations before attackers exploit them
Why Threat Model
- Proactive security (find issues during design not after deployment)
- Cost-effective (fixing design flaws is cheaper than patching production)
- Structured approach (methodology replaces panic)
- Communication tool (get stakeholders on same page about risks)
- Compliance requirement (many standards require threat modeling)
The Threat Modeling Process
- Define Scope - What system are we analyzing?
- Decompose System - Identify components, data flows, trust boundaries
- Identify Threats - What can go wrong at each component?
- Prioritize Risks - Which threats matter most?
- Define Mitigations - How do we address each threat?
- Document - Record findings for audit and iteration
Key Concepts
- Asset - Something of value (data, system, reputation)
- Threat - Potential danger to an asset
- Vulnerability - Weakness that can be exploited
- Risk - Likelihood * Impact of threat exploiting vulnerability
- Control - Mitigation that reduces risk
- Trust Boundary - Where trust levels change (crossing is risky)
Common Threat Modeling Frameworks
- STRIDE - Microsoft's threat categorization (Spoofing, Tampering, Repudiation, Info Disclosure, DoS, Elevation)
- PASTA - Process for Attack Simulation and Threat Analysis (7 stages)
- LINDDUN - Privacy-focused threat modeling
- Trike - Risk-based methodology
- Attack Trees - Graphical threat analysis
When to Threat Model
| Phase | Benefit |
|---|---|
| Design | Catch architectural flaws cheaply |
| Code Review | Validate implementation against threats |
| Pre-Release | Final security check |
| Post-Incident | Understand breach and improve |
| Regular Reviews | Adapt to environment changes |
Threat Modeling Mindset
- Think like an attacker (what would you do to break this?)
- Question assumptions (is this trust boundary real?)
- Follow the data (where does sensitive data go?)
- Check the edges (interfaces between components are risky)
- Prioritize ruthlessly (not all threats are equal)