Threat modeling: four questions

Unit 4 of 5 in Security principles.

You will be able to run a small threat model by asking four plain questions about a system.

Lesson

What threat modeling is

Threat modeling is a structured way of thinking about how a system could be attacked, done during design so problems are found while they are cheap to fix. OWASP says it should be a standard and necessary step in the process, not an add-on, and that it seeks to identify potential security issues during the design phase.

NIST lists performing threat modeling among its examples of security engineering principles, to identify use cases, threat agents, attack vectors and patterns, and design patterns.

The four questions

OWASP, following the Threat Modeling Manifesto, says the process should answer four questions. What are we working on? What can go wrong? What are we going to do about it? Did we do a good enough job?

That is the whole method in plain words. You can do it on a whiteboard with two other people in an hour.

Using the questions on a small system

Take a simple web form that saves a note to a database. What are we working on: a browser, a server, a database, and arrows between them for the data. What can go wrong: for each arrow and each box ask what an attacker or a mistake could do, and what it would cost. What are we going to do about it: pick a control for each serious item, or decide to accept it. Did we do a good enough job: check that every serious item has an owner and, where possible, a test that proves the control works.

OWASP names STRIDE and data flow diagrams as common techniques. STRIDE is a checklist of kinds of problem to look for at each point, and the lab for this unit teaches it. A checklist is a prompt for your thinking, not a replacement for it.

Keep it alive

OWASP notes that traditional techniques often need adapting for cloud-native systems, which bring shared responsibility, managed services, identity federation and dynamic infrastructure. The same applies to anything that changes. A threat model that is never revisited describes a system that no longer exists.

Key points

Sources

Lecture

Secure by design and threat modeling: A talk that walks a threat model from a diagram to a list of fixes.

Practice in the labs

Model a small system with STRIDE, then turn the threats into a test plan.

Knowledge check

  1. Which is NOT one of the four threat modeling questions? Answer: Who is to blame?. The four questions are: what are we working on, what can go wrong, what are we going to do about it, and did we do a good enough job.
  2. When is the best time to threat model? Answer: During design, while changes are cheap. OWASP says threat modeling seeks to identify potential security issues during the design phase and should be a standard step, not an add-on.
  3. Why revisit a threat model? Answer: The system changes, so an old model describes something that no longer exists. Systems evolve (cloud services, new integrations), so a model that is not updated stops matching reality.

Back to the syllabus or see all classes.

Related