Understanding Threat Modelling
Threat modelling is a proactive cybersecurity process that helps organizations identify, assess, and mitigate potential security risks before they materialize. By systematically analyzing vulnerabilities and attack vectors, teams can prioritize security controls, allocate resources efficiently, and reduce overall risk exposure.
Key Points
- Proactive defense: Address security gaps before exploitation occurs
- Resource optimization: Focus efforts on high-impact risks using structured frameworks
- Business alignment: Connect security investments to organizational objectives
- Compliance support: Meet requirements for ISO 27001, NIST, PCI DSS, and other standards
- Continuous process: Threat models must evolve with system changes and emerging threats
Core Concepts
Threat
A threat is any potential event, actor, or circumstance that could exploit vulnerabilities to compromise the confidentiality, integrity, or availability of systems or data.
Common threat categories:
- Cyber attacks: Ransomware, phishing, SQL injection, DDoS
- Human error: Misconfigured cloud storage, accidental data deletion
- Environmental factors: Power outages, natural disasters, hardware failures
- Insider threats: Malicious employees, compromised credentials
Vulnerability
A vulnerability is a weakness in systems, applications, or processes that threats can exploit to cause harm.
Typical sources:
- Software bugs: Unpatched CVEs, buffer overflows, race conditions
- Design flaws: Lack of input validation, insecure authentication
- Operational gaps: Weak password policies, missing encryption, excessive permissions
- Configuration errors: Default credentials, open ports, disabled security features
Risk
Risk represents the potential impact of a threat exploiting a vulnerability, calculated using:
Risk = Likelihood × Impact
- Likelihood: Probability the threat will occur (based on threat actor capability, existing controls)
- Impact: Severity of consequences (financial loss, reputational damage, operational disruption, legal penalties)
The Threat Modelling Process
1. Define Scope
Establish clear boundaries for your analysis:
- System components: Identify all hardware, software, networks, and third-party services
- Data flows: Map how information moves through the system (use data flow diagrams)
- Trust boundaries: Mark where access controls change (e.g., user-to-application, application-to-database, internal-to-external networks)
- Assumptions: Document security assumptions (e.g., "internal network is trusted")
2. Identify Assets
List critical assets requiring protection and classify by sensitivity:
| Asset Type | Examples | Protection Priority |
|---|---|---|
| Data | Customer PII, payment information, intellectual property, credentials | High |
| Systems | Authentication servers, databases, API gateways, admin panels | High |
| Processes | Payment processing, user onboarding, access provisioning | Medium |
| Infrastructure | Network devices, cloud resources, backup systems | Medium |
3. Identify Threats
Use established frameworks to systematically uncover threats:
STRIDE Framework (Microsoft):
- Spoofing: Impersonating users or systems
- Tampering: Unauthorized modification of data
- Repudiation: Denying actions without proof
- Information Disclosure: Exposing confidential data
- Denial of Service: Making systems unavailable
- Elevation of Privilege: Gaining unauthorized access levels
Other frameworks:
- OWASP Top 10: Web application security risks
- MITRE ATT&CK: Adversary tactics and techniques
- CAPEC: Common attack pattern enumeration
4. Analyze Vulnerabilities
Map vulnerabilities to identified threats using:
- CVSS scoring: Standardized vulnerability severity ratings (0-10 scale)
- Attack surface analysis: Identify exposed APIs, open ports, default credentials
- Code reviews: Static and dynamic application security testing (SAST/DAST)
- Penetration testing: Simulate real-world attacks to find weaknesses
5. Prioritize Risks
Evaluate and rank risks using a risk matrix:
| Likelihood ↓ / Impact → | Low | Medium | High |
|---|---|---|---|
| High | Monitor | Mitigate | Critical - Immediate Action |
| Medium | Accept | Mitigate | Mitigate |
| Low | Accept | Accept | Monitor |
Risk treatment options:
- Mitigate: Implement controls to reduce likelihood or impact
- Accept: Acknowledge risk when mitigation cost exceeds potential impact
- Transfer: Use insurance or third-party services
- Avoid: Eliminate the risky activity or feature
6. Develop Countermeasures
Implement security controls aligned with the NIST Cybersecurity Framework:
- Identify: Asset inventory, risk assessments, governance policies
- Protect: Encryption, access controls, secure configurations, security awareness training
- Detect: SIEM tools, intrusion detection systems (IDS), anomaly detection, log monitoring
- Respond: Incident response plans, communication protocols, forensic capabilities
- Recover: Backup strategies, disaster recovery plans, post-incident reviews
Defense in depth: Layer multiple controls so failure of one doesn't compromise security.
7. Monitor and Update
Threat modelling is continuous, not one-time:
- Automated scanning: Use vulnerability scanners (Nessus, OpenVAS, Qualys) regularly
- Manual reviews: Conduct red team exercises and penetration tests quarterly or annually
- Change triggers: Update threat models when adding features, changing architecture, or after incidents
- Metrics tracking: Monitor MTTD (mean time to detect) and MTTR (mean time to remediate)
Threat Modelling Frameworks and Tools
Popular Methodologies
| Framework | Best For | Key Characteristics |
|---|---|---|
| STRIDE | General-purpose threat identification | Covers 6 threat categories, Microsoft-developed |
| PASTA | Risk-centric business analysis | 7-stage process, aligns with business objectives |
| VAST | Enterprise-scale applications | Scalable, supports agile development |
| TRIKE | Risk-based approach | Focuses on defensive perspective |
| OCTAVE | Organizational risk assessment | Business-driven, considers people and processes |
Threat Modelling Tools
| Tool | Type | Key Features |
|---|---|---|
| OWASP Threat Dragon | Open-source | Diagram creation, CI/CD integration, free |
| Microsoft Threat Modeling Tool | Free desktop app | STRIDE-based, generates reports |
| IriusRisk | Commercial platform | Automated threat library, compliance mapping |
| ThreatModeler | Commercial platform | Collaborative, integrates with DevSecOps tools |
Advanced Techniques
Attack Trees
Visualize attack paths hierarchically to understand how attackers might achieve goals:
Root Goal: Steal Customer Data
├── Path 1: Exploit Web Application
│ ├── SQL Injection via search form
│ ├── XSS to steal session tokens
│ └── API authentication bypass
└── Path 2: Social Engineering
├── Phishing employees for credentials
├── Pretexting to gain system access
└── Physical access to offices
Benefits: Helps prioritize defenses by identifying most likely or damaging attack paths.
Data Flow Diagrams (DFDs)
Create visual representations showing:
- External entities: Users, third-party services
- Processes: Application components, services
- Data stores: Databases, file systems, caches
- Data flows: How information moves between components
Tip: Mark trust boundaries with dotted lines to highlight where security controls are critical.
Practical Example: E-Commerce Platform
Scenario: Securing the checkout process for an online store.
Step-by-Step Analysis
1. Scope Definition
- Components: Web application, payment gateway API, user database, session management
- Trust boundaries: Customer browser → web server → payment processor
2. Asset Identification
- Critical assets: Credit card data, user credentials, transaction