Advance Threat Modelling
Advance Threat Modelling
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
Introduction
Threat modeling represents one of the most powerful yet underutilized practices
in cybersecurity. As systems become increasingly complex and interconnected,
the ability to systematically identify, categorize, and mitigate potential security
threats before they materialize becomes essential. Threat modeling provides a
structured approach to envisioning and addressing security concerns during
system design rather than after deployment, substantially reducing both risk and
remediation costs. This comprehensive guide explores advanced threat
modeling methodologies, practical implementation strategies, and integration
approaches for security architects and development teams seeking to build
security into the fabric of their systems.
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
3. Mitigation Development: Designing controls and countermeasures to address
identified threats
4. Validation: Verifying that mitigations effectively address the identified threats
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
def analyze_component_threats(component, dataflows):
threats = []
return threats
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
PASTA takes a more comprehensive approach by incorporating business
objectives and attacker motivation into the analysis, making it well-suited for
complex enterprise applications.
Each factor is typically rated on a scale of 1-10, and the final risk score is
calculated as:
Risk Score = (D + R + E + A + D) / 5
function calculateDreadScore(threat) {
const damage = evaluateDamagePotential(threat);
const reproducibility = evaluateReproducibility(threat);
const exploitability = evaluateExploitability(threat);
const affectedUsers = evaluateAffectedUsers(threat);
const discoverability = evaluateDiscoverability(threat);
return {
score: score,
risk_level: score < 3 ? "Low" : (score < 7 ? "Medium" : "High"),
factors: {
damage, reproducibility, exploitability, affectedUsers, discoverability
}
};
}
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
Root Goal: Obtain Administrative Access to Financial Database
|
├── Attack Vector 1: SQL Injection
│ ├── Discover vulnerable parameter (AND)
│ ├── Craft malicious payload (AND)
│ ├── Execute injection attack (AND)
│ ├── Escalate to system commands (AND)
│ └── Create backdoor account
│
├── Attack Vector 2: Credential Theft
│ ├── Target Database Administrator
│ │ ├── Phishing attack (OR)
│ │ ├── Malware deployment (OR)
│ │ └── Social engineering
│ └── Use stolen credentials
│
└── Attack Vector 3: Exploit Unpatched Vulnerability
├── Identify database version (AND)
├── Research known vulnerabilities (AND)
├── Develop/acquire exploit (AND)
└── Execute exploit
class AttackNode {
constructor(name, type = "AND", probability = 0, cost = 0) {
this.name = name;
this.type = type; // AND or OR
this.children = [];
this.probability = probability; // 0 to 1
this.cost = cost; // Estimated attack cost
}
addChild(child) {
this.children.push(child);
}
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
}
┌───────────────┐ ┌───────────────┐
│ │ │ │
│ Web Browser │──────────▶│ Web Server │
│ │ │ │
└───────────────┘ └───────────────┘
│
▼
┌───────────────┐
│ │
│ Application │
│ Server │
│ │
└───────────────┘
│
┌───────────────┴───────────────┐
▼ ▼
┌───────────────┐ ┌───────────────┐
│ │ │ │
│ Database │ │ Payment │
│ Server │ │ Gateway │
│ │ │ │
└───────────────┘ └───────────────┘
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
4. Trust Level Boundaries: Between security contexts (e.g., authenticated vs.
unauthenticated)
A simple function to identify flows crossing trust boundaries might look like:
return boundary_crossings
STRIDE-per-Element Analysis
STRIDE can be systematically applied to each system element:
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
○ Information disclosure (e.g., eavesdropping)
○ Denial of service (e.g., flow disruption)
● For each external entity, analyze potential:
○ Spoofing (e.g., entity impersonation)
○ Repudiation (e.g., action denial)
threat_actor:
type: "External"
motivation: "Unauthorized access to sensitive data"
capabilities: "Medium technical skills"
prerequisites:
- "Knowledge of the JWT format"
- "Ability to intercept a valid JWT token"
attack_flow:
- "Attacker obtains a legitimate JWT token"
- "Attacker decodes the token to analyze structure"
- "Attacker modifies claims (e.g., role, permissions)"
- "Attacker uses modified token to access the application"
technical_impact:
- "Unauthorized access to restricted functionality"
- "Potential privilege escalation"
business_impact:
- "Regulatory compliance violations"
- "Unauthorized access to sensitive customer data"
likelihood: "Medium"
severity: "High"
risk_rating: "High"
mitigations:
- mitigation: "Implement proper signature validation"
effectiveness: "High"
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
Threat Intelligence Integration
Incorporating threat intelligence enhances threat modeling with real-world
attacker behaviors:
const threatMitigationMap = {
authentication_threats: {
password_brute_force: {
controls: [
{
name: "Account lockout policy",
effectiveness: "high",
implementation: "Lock accounts after multiple failed attempts"
},
{
name: "Multi-factor authentication",
effectiveness: "high",
implementation: "Require second factor for authentication"
}
]
},
session_hijacking: {
controls: [
{
name: "Secure cookie attributes",
effectiveness: "medium",
implementation: "Set HttpOnly, Secure, and SameSite flags"
},
{
name: "Session timeout",
effectiveness: "medium",
implementation: "Expire sessions after period of inactivity"
}
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
]
}
}
};
if (!token) {
return res.status(401).json({ error: 'Missing authorization token' });
}
try {
// Verify the token (uses RS256 algorithm with public key)
const decoded = jwt.verify(token, PUBLIC_KEY, {
algorithms: ['RS256'], // Only allow specific algorithm
issuer: 'https://auth.company.com', // Validate issuer
audience: 'https://api.company.com' // Validate audience
});
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
1. Design Phase: Initial threat modeling during architectural design
2. Implementation Phase: Continuous threat modeling as new components are
developed
3. Testing Phase: Validate that mitigations address identified threats
4. Deployment Phase: Final security verification before production
5. Operations Phase: Continuous monitoring for new threats
components:
- id: "web-app"
name: "Web Application"
type: "web-application"
technology: "React.js"
trust_level: "untrusted"
- id: "api-gateway"
name: "API Gateway"
type: "gateway"
technology: "Kong"
trust_level: "semi-trusted"
- id: "auth-service"
name: "Authentication Service"
type: "service"
technology: "Node.js"
trust_level: "trusted"
data_flows:
- id: "flow-1"
name: "Authentication Flow"
source: "web-app"
destination: "api-gateway"
data: "User credentials"
data_classification: "confidential"
trust_boundaries:
- id: "boundary-1"
name: "Internet Boundary"
description: "Separates untrusted internet from internal systems"
components: ["web-app"]
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
threats:
- id: "threat-1"
name: "Authentication Bypass"
category: "spoofing"
affected_components: ["auth-service"]
status: "mitigated"
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
│ Feature │ Microsoft │ OWASP │ IriusRisk │
ThreatModeler │
│ │ TMT │ Threat Dragon │ │
│
├─────────────────────┼────────────────┼────────────────┼────────────────┼───
─────────────┤
│ Diagramming │ Built-in │ Built-in │ Built-in │
Built-in │
│ Support │ │ │ │
│
├─────────────────────┼────────────────┼────────────────┼────────────────┼───
─────────────┤
│ Methodology │ STRIDE │ STRIDE │ Multiple │
Multiple │
│ Support │ │ │ │
│
├─────────────────────┼────────────────┼────────────────┼────────────────┼───
─────────────┤
│ Automatic Threat │ Basic │ Limited │ Advanced │
Advanced │
│ Generation │ │ │ │
│
├─────────────────────┼────────────────┼────────────────┼────────────────┼───
─────────────┤
│ Integration with │ Limited │ GitHub only │ Extensive │
Extensive │
│ Development Tools │ │ │ │
│
├─────────────────────┼────────────────┼────────────────┼────────────────┼───
─────────────┤
│ Collaboration │ Limited │ Yes │ Advanced │
Advanced │
│ Features │ │ │ │
│
├─────────────────────┼────────────────┼────────────────┼────────────────┼───
─────────────┤
│ Risk Assessment │ Basic │ Basic │ Advanced │
Advanced │
│ │ │ │ │
│
├─────────────────────┼────────────────┼────────────────┼────────────────┼───
─────────────┤
│ Compliance │ Limited │ No │ Yes │
Yes │
│ Mapping │ │ │ │
│
├─────────────────────┼────────────────┼────────────────┼────────────────┼───
─────────────┤
│ API Support │ No │ Limited │ Yes │
Yes │
│ │ │ │ │
│
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
├─────────────────────┼────────────────┼────────────────┼────────────────┼───
─────────────┤
│ Cost │ Free │ Free │ Commercial │
Commercial │
│ │ │ │ │
│
└─────────────────────┴────────────────┴────────────────┴────────────────┴───
─────────────┘
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
2. Focus Areas: Authentication, transaction processing, data storage
3. Key Findings: Identified previously unknown authentication bypass and
potential API-level data leakage
4. Results: 35% reduction in vulnerabilities found in production, 62% cost
reduction for security fixes
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
5. Limited Scope: Focusing only on technical threats while ignoring business
impacts
Conclusion
Threat modeling represents a foundational security practice that bridges the gap
between theoretical security knowledge and practical application. By
systematically analyzing potential threats before implementation, organizations
can build security into their systems from the ground up, substantially reducing
both security incidents and remediation costs.
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
Threat modeling differs from other security assessments in several key ways:
1. Initial Architecture Design: The first threat modeling session should occur as
soon as the high-level architecture is defined, focusing on major components
and data flows.
2. Feature Design: Additional threat modeling occurs during feature design,
particularly for security-critical features like authentication, authorization, and
data handling.
3. Pre-Implementation Review: A final review before coding begins ensures all
identified threats have corresponding security requirements.
4. Design Change Reviews: Whenever significant design changes occur,
additional threat modeling sessions should reassess the security implications.
5. Continuous Updates: The threat model should be a living document, updated
as the system evolves and new threats emerge.
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
Effective threat modeling measurement requires both process and outcome
metrics:
1. Process Metrics:
○ Percentage of projects with completed threat models
○ Average time to complete a threat model
○ Number of threats identified per application
○ Percentage of threats with defined mitigations
2. Outcome Metrics:
○ Reduction in vulnerabilities found in later testing phases
○ Reduction in security issues discovered in production
○ Decrease in security incident remediation costs
○ Increased developer security awareness and engagement
3. ROI Metrics:
○ Cost savings from early vulnerability identification
○ Reduced security-related project delays
○ Decreased cost of compliance verification
○ Prevention of security incidents
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
○ Generate baseline threat models from architecture diagrams
○ Identify common threats based on technology stack
○ Track threat mitigation implementation status
○ Update threat models based on code changes
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience
5. Security Champions: Embed security-trained developers in each team to
facilitate lightweight threat modeling without dependencies on central security
teams.
This adapted approach maintains security rigor while aligning with the speed
requirements of modern development methodologies.
Okan YILDIZ | Global Cybersecurity Leader | Innovating for Secure Digital Futures | Trusted
Advisor in Cyber Resilience