You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/threat-model.md
+278-5Lines changed: 278 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Threat modeling typically includes the following activities:
19
19
2.**Decompose the system** (or device) into components, trust boundaries, and data flows
20
20
3.**Identify threats** using structured frameworks (STRIDE, PASTA, LINDDUN, TARA, STRIDE-AI)
21
21
4.**Document all threats** with their respective scenarios and attack vectors
22
-
5.**Rate each threat** by its likelihood and impact using a risk scoring system (DREAD, CVSS v4.0)
22
+
5.**Rate each threat** by its likelihood and impact using a risk scoring system (DREAD, OWASP Risk Rating)
23
23
6.**Define mitigations** and prioritize remediation based on risk scores
24
24
7.**Validate and iterate** as the system evolves
25
25
@@ -775,7 +775,72 @@ DREAD is scored on a scale of 1 to 3 (or 0 to 10) according to each category:
775
775
776
776
**DREAD Score = (D + R + E + A + D) / 5**
777
777
778
-
### CVSS v4.0 (Common Vulnerability Scoring System - 2025 Standard)
778
+
Note: DREAD was Microsoft's original framework (now deprecated by Microsoft), but remains useful for quick qualitative assessments.
779
+
780
+
### OWASP Risk Rating Methodology (Recommended)
781
+
782
+
OWASP Risk Rating is the **recommended approach for threat modeling** in web and embedded applications. It combines threat agent factors, vulnerability factors, and business impact to produce a holistic risk score.
Mitigation: Implement BLE Secure Connections Numeric Comparison to raise Exploit difficulty to 3 → Risk drops to Low
835
+
```
836
+
837
+
### CVSS v4.0 (Common Vulnerability Scoring System - Vulnerability Severity)
838
+
839
+
**Important Distinction**: CVSS v4.0 scores the **technical severity** of *known vulnerabilities* (CVEs, CWEs), not the **business risk** of threat scenarios. For threat modeling:
840
+
-**Use CVSS** when scoring identified vulnerabilities during code review or against public CVE databases (e.g., "CVE-2025-12345 scores CVSS 8.5")
841
+
-**Use OWASP Risk Rating/DREAD** when scoring threat scenarios from threat modeling (e.g., "BLE pairing bypass threat scores 7.5")
842
+
843
+
CVSS lacks business context (financial impact, compliance consequences, market segment), which are essential for prioritizing mitigations. Threat models combine CVSS scores on known vulnerabilities with risk scoring frameworks for threat scenarios.
779
844
780
845
CVSS v4.0 (released June 2023) is the **current industry standard** for vulnerability severity scoring. It addresses IoT/OT-specific contexts better than v3.1.
FAIR (Factor Analysis of Information Risk) is a **quantitative framework** for calculating financial risk, essential for executive/board communication and investment decisions. Unlike qualitative frameworks (DREAD, OWASP Risk Rating), FAIR expresses risk in **financial terms**.
937
+
938
+
**FAIR Formula**:
939
+
```
940
+
Loss Event Frequency (LEF) = (Threat Event Frequency × Vulnerability) per year
941
+
Loss Magnitude (LM) = Financial impact per incident ($)
942
+
Annual Loss Expectancy (ALE) = LEF × LM
943
+
```
944
+
945
+
**When to Use FAIR**:
946
+
- Executive reporting: "This threat costs $X/year on average"
947
+
- ROI justification: "Mitigation investment of $Y reduces risk by $Z/year"
948
+
- Cyber insurance: "Annual loss expectancy is $M"
949
+
- Board risk appetite discussions
950
+
- Budgeting security controls
951
+
952
+
**FAIR Example - Medical Device Firmware Update Server Compromise**:
## Threat Model Risk Register (Design → Test → Release)
1001
+
1002
+
A **risk register** is a structured artifact that tracks identified threats from threat modeling through implementation, pre-release testing, and final sign-off. It bridges the gap between threat modeling and penetration testing by maintaining traceability.
1003
+
1004
+
### Risk Register Schema
1005
+
1006
+
Threat registers should include:
1007
+
```json
1008
+
{
1009
+
"threat_registry": [
1010
+
{
1011
+
"threat_id": "THR-BLE-001",
1012
+
"title": "BLE Pairing Bypass",
1013
+
"description": "Attacker spoofs mobile app to pair with device",
1014
+
"stride_category": "Spoofing",
1015
+
"likelihood": "Medium",
1016
+
"impact": "High",
1017
+
"risk_score": 7.5,
1018
+
"risk_framework": "OWASP Risk Rating",
1019
+
"priority": "High",
1020
+
1021
+
"mitigation": {
1022
+
"strategy": "Implement BLE Secure Connections with Numeric Comparison",
1023
+
"owner": "Firmware Team",
1024
+
"target_date": "2025-02-15",
1025
+
"status": "In Progress"
1026
+
},
1027
+
1028
+
"validation": {
1029
+
"test_case_id": "ISTG-WRLS-INFO-001",
1030
+
"test_description": "Attempt pairing without Numeric Comparison validation",
1031
+
"pentest_status": "Scheduled",
1032
+
"pentest_date": "2025-03-01",
1033
+
"result": null,
1034
+
"sign_off": false
1035
+
},
1036
+
1037
+
"residual_risk": {
1038
+
"likelihood": "Low",
1039
+
"impact": "Medium",
1040
+
"risk_score": 2.0,
1041
+
"accepted": false
1042
+
}
1043
+
}
1044
+
]
1045
+
}
1046
+
```
1047
+
1048
+
### Risk Register Lifecycle
1049
+
1050
+
**Phase 1: Identification (Design)**
1051
+
- Threat modeling team identifies threat using STRIDE/PASTA
1052
+
- Assign risk score using OWASP Risk Rating or FAIR
1053
+
- Create mitigation strategy with owner and timeline
1054
+
1055
+
**Phase 2: Tracking (Development)**
1056
+
- Development team updates mitigation status in risk register
1057
+
- Weekly reviews in sprint planning/security meetings
1058
+
- Escalate blocked items to security team lead
1059
+
1060
+
**Phase 3: Pre-Release Testing (QA/Security)**
1061
+
- Security team creates pentest test cases mapped to each threat
1062
+
- Penetration testers execute tests and update validation status
1063
+
- Document findings and mitigation verification
1064
+
1065
+
**Phase 4: Sign-Off (Release)**
1066
+
- Security team reviews risk register completeness
1067
+
- All threats must have validation evidence (pentest report, code review)
1068
+
- Residual risk assessment: Accept or defer release
1069
+
- Compliance review for regulated industries (medical, automotive, defense)
1070
+
1071
+
### Automated Risk Register Integration
1072
+
1073
+
**Example: Map Threagile threats to pentest test plan**:
Before beginning threat modeling, gather these artifacts to answer **"What are we working on?"** Complete documentation enables thorough threat identification and accurate risk assessment.
2495
+
2496
+
**Business & Product Context** (defines scope and risk appetite):
2497
+
-[ ] Product Requirements Document (PRD) - Features, user workflows, business objectives
**Rationale**: Incomplete artifacts lead to missed threats. Without hardware datasheets, physical attack vectors (JTAG, glitch injection, side-channels) may be overlooked. Without PRDs, business impact cannot be accurately assessed for risk scoring. Without firmware architecture, supply chain and third-party risks are invisible.
2522
+
2523
+
---
2524
+
2250
2525
### Threat Model Document Template
2251
2526
2252
2527
```markdown
@@ -2401,6 +2676,4 @@ Threat models should answer the following four questions:
2401
2676
*[MITRE ATT&CK for ICS](https://attack.mitre.org/matrices/ics/) - Industrial control systems tactics
2402
2677
*[MITRE ATT&CK for Mobile](https://attack.mitre.org/matrices/mobile/) - IoT and mobile threats
2403
2678
*[CVE Database](https://cve.mitre.org/) - Common Vulnerabilities and Exposures
2404
-
*[NIST NVD](https://nvd.nist.gov/) - National Vulnerability Database
2405
-
2406
-
*Co-Authored-By: Claude <noreply@anthropic.com>*
2679
+
*[NIST NVD](https://nvd.nist.gov/) - National Vulnerability Database
0 commit comments