2.1 STRIDE in depth
In this lesson you will:
- Name the six STRIDE threat categories and the security property each one violates.
- Recognise each category in realistic web, API, infrastructure and AI examples.
- Apply STRIDE-per-element to every element of a data flow diagram.
- Apply STRIDE-per-interaction to the flows that cross trust boundaries.
- Avoid the mistakes that make STRIDE sessions shallow or endless.
Opening case: "we thought about security"
Kestrel's product team is designing instant refunds: a merchant clicks "refund" in the portal and the customer gets their money back within seconds through UPI, instead of in five working days.
In the design review, the lead developer says the team has "thought about security": the refund endpoint requires login, uses HTTPS and validates the amount. The security lead asks one question: "Which of the six STRIDE categories did you check?" After a pause, the developer says authentication and input validation are covered. Nobody has thought about who can prove a refund was issued, whether a refund request can be replayed, or what happens if someone floods the refund queue at month-end.
By the end of this section you will be able to walk a design through all six categories in a few minutes, and see why "it needs login and uses HTTPS" covers only part of one.
Where STRIDE comes from
STRIDE was created at Microsoft in 1999 by Loren Kohnfelder and Praerit Garg as a mnemonic to help developers think about threats to their products [1]. It became part of the Microsoft Security Development Lifecycle and is now the most widely taught threat-finding method in the world. It is used by teams that have never heard of Microsoft's process, because it is simple, complete enough for most software and works naturally with data flow diagrams.
STRIDE is a threat-finding method. It answers the second of the four questions, "What can go wrong?". It does not tell you how to rank threats or how to fix them; Section 2.2 and Module 5 cover that.
The six categories
Each STRIDE letter is the opposite of a security property. That is the most useful way to remember them: if you know the property you want, you know the threat that attacks it.
S — Spoofing (violates authentication)
Pretending to be something or someone you are not. Spoofing is about identity: of a user, a service, a device, a website, a message sender or an AI agent.
- Credential stuffing to log in as a merchant using passwords leaked from other sites.
- A phishing page that looks like the Kestrel merchant portal.
- A service inside the VPC calling the payments service without mutual authentication, so any compromised container can pretend to be the API gateway.
- A forged webhook that claims to come from the bank and marks an unpaid order as paid.
- A caller to the support line pretending to be a merchant's owner.
Typical controls: strong authentication and MFA, mutual TLS between services, signed webhooks, verified caller procedures, phishing-resistant authentication for staff.
T — Tampering (violates integrity)
Modifying data or code without authorisation: in transit, at rest or in memory.
- Changing the amount or the beneficiary in a request before it reaches the server.
- Editing a settlement file sitting in a shared folder.
- Modifying a configuration file or a container image in the registry.
- Altering a JavaScript dependency so the checkout page sends card data elsewhere.
- Inserting crafted records into training data so a model learns the wrong thing (Module 4).
Typical controls: authorisation on every write, input validation, TLS, message signing or MACs, integrity checks on files and artefacts, immutable infrastructure, code signing.
R — Repudiation (violates non-repudiation)
Performing an action and being able to deny it, because the system cannot prove who did what. Repudiation threats are often missed because nothing is stolen or broken at the time; the damage appears in a dispute, an investigation or an audit.
- A merchant issues a ₹2 lakh refund to an accomplice, then claims the account was hacked, and Kestrel cannot show which session did it.
- An operations analyst changes a payout account and the audit log records only "admin".
- An application account that writes the audit log can also delete rows from it.
- An AI agent issues a refund and nobody can reconstruct which user request and which retrieved document led to the decision.
Typical controls: audit logs that capture who, what, when, from where and the before and after values; logs that the actor cannot alter (append-only, separate account, shipped off-host); signed transactions for high-value actions; time synchronisation.
I — Information disclosure (violates confidentiality)
Exposing information to someone not authorised to see it.
- One merchant can read another merchant's transactions by changing an ID in the URL.
- A stack trace in an error page reveals internal hostnames and library versions.
- Backups of the merchant database are stored unencrypted in a bucket with broad read access.
- Logs contain full card numbers or Aadhaar numbers.
- A support chatbot quotes a document the user should not see (Module 4).
Typical controls: authorisation on every read, encryption in transit and at rest with good key management, data minimisation and masking, generic error messages, secrets management, permission-aware retrieval for AI.
D — Denial of service (violates availability)
Making a system or resource unavailable, or degrading it, for legitimate users.
- Flooding the payment-link API during a festival sale.
- Sending requests that trigger expensive database queries or regular-expression backtracking.
- Filling a disk with logs, or a queue with junk messages, so real work stops.
- Locking out merchants by repeatedly failing their logins.
- Sending prompts that make an LLM generate very long outputs, running up costs ("denial of wallet").
Typical controls: rate limiting and quotas per identity, input size limits, timeouts, autoscaling with cost caps, queue back-pressure, careful lockout design (for example, progressive delays rather than hard lockout).
E — Elevation of privilege (violates authorisation)
Gaining capabilities you were not granted. This includes a user doing what only an admin can do, but also code doing more than it should.
- A merchant user calls an admin-only endpoint that is hidden in the UI but not protected on the server.
- A "viewer" role can still call the refund API.
- A file-upload feature allows a script to be uploaded and run on the server.
- A container escapes to its host.
- An AI agent with broad tool permissions is talked into performing an action the user asking it could not perform themselves (Module 4).
Typical controls: server-side authorisation on every request, least privilege for users, services and agents, input validation, sandboxing, separation of admin interfaces.
Practitioner tip. Injection attacks (SQL injection, command injection, prompt injection) often appear under several letters at once. An injection is usually a tampering of the intended query or instruction that results in information disclosure or elevation of privilege. Do not argue about which single letter applies. The purpose of the categories is to make sure you do not miss a threat, not to classify it perfectly.
STRIDE-per-element
Asking all six questions about everything in a diagram is slow, and some questions do not make sense for some elements. You cannot "tamper with" an external entity you do not control, and a data flow cannot "repudiate" anything. STRIDE-per-element gives a standard table of which categories apply to which DFD element [1][2].
| Element | Applies | Why |
|---|---|---|
| External entity | S, R | Something can pretend to be it, and it can deny actions. You do not model what happens inside it. |
| Process | S, T, R, I, D, E | Processes make decisions, so all six apply. |
| Data store | T, I, D (and R if it holds logs) | Stores can be altered, read or made unavailable. A log store matters for repudiation. |
| Data flow | T, I, D | Data in transit can be altered, read or blocked. |
The method is mechanical, which is its strength:
- List every element on the DFD.
- For each element, ask the questions for the letters that apply.
- Write down each threat as a specific statement (not just "spoofing").
- Pay special attention to elements touching a trust boundary.
Worked example: the instant refund process
Take the new Refund service process from the opening case. It receives requests from the API gateway, writes to a refund ledger, and calls the bank's UPI refund API. Asking all six questions for the process:
| Letter | Question | Threat found |
|---|---|---|
| S | Can someone pretend to be a legitimate caller? | A compromised internal service calls the refund service directly, bypassing the gateway, because the service trusts any caller on the internal network. |
| T | Can someone change the request or the data it acts on? | The refund amount or the original transaction ID is changed in the request so a refund exceeds the original payment, or refunds a different merchant's payment. |
| R | Can someone deny doing it? | A merchant user issues a refund to an accomplice and later says it was not them; the ledger records only the merchant ID, not the user, session or device. |
| I | Can it leak information? | Error messages for "transaction not found" versus "not your transaction" let a merchant enumerate other merchants' transaction IDs. |
| D | Can it be made unavailable? | A flood of refund requests at month-end exhausts the bank API's rate limit, so legitimate refunds and payments fail. |
| E | Can someone gain more power than granted? | A staff role meant only to view refunds can approve them, because the approve action is checked only in the UI. |
Six questions produced six concrete threats in a few minutes, four of which the team had not considered. That is STRIDE working as intended.
STRIDE-per-interaction
STRIDE-per-interaction is a variant that analyses each interaction: a pair of elements and the flow between them, especially where the flow crosses a trust boundary [2]. Instead of asking "what threats apply to the refund service?" and then "what threats apply to the flow from the gateway?", you ask "what can go wrong when the gateway sends a refund request to the refund service across this boundary?"
For each interaction, consider threats to the sender, the flow and the receiver together. For example, for Refund service → Bank UPI API (crossing into the partner network):
- Spoofing of the bank endpoint (DNS or certificate misconfiguration sends refunds to an impostor) or of Kestrel (the bank accepts unsigned requests).
- Tampering with the request in transit, or replay of a valid request to pay a refund twice (an integrity threat; the control is an idempotency key and a nonce or timestamp that the bank checks).
- Information disclosure of customer VPAs and amounts in transit.
- Denial of service if Kestrel's calls exceed the bank's rate limit.
- Repudiation if the bank later disputes that Kestrel sent a refund instruction (the control is signed requests and retained responses).
Per-interaction tends to produce fewer duplicate threats than per-element and keeps the conversation focused on boundaries. Many experienced practitioners use per-element for completeness on small diagrams and per-interaction for larger ones.
Common mistakes with STRIDE
Stopping at the letter. "Spoofing: yes" is not a threat. Write who could do what to which asset: "An attacker with leaked passwords can log in as a merchant because the portal does not require MFA, and redirect settlements." Section 5.2 gives a template.
Treating the categories as a checklist to pass. STRIDE is a prompt for thinking, not a compliance list. A process with six ticked boxes and no specific threats has not been analysed.
Arguing about classification. If the room spends ten minutes debating whether something is tampering or elevation of privilege, record it under both and move on.
Analysing inside external entities. You are not responsible for the bank's internal security in this model. You are responsible for how you authenticate the bank, what you accept from it and what you do if it fails.
Ignoring people and processes. Many real attacks spoof a person (a phone call to support) or tamper with a manual process (an analyst edits a file). If people are on the diagram as external entities, STRIDE will prompt you about them.
Ignoring the mitigations that already exist. Record existing controls as you go. A threat that is already well mitigated still belongs in the model (so you notice if the control is removed), but it drops in priority.
STRIDE beyond web applications
STRIDE works for any system you can diagram:
- Cloud infrastructure: spoofing of workload identities, tampering with infrastructure-as-code in the pipeline, disclosure through public buckets, denial of service through quota exhaustion, elevation through over-permissive IAM roles.
- Mobile apps: spoofing of the backend through missing certificate validation, tampering with the app binary, disclosure of tokens stored in plain text on the device.
- Operational technology and IoT: spoofing of sensor readings, tampering with firmware, denial of service against a controller.
- AI systems: every letter has an AI-specific form (Module 4, Figure 4.3). STRIDE remains the backbone; AI threat libraries add the details.
The opening case, resolved
Running the instant-refund design through STRIDE-per-element and per-interaction surfaced the gaps in "it needs login and uses HTTPS":
- Login and HTTPS address part of S (spoofing the merchant) and part of T and I (in transit). They do nothing for R (proving who issued a refund), D (month-end floods), E (UI-only approval checks), or tampering with the meaning of the request (refunding more than was paid, or someone else's payment).
- The team added: per-user audit records with session and device; a server-side rule that refunds cannot exceed the unrefunded balance of the original payment owned by this merchant; idempotency keys and signed requests to the bank; per-merchant refund rate limits and a daily value cap; server-side role checks on approve; and generic error messages.
None of these took more than a few days to build, and all were cheaper before launch than after.
Check your understanding
1. A webhook endpoint accepts "payment succeeded" notifications from the bank without checking a signature. Which STRIDE category is the main threat, and what is the control?
Answer: Spoofing. Anyone can send a fake notification that appears to come from the bank. The control is to verify a signature (or mutual TLS) on every webhook and to confirm the payment status with the bank's API before releasing goods.
2. Using STRIDE-per-element, which categories apply to a data flow, and why not the others?
Answer: Tampering, information disclosure and denial of service. A flow has no identity of its own to spoof, makes no decisions, so cannot gain privileges, and performs no actions it could deny.
3. An audit log is written by the same database account that the application uses for all its queries. Which category does this create a threat for?
Answer: Repudiation (and tampering with the log store). Anyone who compromises the application, or an insider with its credentials, can alter or delete log entries and deny their actions.
Key takeaways
- STRIDE = Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege; each violates authentication, integrity, non-repudiation, confidentiality, availability or authorisation respectively.
- STRIDE finds threats; it does not rank or fix them.
- STRIDE-per-element: external entities S, R; processes all six; data stores T, I, D (R if logs); data flows T, I, D.
- STRIDE-per-interaction analyses each boundary-crossing flow with its sender and receiver, reducing duplicates.
- Write specific threats, not letters; do not argue about classification; include people; record existing controls.