The Threat Modeling Process
Now that you know what to look for, here's how to do it β a repeatable five-step process for conducting threat models on any system, from a simple login page to a cloud-native microservices platform.
π― Learning Objectives
- Execute the five-step threat modeling process end to end
- Create a basic Data Flow Diagram (DFD) with correct elements and trust boundaries
- Systematically enumerate threats using STRIDE per element
- Score and prioritize threats using likelihood Γ impact
- Produce actionable mitigation decisions for each threat
1The 5-Step Process Overview
2Step 1 β Define Scope & Identify Assets
Before drawing a single box, answer: What are we modeling? Scope creep kills threat models. Be explicit about what's in and out of scope.
Scoping Questions to Answer
- βWhat feature or system are we modeling?
- βWhat data does it handle? (PII, financial, health, secrets?)
- βWho are the legitimate users? (employees, customers, admins?)
- βWhat are the external dependencies? (3rd-party APIs, cloud services?)
- βWhat are the crown jewels? (most valuable assets to protect)
- βWhat is explicitly OUT of scope?
3Step 2 β Draw the Architecture (DFD)
A Data Flow Diagram (DFD) is the visual backbone of your threat model. It shows how data moves through your system β who sends it, what processes it, where it's stored, and where trust boundaries exist.
DFD Elements
DFD Drawing Rules
- Data must flow somewhere β every flow arrow has a source and destination
- Label every flow β what data moves? (credentials, user records, API responses)
- Every trust boundary must be visible β draw dashed lines where trust levels change
- Processes have numbers β makes them easy to reference in threat tables
- Keep it honest β draw how the system actually works, not how you wish it worked
4Step 3 β Identify Threats (STRIDE per Element)
With the DFD drawn, go through each element systematically and apply STRIDE. The output is a threat table β the core deliverable of a threat model.
| # | Component | STRIDE | Threat Description | Priority |
|---|---|---|---|---|
| T-01 | Process 1: Reset Handler | Spoofing | Attacker submits another user's email and receives a reset link | High |
| T-02 | Flow β₯: Email delivery | Info Disc. | Reset link sent to compromised/wrong email exposes token | Medium |
| T-03 | Data Store: Token Store | Tampering | Attacker guesses or brute-forces the reset token (if too short) | High |
| T-04 | Process 1: Reset Handler | Denial of Svc | Flood of reset requests for a single account locks out the user | Medium |
| T-05 | Flow β¦: Token + New PW | Tampering | MITM intercepts the reset form submission and changes the new password | Low |
| T-06 | Process 3: Password Updater | Elevation | Token replay: used token is not invalidated, can reset password again | High |
5Step 4 β Score and Prioritize Risks
Not all threats are equal. You can't fix everything at once, so you need a way to decide what to fix first. The simplest approach: score each threat on Likelihood and Impact.
Scoring Criteria
- How easy is it to exploit? (skill required)
- Is there existing tooling (exploit kits)?
- How exposed is the attack surface?
- Has this been exploited in similar systems before?
- How much data would be exposed or corrupted?
- What's the financial/legal consequence?
- How many users are affected?
- Is the damage reversible?
| Threat ID | Likelihood | Impact | Risk Score | Priority Action |
|---|---|---|---|---|
| T-01 | High | High | Critical | Fix before launch |
| T-03 | High | High | Critical | Fix before launch |
| T-06 | High | High | Critical | Fix before launch |
| T-02 | Medium | High | High | Next sprint |
| T-04 | Medium | Medium | Medium | Next sprint |
| T-05 | Low | Low | Low | Document & monitor |
6Step 5 β Mitigate & Validate
For each threat (starting with Critical), decide on a mitigation strategy. There are four valid responses β you don't always have to fix:
Mitigation Table β Password Reset Example
| Threat ID | Mitigation Strategy | Specific Control | Owner |
|---|---|---|---|
| T-01 | Mitigate | Rate-limit reset requests per email; send reset only if email exists (don't confirm which emails are registered) | Backend team |
| T-03 | Mitigate | Generate 256-bit cryptographically random tokens. Expire after 15 minutes. Single use only. | Backend team |
| T-06 | Mitigate | Invalidate token immediately after use. Delete all outstanding reset tokens on password change. | Backend team |
| T-02 | Accept | If email provider is compromised, we can't prevent token interception. Document as accepted risk; monitor for unusual resets. | Security team |
| T-04 | Mitigate | Max 3 reset requests per email per hour. Return same success message regardless of whether email exists. | Backend team |
| T-05 | Transfer | Enforced HTTPS/TLS already mitigates MITM. Responsibility on network layer (TLS termination at load balancer). | Infra team |
7Module Summary
- Scope β define what you're modeling, identify crown jewels
- Model β draw DFD with elements (external entities, processes, data stores, flows) and trust boundaries
- Identify β apply STRIDE per element; build a numbered threat table
- Score β Likelihood Γ Impact β prioritized list (Critical, High, Medium, Low)
- Mitigate β for each threat: Mitigate, Transfer, Eliminate, or Accept (with documentation)