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
- Threat model during design, not after release.
- Ask: what are we working on, what can go wrong, what will we do, did we do well?
- Use a checklist such as STRIDE as a prompt, not a substitute for thinking.
- Revisit the model when the system changes.
Sources
- OWASP Threat Modeling Cheat Sheet
- NIST SP 800-53 Rev. 5: SA-8 Security and Privacy Engineering Principles (OSCAL catalog)
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.
- Threat model a system with STRIDE using OWASP Threat Dragon: You draw a small system and walk the four questions with STRIDE.
- Build a test plan from a threat model and measure its coverage: You turn threats into tests and measure what you covered, the 'did we do a good enough job' question.
Knowledge check
- 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.
- 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.
- 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.