Threat modeling
Threat modeling means analyzing a system or organization to answer what can go wrong and what to do about it before it happens. There are two complementary approaches: the design-centric one (how can this application fail), covered in threat modeling in design, and the adversary-centric one (what would the real attackers we care about do), where threat intelligence adds the most and which this page focuses on.
What it solves
Section titled “What it solves”- It replaces “protect everything” with protect first what is most likely to be attacked and would do the most damage.
- It gives leadership and technical teams a common language of scenarios: “a ransomware group gets in through the VPN and encrypts the ERP” is more useful than a list of vulnerabilities.
- It connects CTI to decisions: relevant actors and techniques (ATT&CK) become prioritized scenarios and concrete controls.
- It feeds risk analysis with realistic threats instead of generic ones (risk management).
The four questions
Section titled “The four questions”The framework proposed by Adam Shostack, and captured in the Threat Modeling Manifesto (2020), works for any method:
- What are we working on? System, assets, data flows, trust boundaries.
- What can go wrong? Threats, using STRIDE, attack trees or adversary scenarios.
- What are we going to do about it? Mitigate, transfer, accept or eliminate.
- Did we do a good job? Review the model, validate it with tests and keep it current.
Methods
Section titled “Methods”| Method | Focus | When to use it |
|---|---|---|
| STRIDE | Classifies threats by type on each element of a data flow diagram | Application and service design |
| PASTA | Seven stages centered on business risk and the attacker | Critical systems where investment must be justified |
| Attack trees | Breaks an attacker’s goal down into alternative paths | Deep analysis of one asset or scenario |
| LINDDUN | Privacy threats (linking, identifying, disclosure…) | Personal data processing (GDPR) |
| ATT&CK-based scenarios | Techniques of relevant actors applied to the organization | Defense, detection and red or purple team exercises |
STRIDE in one table
Section titled “STRIDE in one table”| Threat | Property violated | Example |
|---|---|---|
| Spoofing | Authentication | Signing in with stolen credentials |
| Tampering | Integrity | Modifying a request or a configuration file |
| Repudiation | Non-repudiation | An action with no log that allows attributing it |
| Information disclosure | Confidentiality | Data exposed through an authorization flaw |
| Denial of service | Availability | Flooding a service or encrypting it |
| Elevation of privilege | Authorization | A regular user gains administrator rights |
The data flow diagram in detail and applying STRIDE in the development lifecycle are covered in threat modeling in design.
The Process for Attack Simulation and Threat Analysis (Tony UcedaVélez and Marco Morana) runs through seven stages: (1) business objectives, (2) technical scope, (3) application decomposition, (4) intelligence-driven threat analysis, (5) vulnerability analysis, (6) attack modeling and (7) risk and impact analysis. Its value lies in stages 1 and 7: it starts and ends with the business, which makes decisions easier to defend to leadership.
Attack trees
Section titled “Attack trees”Popularized by Bruce Schneier in 1999. The root is the attacker’s goal; each branch is a way to reach it. Nodes combine with OR (one branch is enough) or AND (all are needed).
flowchart TD
R["Steal the payroll database"] --> A["OR: an administrator's credentials"]
R --> B["OR: exploit the web application"]
R --> C["OR: access to a backup"]
A --> A1["Phishing the administrator"]
A --> A2["Password reused<br/>on a leaked service"]
B --> B1["AND: SQL injection"]
B --> B2["AND: the application account<br/>has full read access"]
C --> C1["Backup in a bucket<br/>made public by mistake"]
Each leaf can be annotated with cost, difficulty or likelihood, and the defense is chosen where it cuts the most paths for the least effort: in the example, MFA for administrators cuts A1 and A2 at once.
Intelligence-informed modeling
Section titled “Intelligence-informed modeling”The step most often forgotten is asking who would attack. A practical flow:
flowchart LR
A["Critical assets<br/>and business processes"] --> B["Relevant actors<br/>(CTI: sector, country, size)"]
B --> C["Their techniques<br/>(ATT&CK)"]
C --> D["Scenarios: actor + technique<br/>+ own asset"]
D --> E["Likelihood and impact<br/>(KEV, EPSS, past incidents)"]
E --> F["Prioritized controls,<br/>detections and tests"]
Example of a resulting scenario:
| Element | Content |
|---|---|
| Actor | Ransomware affiliates targeting the sector over the last year (CTI fundamentals) |
| Techniques | VPN access without MFA (T1133), credential dumping (T1003), shadow copy deletion (T1490), encryption (T1486) |
| Asset | ERP and its backups |
| Current state | Two VPNs without MFA; backups reachable from the domain |
| Likelihood | High: frequent techniques in the sector and the VPN vulnerability is in the KEV catalog |
| Actions | MFA on VPNs; immutable or isolated backups; detection of shadow copy deletion; restore exercise |
Prioritization rests on external data: CISA’s KEV catalog shows which vulnerabilities are being exploited, EPSS estimates the probability that a CVE will be exploited, and own telemetry shows what has already happened in the organization (vulnerability management).
- OWASP Threat Dragon and the Microsoft Threat Modeling Tool: diagrams and per-element threat lists.
- pytm (OWASP): model as Python code that generates the diagram and a threat list. Test with pytm 1.4.1 on a minimal model (employee → web server in the DMZ → database with personal data on the internal network): 58 findings, 5 of them “Very High” and 19 “High”.
from pytm import TM, Actor, Boundary, Server, Datastore, Dataflowtm = TM("Payroll portal")internet, dmz = Boundary("Internet"), Boundary("DMZ")employee = Actor("Employee"); employee.inBoundary = internetweb = Server("Web server"); web.inBoundary = dmzdb = Datastore("Payroll database"); db.isSQL = True; db.storesPII = TrueDataflow(employee, web, "Sign-in").protocol = "HTTPS"Dataflow(web, db, "Payslip query").protocol = "SQL"tm.process() # python3 model.py --json out.json | --dfd | --report template.mdThe result illustrates the tools’ limit: they produce long, generic lists (injections, overflows, authentication abuse) for any server. Deciding which ones matter requires knowing who attacks and how, which is exactly what intelligence contributes.
Real-world case: Capital One (2019)
Section titled “Real-world case: Capital One (2019)”An attacker abused a misconfigured web application firewall in AWS to make an SSRF request to the instance metadata service, obtained its role’s temporary credentials and used them to read customer data from S3 buckets: more than 100 million people affected in the US and about 6 million in Canada. A threat model of the “WAF → metadata service → role with broad S3 permissions” flow would have flagged the trust boundary being crossed and two obvious controls: restrict the role’s permissions and block access to the metadata service (which IMDSv2 later made easier). More context in metadata service.
Common mistakes
Section titled “Common mistakes”- Building the model once and filing it away: the system and the threats change.
- Modeling without knowing who attacks: huge lists of generic threats that nobody prioritizes.
- Confusing the model with the diagram: the value is in the decisions, not the drawing.
- Not validating: agreed mitigations must be tested (penetration tests, emulation, code review).
- Leaving it to security alone: the teams that know the system know best what can fail.
Checklist
Section titled “Checklist”- Critical assets and business processes identified
- System described with data flows and trust boundaries
- Relevant actors identified with CTI and their techniques mapped to ATT&CK
- Threats enumerated with the right method (STRIDE, trees, LINDDUN, scenarios)
- Scenarios prioritized with data (KEV, EPSS, own incidents) and not just intuition
- Decision documented per threat: mitigate, transfer, accept or eliminate
- Mitigations validated with tests
- Model reviewed when the system or the threat changes
References
Section titled “References”- Threat Modeling Manifesto: https://www.threatmodelingmanifesto.org/
- Adam Shostack, Threat Modeling: Designing for Security (Wiley, 2014)
- OWASP, Threat Modeling Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Threat_Modeling_Cheat_Sheet.html
- OWASP pytm: https://github.com/OWASP/pytm
- OWASP Threat Dragon: https://owasp.org/www-project-threat-dragon/
- LINDDUN: https://linddun.org/
- Bruce Schneier, Attack Trees (Dr. Dobb’s Journal, 1999): https://www.schneier.com/academic/archives/1999/12/attack_trees.html
- CISA, Known Exploited Vulnerabilities Catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- FIRST, EPSS: https://www.first.org/epss/