Bookmarks

Threat modelling

threat modeling

A process in which the team looks for threats to a product in advance: who could harm the system and how, which attacks are realistic and what to do about each one.

Also: threat analysis, threat assessment, threat model

checked 9 Nov

All terms

Threat modelling is done during design and throughout the life of a system, not after an incident: the system is drawn as a diagram, every part is asked “what could go wrong” and countermeasures are chosen — from changing the design to validating input. That way vulnerabilities are fixed on paper, where it is cheap, rather than in production, where it is already an incident.

Four questions

The best known way of doing threat modelling was described by Adam Shostack in the book “Threat Modeling: Designing for Security” and later in the “Threat Modeling Manifesto”, published by a group of practitioners in 2020. The approach boils down to four questions:

QuestionWhat it means
What are we building?a diagram of the system: components, data flows between them and trust boundaries where data passes from one owner to another
What can go wrong?a list of threats for each element and each trust boundary — by brainstorming or against a ready-made taxonomy such as STRIDE
What are we going to do about it?a countermeasure for each significant threat: mitigation, risk transfer, acceptance or elimination
Did we do a good enough job?validation: significant threats have been addressed, the countermeasures work and the model is updated along with the system

How threats are enumerated

Rather than guessing what “can go wrong”, teams use ready-made taxonomies. The classic one is STRIDE, proposed at Microsoft: six categories, each of which breaks one security property. A taxonomy points at what to ask about but does not replace thinking: for a payment API it will suggest tampering with data in a request, for a corporate portal — elevation of privilege.

STRIDE categoryWhich property it breaks
Spoofingauthentication: the attacker impersonates another user
Tamperingintegrity: data is altered in the database or in transit between nodes
Repudiationnon-repudiation: an action cannot be proven — there is no log or signature
Information disclosureconfidentiality: data is read by someone who should not see it
Denial of serviceavailability: the service becomes unavailable to legitimate users
Elevation of privilegeauthorisation: a user gains access to actions they are not entitled to

When and where it is used

A threat model is useful when designing a new service and when making significant changes: a new integration, a new authorisation mechanism, a new category of data. Its outcome is not a report but a list of threats with countermeasures that goes into the backlog alongside other tasks. Findings are captured in requirements and verified by static and dynamic analysis, and the model is revisited after significant architectural changes.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • penetration testing

    A pentest tests a finished system through attacks by specialists, whereas threat modelling looks for threats in the design — before any code is written.

  • STRIDESTRIDE threat model

    STRIDE is a taxonomy of six threat categories, one of the tools of threat modelling rather than the process itself.

In depth in the references

where the topic is covered in detail