Threat Modelling with STRIDE

Systematically find design-level risks by diagramming a system and asking what can go wrong using STRIDE.

Intermediate · about 6 hours · difficulty 3/5

Learn first: Secure SDLC

Threat modelling is a structured conversation about a system's design: what are we building, what can go wrong, what are we going to do about it, and did we do a good job? Those four questions (from the Threat Modeling Manifesto) keep it practical.

Step 1: model the system

Draw a data flow diagram (DFD) with external entities (users, third-party APIs), processes (services), data stores (databases, buckets) and data flows. Mark trust boundaries wherever data crosses from less trusted to more trusted zones, such as the internet to your API.

Step 2: find threats with STRIDE

  • Spoofing identity: can someone pretend to be another user or service?
  • Tampering with data: can data be modified in transit or at rest?
  • Repudiation: can someone deny an action because it was not logged?
  • Information disclosure: can data leak to the wrong party?
  • Denial of service: can the component be overwhelmed?
  • Elevation of privilege: can someone gain rights they should not have?

Walk each element and boundary and ask the relevant STRIDE questions.

Step 3: decide and track

For each threat choose to mitigate, eliminate, transfer or accept, record the decision and create tickets. Common mitigations map neatly: authentication for spoofing, integrity checks for tampering, audit logs for repudiation, encryption and access control for disclosure, rate limits for DoS, least privilege for elevation.

Tools

OWASP Threat Dragon and Microsoft Threat Modeling Tool are free; a whiteboard also works.

Pitfalls

  • Modelling once and never updating.
  • Listing threats with no owners or decisions.

Move on when you can threat model a login and file-upload feature, producing a DFD and at least eight STRIDE threats with mitigations.

Key concepts

  • Four threat modelling questions
  • Data flow diagrams
  • Trust boundaries
  • STRIDE categories
  • Mitigate, accept, transfer decisions
  • OWASP Threat Dragon
  • Other methods (PASTA, LINDDUN)

Mini project

Threat model a small app (login, profile page, file upload, admin panel) in OWASP Threat Dragon, list STRIDE threats per trust boundary and turn the top five into tracked tasks.

Check yourself

Which STRIDE category does missing audit logging mainly relate to, and what mitigation addresses it?

Free resources