Threat Modelling (STRIDE)

Finding design flaws before writing code

Threat modelling is a structured way to ask "what could go wrong?" while a feature is still being designed, when fixes are cheapest. You draw how data flows, mark where trust changes, walk each flow through the STRIDE categories, and turn the answers into concrete requirements and tests. STRIDE is the most widely used method; PASTA (risk-centric), LINDDUN (privacy) and attack trees (attack paths) are covered in their own modules.

Beginner · 5 steps

Four questionsWhat are we building? What can go wrong? What will we do? Did we do a good job?
ModelData flow diagram + trust boundaries
Threat categoriesSTRIDE
Other methodsPASTA, LINDDUN, attack trees, OCTAVE, VAST, Trike
Free toolsOWASP Threat Dragon, Microsoft TM Tool
Relates toOWASP A04 Insecure Design

Step by step

  1. What are we building? Draw the data flows

    The team is designing checkout for a food-delivery app. In a short session they draw who talks to whom: the customer's phone calls the API gateway, which calls the orders service, which stores orders and talks to an external payment provider. They mark trust boundaries wherever data crosses from one level of trust to another.

  2. Spoofing and Tampering S and T of STRIDE

    Walking the customer → gateway flow: could someone pretend to be another customer (Spoofing)? Could they change data in transit or in the request, such as the price (Tampering)? Both are realistic, because the phone is fully under the user's control.

  3. Repudiation and Information disclosure R and I of STRIDE

    Could a customer or staff member deny doing something, with no way to prove it (Repudiation)? Could data leak to someone who shouldn't see it (Information disclosure)? The team realises refunds aren't logged and that card numbers would sit in the orders database.

  4. Denial of service and Elevation of privilege D and E of STRIDE

    Could someone make the service unavailable (Denial of service), for example by flooding it with fake orders? Could a normal customer reach a function meant for staff (Elevation of privilege), like the refund endpoint?

  5. What will we do? Did we do a good job? From threats to tickets and tests

    Each threat gets a decision: mitigate, accept, transfer or avoid. Mitigations become requirements in the backlog, many of them taken straight from OWASP ASVS, and each gets a test. Before release the team checks the mitigations actually shipped and updates the model.

Best practices

More in Secure Development.