Section 1.2

Threat model

Definition

A threat model is an explicit statement of the adversary that a security claim is made against. It names the assets to protect, such as keys, data or a device’s correct operation, and the property each must keep; the attacker’s goals; its capabilities, meaning what it can observe, change and compute; its initial knowledge, such as which keys it holds; and the excluded powers. A security claim says that no attacker within the threat model reaches its goal. About an attacker outside the threat model, the claim says nothing.

The idea

A device accepts the command “activate version 7” only if it carries a valid tag, a short value that only holders of a secret key can compute. One opponent listens to the radio channel: it can record a command and send it again, or block it, but it holds no key. A second has stolen the key from a technician’s laptop. A third holds the device and can cut its power or rewrite its storage through the debug port. A counter inside each command, which the device accepts only if it is higher than any counter seen before, stops the first opponent from resending an old command. It does nothing against the second, who creates a new command with a higher counter, or against the third, who lowers the stored counter.

No defense works against every opponent, so “the system is secure” means nothing until it says against whom. The threat model says it, and so turns “secure” into a claim that can be checked: here are the attacker’s powers, and here is the argument that no combination of them reaches the goal. The rules of engagement of a security test are a fair picture: what the testers may do and what counts as a win. The picture fails in one respect. A real attacker never agrees to the rules, so every power the threat model excludes must be excluded by a fact about the system, such as a permanently disabled debug port, not merely left unmentioned.

How it works

Threat modeling proceeds in this order.

  1. Assets and properties. List what must be protected and which property each asset needs: confidentiality §1.8 (nobody unauthorized reads it), integrity §1.9 (nobody unauthorized changes it), availability §1.10 (it works when needed), and authenticity (it comes from whom it claims). Example: “only an authorized operator can change which program the device runs”.

  2. System description. Draw the components and the data flows between them, and mark each trust boundary §1.3, a place where data passes from a less trusted part to a more trusted one.

  3. Attackers. For each attacker, state its position (on the network, running code on the same machine, or holding the device), its capabilities, its initial knowledge, its computing power and its goal.

  4. Exclusions. State every power the analysis assumes the attacker lacks, and the fact that justifies the assumption.

  5. Threats. Enumerate the ways each attacker could reach each goal. Two aids are common. An attack tree breaks a goal into the alternative or combined steps that achieve it. STRIDE, a checklist developed at Microsoft, asks of each component whether it is open to Spoofing, Tampering, Repudiation, Information disclosure, Denial of service §1.28 and Elevation of privilege; each word names the violation of one property, for example repudiation is a sender denying an action it took.

  6. Responses. Map each threat to a defense, or record it as an accepted risk.

Capabilities are best listed as separate powers, because real attackers hold different combinations of them.

Two conventions fix the attacker’s knowledge and computing power in almost every modern threat model. The first is Kerckhoffs’s principle [446]: the attacker knows the whole design, the source code and the algorithms §14.1, and lacks only the secret keys; a defense that depends on a secret design fails on the day the design leaks. The second is that the attacker’s computation is bounded: it can run any feasible algorithm, but it cannot, for example, try all 21282^{128} values of a 128-bit key.

Worked example

A hypothetical device accepts a command only if its tag is valid and its counter is greater than the last counter value the device accepted, which it keeps in persistent storage. It has just accepted “activate version 7, counter 19” and stored 19. Four attackers each rely on one main power, and each case starts from the stored value 19.

One device, one check, four outcomes. Each defense answers one power: the tag and the counter answer N, except for dropping; revocation and the version rule answer K; an update procedure that survives interruption answers R; and storage that P cannot rewrite, such as a monotonic counter §8.28 built into the hardware, answers P. A claim that names only N is honest about N and silent about K, R and P.

Stated precisely

Write 𝒜\mathcal{A} for the set of attackers a threat model admits, each described by its capabilities, initial knowledge and computing bound. A security claim for a property PP then reads: for every attacker AA in 𝒜\mathcal{A}, every execution of the system running alongside AA satisfies PP. A computational claim replaces “every execution” by a probability: for every attacker AA in 𝒜\mathcal{A} whose running time is at most a stated bound tt, the probability that AA violates PP is at most a stated bound ε\varepsilon.

Claims are monotone in attacker power. If 𝒜1⊆𝒜2\mathcal{A}_1 \subseteq \mathcal{A}_2, meaning every attacker admitted by the first threat model is admitted by the second, then a claim proved against 𝒜2\mathcal{A}_2 also holds against 𝒜1\mathcal{A}_1. The converse fails: a claim proved against attacker N in the example says nothing about attacker P. Capabilities are yes-or-no entries of the threat model, not probabilities to be multiplied, and which combinations of them an attacker may hold is a decision the threat model must state.

The Dolev–Yao network attacker

The standard model of a network attacker comes from Danny Dolev and Andrew Yao, “On the Security of Public Key Protocols” (1983) [238]. The Dolev–Yao attacker is the network: every message passes through it. It can

It cannot break the cryptography, which the model treats as perfect. It cannot decrypt without the key, cannot compute a valid tag or signature without the key, and cannot guess a secret key or a fresh random value. Because messages are treated as symbols rather than bit strings, this is called a symbolic model. Tools such as ProVerif and Tamarin search it automatically for attacks on protocols. A computational model instead treats the attacker as any feasible algorithm working on bit strings and bounds its probability of success; it can capture weaknesses of the cryptography that the symbolic model assumes away.

A valid tag from a message authentication code §5.7 (MAC), a short value computed from a message and a secret key, stops one of these powers, injecting new messages, including altered copies of genuine ones, because every such message needs a valid tag that only a key holder can compute. It stops none of the four powers drop, delay, reorder and replay, because all four deliver, or withhold, genuine messages whose tags remain valid. It does not stop reading either; that needs encryption. Nor does it stop the attacker from taking part under its own identity, with tags made by its own key. The other defenses are separate. A counter or sequence number inside the authenticated bytes lets the receiver detect and reject replayed and reordered messages. A fresh challenge from the receiver, or a timestamp checked against a trusted clock, bounds the delay. Dropping can be detected, through missing acknowledgments and timeouts §9.34, but never prevented, so no protocol can guarantee availability against a Dolev–Yao attacker.

Limits and common mistakes

An assumption that excludes an attack is not a defense against it. “The attacker cannot reach the debug port” becomes true when the port is permanently disabled or sealed, not when the sentence is written.

A threat model that is too weak makes every claim easy and worthless. One that is too strong makes some goals impossible: against an attacker who controls the radio channel, no protocol keeps a device available, because the attacker can drop every message or drown the channel in noise.

The Dolev–Yao model assumes perfect cryptography and correct implementations. It finds flaws in the logic of a protocol, such as a message that is accepted in the wrong session, but not a parser that writes past the end of a buffer, a timing side channel, or a weak random number generator.

Powers combine. Physical access usually brings reset control and, if the debug port is not locked, storage access and the keys stored there. List each power separately, then state which combinations the claim covers.

Insiders count. A threat model that assumes every key holder is honest leaves out stolen credentials and misused authority.

A threat model ages. A new deployment, a new interface or a leaked key changes who the attackers are, and the claims must be checked again.

Questions answered

Can an attacker control transport bytes, authenticated input, resets, or persistent state §8.1 independently?

Yes. In a threat model, the explicit list of what an attacker can observe, change and know, these are four separate powers, and an attacker can hold any one of them without the others.

Each power needs its own defense: a tag plus a counter against transport control; key revocation and authorization §1.7 rules against a key holder; an update procedure that survives interruption against resets; and storage the attacker cannot rewrite, such as locked debug access or a hardware monotonic counter, against storage access. In real deployments the powers are often correlated: physical access usually brings reset control, an unlocked debug port turns it into storage access, and storage access often yields keys, which brings authenticated input. A threat model should list each power separately and state, with reasons, which combinations its claims cover.

What can a Dolev–Yao adversary do and not do, and which of its powers (drop, delay, reorder, replay) does a valid MAC tag not defend against?

A Dolev–Yao adversary, the standard model of an attacker who controls the network, can read every message; drop, delay, reorder and replay messages; inject new messages built from everything it knows, using any key it holds; and take part as a legitimate user. It cannot break the cryptography: without the key it cannot decrypt, compute a valid tag or signature, or guess a secret. A valid tag from a MAC (message authentication code) defends against none of the four powers named, because dropped, delayed, reordered and replayed messages are genuine messages whose tags are still valid. The tag stops only injected messages, including altered copies of genuine ones, that the attacker cannot tag with a key the receiver accepts. It does not stop the attacker from taking part under its own identity, with tags made by its own key. Replay and reordering need a counter or sequence number inside the authenticated bytes; delay needs a fresh challenge or a timestamp checked against a trusted clock; dropping can be detected, by missing acknowledgments, but never prevented.

Related entries: Trusted computing base (TCB) (§1.4), Adversarial composition (§1.24), Attack precondition (§1.44), Trust boundary (§1.3), Replay attack (§1.26), Denial of service (DoS) (§1.28), Physical versus logical access (§1.32), Message authentication code (MAC) (§5.7). Further reading: [223, 238, 446].