Under attack? Get incident response help

Secure development

Threat model a new feature in one hour without a security architect

A timed one-hour threat modelling session for developer teams, built on four questions and STRIDE, ending in tickets and test cases.

Also in:TürkçeDeutschFrançaisEspañolItalianoPolskiNederlandsEesti

Illustration: Threat model a new feature in one hour without a security architect

A development team can threat model a feature in one hour if it answers four questions in order and leaves with tickets rather than a document. The questions come from the Threat Modeling Manifesto: 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. Nobody needs a security architect, because the work does not depend on one person's innate ability.

The hour at a glance

MinutesQuestionOutput
Before-One person drafts the data flow diagram
0-10What are we working onCorrected diagram, numbered entry points
10-30What can go wrongThreat list, grouped by STRIDE category
30-45What are we going to do about itA response for every threat
45-55Tickets and testsOne ticket and one test per mitigation
55-60Did we do a good enough jobCompleteness check

Before the session

Pick one feature, not a whole product. Finding issues at design time is far more efficient than resolving flaws in production, so run the session before the build starts.

Invite a developer, the requirements owner and, if infrastructure is involved, someone from operations. One of them brings a draft data flow diagram, made in a tool whose files the team can edit later.

Minutes 0-10: what are we working on

The group corrects the draft. The OWASP Threat Modeling Cheat Sheet asks for a clear view of trust boundaries, data flows, data stores, processes and external entities, which often represent possible attack points. Check that each one is on the page.

If some participants are not technical, brainstorm the flows on a whiteboard instead of insisting on DFD notation.

Number the entry points as you go, using major.minor notation for layered ones (1, 1.2, 1.2.1), as the OWASP community process page does, and mark the exit points too. An error message on a login page can enable attacks through the matching entry point, such as account harvesting ("username not found") or SQL injection (via SQL exception errors).

Minutes 10-30: what can go wrong

Start with STRIDE for a technical design. Walk each component, data flow and trust boundary through the six categories and record which entry point ID each threat touches.

CategoryViolatesExample
SpoofingAuthenticationStolen authentication token used to impersonate a user
TamperingIntegrityUnintended database updates through the application
RepudiationAccountingLogs manipulated to cover actions
Information DisclosureConfidentialityData extracted from a database of user accounts
Denial of ServiceAvailabilityUser locked out by many failed authentication attempts
Elevation of PrivilegesAuthorizationA JWT tampered with to change the role

For a business rule, add misuse cases: actions performed out of order, repeatedly, concurrently or for an unintended outcome. For one multi-step attacker goal, use an attack tree. Do not add techniques to look thorough; state why each fits and what it leaves uncovered.

Likelihood times impact sounds tidy, but both are hard to estimate and the product ignores the cost of the fix. In one hour, a rough high, medium or low per threat is enough.

A worked example: password reset

Take a password reset. The diagram shows the browser, the web application, the user database and a mail service, with a trust boundary between the internet and the application. The reset request is entry point 3 and the emailed link is 3.1 (illustrative IDs).

The group finds four threats. A reset link works for someone other than the owner (spoofing). A "no account with that address" message reveals who is registered (information disclosure). Reset events are not logged (repudiation). Someone triggers repeated resets against a victim (denial of service).

Minutes 30-45: what are we going to do about it

Every threat gets one of four responses:

  • Mitigate: reduce the likelihood that the threat materialises.
  • Eliminate: remove the feature or component causing it.
  • Transfer: move contractual or financial responsibility to another party.
  • Accept: do nothing, because the other options do not fit business constraints.

Transfer does not reduce likelihood or harm by itself, so write down who owns the remaining controls and the residual risk. For accepted threats, record who accepted the risk and why.

Minutes 45-55: tickets and tests

Turn each agreed mitigation into a requirement a developer can pick up. One row per threat is enough:

Threat IDSTRIDETicketTest
3.1-SSpoofingMake reset links single-use and short-livedUsed or expired link is rejected
3-IInformation DisclosureReturn one generic response for any addressKnown and unknown addresses give identical responses
3-RRepudiationLog every reset requestA reset attempt appears in the log

The test column makes the model more than a diagram. Each mitigation needs a check that fails when the control is missing. Abuse cases translate directly: replay the request, send the steps out of order, send two requests at once. Put the tickets in the feature's own backlog with the threat ID in the title.

Minutes 55-60: did we do a good enough job

Start with a plain check: are there records showing a diagram, a threats list and a control list? If any is missing, the session is not finished. Confirm that every threat has a response, that each mitigation says how the team will implement it, and that accepted risks say why.

Then keep the model alive. Update it alongside the system, and when the design changes, rerun only the affected parts.

Where to start

  1. Choose one upcoming feature and book an hour with a developer, the requirements owner and someone from operations.
  2. Have one person draft the data flow diagram with trust boundaries marked. The group corrects it and numbers the entry points in the first ten minutes.
  3. Run STRIDE across each component and flow for 20 minutes, recording the affected entry point ID with every threat.
  4. Assign a response to each threat, note who owns any accepted or transferred risk, then create one ticket and one test per mitigation.
  5. Store the diagram, threat list and control list with the feature's documentation. If you want an outside view of the first model, our consulting service can review it, and the recorded threats make a good scope for a later penetration test.

How we can help

Consulting and training

We assess where you stand, set priorities with you and train your staff to recognise attacks.

JWT decoder

Decode a JSON Web Token and check it for common security mistakes, without it leaving your browser.

Contact us
AngelForce team

Written by the AngelForce team: security consultants with CEH, LPT Master and CISA certifications who test, monitor and defend systems for organisations across Europe.

Written with AI assistance from public sources listed below, and reviewed by the AngelForce team before publication.

Sources

  1. www.threatmodelingmanifesto.org/
  2. cheatsheetseries.owasp.org/cheatsheets/Threat_Modeling_Cheat_Sheet.html
  3. community.owasp.org/Threat_Modeling_Process

Articles about Secure development

Tell us what you need to protect

Describe your environment and what you want to achieve. We will reply by email.

Contact us
info@angelforce.eu +372 5705 2044

AngelForce OÜ · Tallinn, Estonia