Skip to content
Visual explainer 3h to learn 4 steps

Threat modelling with STRIDE

Draw a data flow diagram for a small app and list STRIDE threats with mitigations.

By Invicly Tech, , in Cyber Security Fundamentals. About 9 minutes to read.

Topic 3 of 49

In short

Threat modelling asks, for a specific design, what can go wrong before it is built. STRIDE gives six categories to walk through against each part of a data flow diagram, turning vague worry into a concrete list of threats and mitigations.

Think of it like this: Like a pre-flight checklist: you reason through failure before leaving the ground.

Explained simply

Threat modelling means thinking about what could go wrong with a system before attackers find out for you. You do it with a simple drawing and a structured list of questions. It works best during design, when changes are cheap.

It is like planning a house with a security expert. Before building, you look at the plan and ask: where are the doors, who has keys, where are the valuables? Moving a window on paper is easy. Moving it after the walls are up is expensive.

The drawing is a data flow diagram. It shows people and outside systems, the processes that handle data, where data is stored, and arrows for how data moves. You then draw trust boundaries: lines where data passes from a less trusted area to a more trusted one, like from the internet to your server.

Next you walk through STRIDE for each part of the drawing and ask "could this happen here?". Every yes becomes a threat with a fix next to it. The output is a short, concrete to-do list, not a vague feeling.

Press Play on a diagram to walk through it one step at a time.

MapSTRIDE categories
STRIDE
  • Spoofing
    • Fake identity
  • Tampering
    • Altered data
  • Repudiation
    • Denying actions
  • Information disclosure
    • Leaked data
  • Denial of service
    • Lost availability
  • Elevation of privilege
    • Gaining rights
FlowA threat modelling session in one hour
  1. 1
    Scope

    Pick one feature or service.

  2. 2
    Diagram

    Entities, processes, stores, flows.

  3. 3
    Boundaries

    Mark where trust changes.

  4. 4
    STRIDE

    Ask the relevant letters per element.

  5. 5
    Rank

    Score likelihood and impact.

  6. 6
    Tickets

    One owned fix per real threat.

MapWhich STRIDE letters apply where
Diagram element
  • External entity
    • Spoofing
    • Repudiation
  • Process
    • All six categories
  • Data flow
    • Tampering
    • Information disclosure
    • Denial of service
  • Data store
    • Tampering
    • Information disclosure
    • Denial of service
    • Repudiation (if logs)

In depth

The four questions

A popular way to frame threat modelling uses four questions. What are we working on? What can go wrong? What are we going to do about it? Did we do a good job?

The first question is answered by the data flow diagram. The second by STRIDE or a similar list. The third by mitigations, each with an owner and a ticket. The fourth is a review: did the fixes ship, and is the diagram still accurate after the latest changes? Treat the model as a living document that changes when the system changes, not a one-time report.

  • What are we working on? (diagram)
  • What can go wrong? (STRIDE)
  • What will we do about it? (mitigations)
  • Did we do a good job? (review)
CycleThe four questions as a loop
  1. 1
    What are we working on?

    Data flow diagram

  2. 2
    What can go wrong?

    STRIDE or a similar list

  3. 3
    What will we do about it?

    Mitigations with owners and tickets

  4. 4
    Did we do a good job?

    Fixes shipped, diagram still accurate

  5. Back to step 1

Drawing a useful data flow diagram

Keep the diagram small enough to fit on one page. Use four shapes: external entities (users, partner systems) as boxes, processes (your code) as circles, data stores (databases, files, queues) as parallel lines, and data flows as labelled arrows.

Then draw dashed lines for trust boundaries. Common ones are between the internet and your web app, between your app and the database, and between your system and any third-party API. Most serious threats sit on arrows that cross these boundaries, because that is where data changes hands and checks are needed.

STRIDE per element

Not every STRIDE category applies to every shape. External entities mostly face spoofing and repudiation. Data flows face tampering, information disclosure and denial of service. Data stores face tampering, disclosure, denial of service and sometimes repudiation if they hold logs. Processes can face all six.

Using this table keeps sessions focused. Instead of asking all six questions about everything, you ask only the ones that make sense, which keeps a one-hour workshop productive.

Ranking and closing threats

A workshop can produce dozens of threats. Rank them using the risk scoring you already know: likelihood times impact. Fix the high ones before launch, schedule the medium ones, and record any you accept.

Good mitigations are specific. "Improve security" is not a mitigation. "Require MFA for admin logins" or "use parameterised queries in the search endpoint" are. Each one should become a ticket in the team's normal backlog so it is tracked like any other work.

Learn it in 4 short steps

About 45m each. Track them with a timer in your plan.

  1. 1
    Draw a data flow diagram~45m
  2. 2
    Mark trust boundaries~45m
  3. 3
    Apply STRIDE to each element~45m
  4. 4
    Propose a mitigation per threat~45m

Key points

  • Threat model the design, before and during building.
  • A data flow diagram with trust boundaries is the starting point.
  • STRIDE pairs with the CIA triad plus authentication and accountability.
  • Each threat should end with a proposed mitigation.

Key terms

Tap a card to flip it. 0/4 known

Examples

Threat modelling a password reset feature

Step 1: Diagram: User -> Web app (process) -> Users DB (store), and Web app -> Email service (external). Boundaries: internet to web app, web app to email provider. Step 2: Spoofing: an attacker requests a reset for someone else's email. Fix: send the link only to the registered address. Step 3: Tampering: the reset token is guessable. Fix: long random token, single use, expires in 15 minutes. Step 4: Information disclosure: the form says "no such user", which reveals who has accounts. Fix: always show the same message. Step 5: Denial of service: thousands of reset emails. Fix: rate limit per IP and account. Step 6: Repudiation: log every reset request and use.

Writing threats as a simple table

Recording threats in a consistent format makes them easy to track. Each row names the element, the STRIDE letter, the threat in plain words, the fix and a priority. This example shows three rows for a mobile app talking to an API.

text
Element          | STRIDE | Threat                              | Mitigation                       | Prio
App -> API flow  | T, I   | Traffic read or changed on wifi     | TLS everywhere, HSTS             | High
API process      | E      | Normal user calls admin endpoint    | Server-side role check per route | High
Orders DB store  | I      | Backups readable by all engineers   | Encrypt backups, restrict access | Med
User entity      | S      | Stolen password used to log in      | MFA, alert on new device login   | High
API process      | R      | User denies placing an order        | Signed, central audit log        | Low

Quick reference

  • Four questions: what are we building, what can go wrong, what will we do, did we do well?
  • DFD shapes: box = external entity, circle = process, two lines = data store, arrow = flow
  • Threats cluster on arrows that cross trust boundaries
  • External entities: S and R. Data flows: T, I, D. Processes: all six
  • A mitigation must be specific enough to become a ticket
  • Update the model when the design changes

Quick quiz

Pick an answer to see if you're right and why.

Question 1

1When is threat modelling cheapest and most useful?

Question 2

2On a data flow diagram, what does a data store represent?

Question 3

3A reset form says "no account with that email". Which STRIDE category does this fit?

Question 4

4Which of these is a good mitigation statement?

0/4 answered

Practice exercises

Try each one yourself first. Use the hint if you get stuck, then compare with the solution.

  1. Exercise 1easy

    Draw a data flow diagram (paper is fine) for a simple to-do list web app: a user, a web server, a database. Mark the trust boundaries.

  2. Exercise 2medium

    Using your to-do app diagram, list one threat for each STRIDE letter and a specific mitigation for each.

  3. Exercise 3hard

    Add a third-party payment provider and a background email worker to your diagram. Identify the new trust boundaries and the two highest-risk new threats with mitigations and scores.

Check yourself

Answer in your head, reveal, then be honest with yourself.

Feel confident about this topic?

Frequently asked questions

Do I need special software for threat modelling?
No. A whiteboard or paper works. Free tools like OWASP Threat Dragon and Microsoft Threat Modeling Tool help draw diagrams and keep lists, but the thinking matters more than the tool.
Are there alternatives to STRIDE?
Yes. PASTA is a more detailed risk-based process, LINDDUN focuses on privacy, and attack trees break one goal into steps. STRIDE is the easiest place to start.
Who should attend a threat modelling session?
The developers and architect who know the design, someone from security, and ideally a product owner who can decide on trade-offs. Three to six people works well.

Go deeper

ShareXLinkedInWhatsApp