Threat Modeling for Developers: STRIDE, PASTA & DREAD with Practical Examples

SCR Security Research Team
January 19, 2026
18 min read
543 words
Share

What Is Threat Modeling?

Threat modeling is the structured process of identifying security threats, understanding attack surfaces, and designing mitigations — before writing code. It's where you answer: "What can go wrong?"

Microsoft's Data: Internal Microsoft research found that threat modeling at the design phase prevented 64% of security bugs that would otherwise have been found (expensively) during penetration testing or post-release.


When to Threat Model

TriggerExample
New feature designAdding payment processing
Architecture changeMigrating to microservices
New integrationAdding third-party API
Security incidentPost-breach analysis
Compliance requirementGDPR data processing assessment
Periodic reviewQuarterly or per-release

STRIDE was developed by Microsoft and categorizes threats into 6 types:

CategoryThreatQuestionTypical Mitigation
SpoofingIdentity falsificationCan someone pretend to be someone else?Strong authentication, MFA
TamperingData modificationCan data be changed in transit or at rest?Digital signatures, checksums, HTTPS
RepudiationDenying actionsCan a user deny performing an action?Audit logging, digital signatures
Information DisclosureData leakageCan unauthorized users see data?Encryption, access controls
Denial of ServiceSystem disruptionCan the system be made unavailable?Rate limiting, redundancy, CDN
Elevation of PrivilegeGaining unauthorized accessCan a user escalate their permissions?RBAC, input validation, sandboxing

STRIDE Applied: User Authentication System

System: Login page → API → Database → Session management

Spoofing:
  Threat: Attacker uses stolen credentials
  Mitigation: MFA, rate limiting, impossible travel detection

Tampering:
  Threat: Session token modified to change user ID
  Mitigation: Signed JWTs, server-side session validation

Repudiation:
  Threat: User denies making a purchase
  Mitigation: Immutable audit log with timestamps and IP

Information Disclosure:
  Threat: Password hashes exposed via API
  Mitigation: Never return password fields, use Argon2id

Denial of Service:
  Threat: Credential stuffing overwhelms login endpoint
  Mitigation: Rate limiting (5/min), CAPTCHA after 3 failures

Elevation of Privilege:
  Threat: Regular user accesses admin panel
  Mitigation: Server-side role checks on every request

PASTA: Process for Attack Simulation and Threat Analysis

PASTA is a risk-centric methodology with 7 stages:

StageActivityOutput
1. Define ObjectivesBusiness objectives, compliance requirementsSecurity objectives document
2. Define Technical ScopeArchitecture diagrams, data flowsTechnical scope document
3. Application DecompositionDFDs, trust boundaries, entry pointsDecomposition diagram
4. Threat AnalysisThreat intelligence, attack patternsThreat library
5. Vulnerability AnalysisCVEs, weaknesses, scan resultsVulnerability list
6. Attack ModelingAttack trees, abuse casesAttack scenarios
7. Risk Analysis & ManagementRisk rating, mitigation prioritiesRisk treatment plan

DREAD: Threat Scoring

DREAD scores each threat on 5 dimensions (1-10 scale):

DimensionQuestionScore Guide
DamageHow severe is the impact?10 = complete system compromise
ReproducibilityHow easy to reproduce?10 = every time, no special conditions
ExploitabilityHow easy to exploit?10 = automated tool, no skill required
Affected UsersHow many users impacted?10 = all users
DiscoverabilityHow easy to discover?10 = publicly known, Google-findable

Score Interpretation:

  • 40-50: Critical — Fix immediately
  • 30-39: High — Fix this sprint
  • 20-29: Medium — Plan for next cycle
  • 10-19: Low — Backlog

Data Flow Diagram Template

┌──────────────┐         HTTPS          ┌──────────────────┐
│   Browser    │ ─────────────────────► │   API Gateway     │
│  (External)  │ ◄───────────────────── │   (Trust boundary) │
└──────────────┘                        └────────┬─────────┘
                                                 │
                                    ┌────────────┴────────────┐
                                    │                         │
                              ┌─────▼──────┐          ┌──────▼──────┐
                              │  Auth       │          │  Business   │
                              │  Service    │          │  Logic      │
                              │ (Internal)  │          │  (Internal) │
                              └─────┬──────┘          └──────┬──────┘
                                    │                         │
                              ┌─────▼──────┐          ┌──────▼──────┐
                              │  User DB   │          │  Data Store │
                              │ (Secrets)  │          │ (PII)       │
                              └────────────┘          └─────────────┘

Trust boundaries to analyze:

  • Browser ↔ API Gateway (public internet)
  • API Gateway ↔ Internal services (network boundary)
  • Services ↔ Databases (data access boundary)

Threat Modeling Checklist

  • Identify all entry points (APIs, webhooks, file uploads, event sources)
  • Map data flows (where does sensitive data travel?)
  • Define trust boundaries (where do security contexts change?)
  • Apply STRIDE to each component and data flow
  • Score threats using DREAD
  • Identify mitigations for high-risk threats
  • Document accepted risks with justification
  • Review threat model when architecture changes

Further Reading

Editorial standards

Published by SecureCodeReviews

This article is part of our original AI security and cybersecurity content library. We show publish and update dates, keep company and policy pages public, and update important guidance when material changes affect readers.

Named author: SCR Security Research Team
Published: Jan 19, 2026
Update status: current publication version

Questions or corrections?

Review our editorial standards, learn more about the company, or contact us if a page needs clarification.

AI Security Audit

Planning an AI feature launch or security review?

We assess prompt injection paths, data leakage, tool use, access control, and unsafe AI workflows before they become production problems.

Manual review for agent, prompt, and retrieval attack paths
Actionable remediation guidance for your AI stack
Coverage for LLM apps, MCP integrations, and internal AI tools

Talk to SecureCodeReviews

Get a scoped review path fast

Manual review
Actionable fixes
Fast turnaround
Security-focused

Advertisement