Threat Modeling - Identifying Risks by Design
About 2 min read
Threat modeling is a security design methodology that systematically identifies potential threats to a system or application at the design stage, prioritizes them, and applies countermeasures. By structurally analyzing "what to protect," "who the attackers are," and "where the weaknesses lie," it can reduce security defects discovered in later development phases. Microsoft states that following its internal development process, which includes threat modeling, results in software with fewer and less severe vulnerabilities at a reduced development cost.
Historical Background
According to Microsoft's page introducing its Security Development Lifecycle (SDL), Microsoft launched its Trustworthy Computing initiative in January 2002, and the SDL became an integral part of its software development process in 2004. Microsoft makes the SDL a mandatory process for its development teams, and it requires threat models to be created during design and maintained and updated throughout the lifecycle of each product. OWASP has also published a threat modeling process.
The STRIDE Model
STRIDE is a threat classification framework developed by Microsoft, formed from the initials of six threat categories.
Spoofing. Breaking through authentication using someone else's ID.
Tampering. Illegitimately altering data or communication content.
Repudiation. Erasing evidence of an action and denying having performed it.
Information disclosure. Access to data without authorization.
Denial of service. Rendering the system unavailable.
Elevation of privilege. Illegitimately obtaining higher privileges.
DREAD Scoring
After classifying threats with STRIDE, DREAD quantitatively assesses the severity of each threat. It scores five items, each on a scale of 1 to 10: Damage (the magnitude of harm), Reproducibility, Exploitability (the ease of attack), Affected Users (the number of users impacted), and Discoverability (the ease of discovery), then determines priority by the total score. However, the OWASP threat modeling process page states that using qualitative values rather than numeric ones, as in the DREAD model, helps keep the ranking from becoming overly subjective.
The PASTA Framework
PASTA (Process for Attack Simulation and Threat Analysis) is a seven-stage framework that analyzes business risks and technical threats in an integrated manner. It starts with defining business objectives, then proceeds to identifying the technical scope, application decomposition, threat analysis, vulnerability analysis, attack simulation, and risk and impact analysis.
Data Flow Diagrams and Trust Boundaries
Data flows that cross trust boundaries are the key focus of threat analysis
At the core of threat modeling is the data flow diagram (DFD). It visualizes the flow of data within a system and makes the trust boundaries explicit. A trust boundary is the dividing line between regions with different security levels, such as the boundary between the internet and an internal network, or between the application layer and the database layer. For each data flow that crosses a trust boundary, each STRIDE threat to the attack surface can be examined.
Integration into the Development Lifecycle
Threat modeling is not a task confined to the design phase alone. In agile development, the threats of new features are assessed every sprint, and the existing threat model is updated. An approach that incorporates SAST (static analysis) and DAST (dynamic analysis) into the CI/CD pipeline to automatically verify whether the risks identified in the threat model are addressed at the implementation level is another option. A defense-in-depth design can be planned at the threat modeling stage and its effectiveness verified through red team exercises.
The Record That Has to Remain Afterwards
What makes the practical difference is less the work of listing threats than whether the result can be used later. One point is how the items decided against are handled. Of everything that was drawn up, only some will actually be worked on; the rest are set aside on grounds such as the impact being small, the conditions for it to occur not coming together, or the cost not being warranted. If that decision to set something aside is not recorded, then the next time the same area is considered there is no way to tell that a decision was ever made. Either the same discussion is repeated or, the other way round, only the memory that it was already considered remains, with no way to check the grounds. What should be kept is not a list of items but the reason each was set aside and the conditions assumed at the time. The second point is those assumptions themselves. Analysis of this kind always treats something as trustworthy. Only by positing that traffic over a given stretch is protected, that a given process is called only from inside, or that a given value has already been checked upstream does the range to be examined become finite. When an assumption changes, the conclusions resting on it change with it. This is the part affected when some component is replaced by an outside mechanism or when the number of callers grows, but if the assumptions are not written down there is no way to identify which conclusions need revisiting. The third point is the drift that arises between the diagram and the implementation. A diagram is a copy of the design as it stood when it was drawn, and if the implementation moves ahead the diagram alone becomes out of date. Being out of date does not show up in the diagram itself, so unless a trigger for updating is placed on the side of the work, examination proceeds from a diagram that looks correct.
We explain building an organization's security posture in detail in the startup security checklist, designing a password policy in the corporate password policy article, and ransomware countermeasures in the ransomware protection article.
Was this article helpful?
Related Terms
- Privilege Escalation - From User to Admin AccessPrivilege escalation lets attackers elevate from a basic account to full admin control. Learn vertical and horizontal techniques and defenses against them.
- Security Audits - Evaluating Your Cyber DefensesA security audit reviews controls, policies, and infrastructure for weaknesses. Learn about audit types, frameworks like ISO 27001, and remediation steps.
- Incident Response - A Step-by-Step Cyber Attack PlanIncident response is the structured process of detecting, containing, and recovering from breaches. Walk through the six essential phases of an IR plan.
- DMZ Network Architecture and Its Security RoleA DMZ creates a buffer zone between the internet and your internal network for public-facing servers. Learn how it contains damage from compromised hosts.