Threat modeling (STRIDE, DREAD) in Cybersecurity - Time & Space Complexity
When we analyze threat modeling methods like STRIDE and DREAD, we want to understand how the effort to identify and assess threats grows as the system size or complexity increases.
We ask: How does the work needed change when there are more components or potential threats?
Analyze the time complexity of this simplified threat modeling process.
# For each system component
for component in system_components:
# For each STRIDE threat category
for threat in STRIDE_categories:
# Assess threat impact using DREAD
score = assess_dread(component, threat)
record_score(component, threat, score)
This code checks every component against each STRIDE threat and scores it using DREAD.
Look at what repeats in this process:
- Primary operation: Checking each component against each STRIDE threat category.
- How many times: Number of components times number of STRIDE categories.
As the number of components grows, the total checks grow too.
| Input Size (components) | Approx. Operations (components x 6 STRIDE threats) |
|---|---|
| 10 | 60 |
| 100 | 600 |
| 1000 | 6000 |
Pattern observation: The work grows directly with the number of components; doubling components doubles the work.
Time Complexity: O(n)
This means the time needed grows in a straight line with the number of system components.
[X] Wrong: "Adding more threat categories will make the time grow exponentially."
[OK] Correct: The number of threat categories is fixed and small (like 6 in STRIDE), so it acts like a constant multiplier, not causing exponential growth.
Understanding how threat modeling scales helps you explain how security analysis fits into project timelines and resource planning.
"What if we added a new scoring method that requires checking each threat twice? How would the time complexity change?"
Practice
Solution
Step 1: Understand the goal of threat modeling
Threat modeling is used to find security risks early in a system or application.Step 2: Identify the main benefit
It helps prioritize which risks to fix first to prevent harm.Final Answer:
To identify and prioritize potential security risks before they happen -> Option AQuick Check:
Threat modeling = find and rank risks [OK]
- Confusing threat modeling with coding or UI design
- Thinking it monitors live traffic
- Assuming it fixes risks automatically
Solution
Step 1: Recall STRIDE categories
STRIDE stands for Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege.Step 2: Match options to STRIDE
Only Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege lists all correct STRIDE categories in full.Final Answer:
Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege -> Option DQuick Check:
STRIDE = STRIDE categories [OK]
- Mixing unrelated security terms
- Partial or incorrect category names
- Assuming STRIDE includes testing or encryption
Solution
Step 1: Add all DREAD components
Sum the scores: 3 + 2 + 4 + 3 + 1 = 13.Step 2: Verify calculation
Check each value carefully to avoid mistakes.Final Answer:
13 -> Option AQuick Check:
Sum of DREAD scores = 13 [OK]
- Forgetting one category in sum
- Adding incorrectly
- Confusing DREAD with STRIDE categories
Solution
Step 1: Understand STRIDE categories
STRIDE categories are specific threat types, not security controls.Step 2: Identify role of encryption
Encryption is a defense method, not a threat category.Final Answer:
Encryption is not a STRIDE threat category; it is a security control -> Option BQuick Check:
Encryption = control, not STRIDE threat [OK]
- Confusing security controls with threat categories
- Mixing STRIDE and DREAD concepts
- Assuming encryption causes threats
Solution
Step 1: Calculate total DREAD scores for both threats
Threat A: 5+3+4+2+3=17; Threat B: 4+4+3+5+2=18.Step 2: Compare total scores and interpret
Threat B has a higher total score (18) than Threat A (17), so Threat B is higher risk.Step 3: Re-examine options carefully
Threat A, because its total DREAD score is higher indicating greater risk incorrectly states Threat A has higher score. Options C and D focus on single factors instead of total score.Final Answer:
Threat B, because it has the higher total DREAD score indicating greater risk -> Option CQuick Check:
Total DREAD score guides priority [OK]
- Choosing based on one factor only
- Misadding scores
- Ignoring total DREAD score
Ready to prove it?
Pass the test and this pattern moves unknown
