Threat modeling with STRIDE

Data-flow diagrams, trust boundaries, and enumerating Spoofing/Tampering/Repudiation/Info-disclosure/DoS/Elevation threats. "Threat model this feature" is a standard senior round.

About 30 min read3-question knowledge check

The mental model

Before an architect pours concrete, they walk the blueprint asking "where does water get in, where does the load concentrate, what happens if this beam fails." They do not wait for the building to flood to discover the basement had no drainage. Threat modeling is that structured walk of a design, done before the code is written, asking at every point where data crosses a boundary: what could an attacker do here, and what stops them?

It exists because the cheapest place to fix a security flaw is the whiteboard, and the most expensive is production after a breach. A missing authorization check found in a threat model is a sentence in a document; the same flaw found by an attacker is an incident, a disclosure notice, and a postmortem. The industry rule of thumb — a defect costs roughly an order of magnitude more to fix at each stage it survives (design → code → test → production) — applies doubly to security defects, because in production the "test case" is run by someone hostile.

STRIDE is the mnemonic that makes the walk systematic so you do not just brainstorm and miss whole categories. It maps each threat to the security property it violates:

  • Spoofing → violates authenticity (pretending to be someone you are not).
  • Tampering → violates integrity (altering data or code).
  • Repudiation → violates non-repudiation (denying you did something, with no evidence to prove otherwise).
  • Information disclosure → violates confidentiality (reading what you should not).
  • Denial of service → violates availability (making it unusable).
  • Elevation of privilege → violates authorization (doing what you are not allowed to).

The reason STRIDE beats freeform "let's think about attacks" is that human brainstorming is biased — teams fixate on the attack in last week's news and forget five other classes. Walking each element of the design against all six letters forces coverage. The output is not paranoia; it is a prioritised list of the handful of threats worth mitigating and an explicit record of the ones you consciously accepted.

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision