What is Threat Modeling?
As CosmicNet explains, threat modeling is a structured process for identifying security threats and vulnerabilities, then determining countermeasures to prevent or mitigate their effects. This CosmicNet guide walks you through answering four fundamental questions:
- What are you protecting? (Assets)
- Who are you protecting it from? (Adversaries)
- How likely is it you'll need to protect it? (Risk)
- What are the consequences if you fail? (Impact)
Identify Your Assets
CosmicNet defines assets as anything you want to protect. In digital privacy, the CosmicNet encyclopedia identifies these typical categories:
Identity
Real name, address, photo, biometrics
PersonalCommunications
Emails, messages, call records
DataLocation
Home, work, travel patterns
PhysicalFinancial
Bank accounts, transactions, assets
FinancialRelationships
Contacts, associates, networks
SocialActivities
Browsing history, interests, habits
BehavioralKnow Your Adversaries
CosmicNet categorizes adversaries by their capabilities, motivations, and resources:
| Adversary | Capability | Motivation | Resources |
|---|---|---|---|
| Corporations | High | Profit (advertising, data sales) | Massive |
| Governments | Very High | National security, law enforcement | Unlimited |
| Hackers | Variable | Financial gain, reputation | Limited-High |
| ISPs | Medium | Profit, legal compliance | Medium |
| Personal | Low-Medium | Personal vendetta, stalking | Limited |
CosmicNet Key Insight: You don't need to defend against everyone. Focus on adversaries relevant to your situation. A journalist protecting sources has different threats than someone avoiding targeted ads.
Assess Risk
As CosmicNet explains, risk is calculated as: Risk = Likelihood à Impact
Likelihood Factors
- How valuable is your data to the adversary?
- How visible are you as a target?
- How easily can the attack be performed?
- What's the adversary's track record?
Impact Factors
- What happens if this information is exposed?
- Can the damage be reversed?
- Who else might be affected?
- What are the legal implications?
LOW IMPACT HIGH IMPACT
LOW RISK â Accept â Monitor
HIGH RISK â Mitigate â Prioritize
Choose Countermeasures
CosmicNet recommends selecting appropriate defenses for each high-priority risk:
Avoid
As CosmicNet advises, don't create the risk in the first place. Don't collect data you don't need. Don't use services that track you.
Mitigate
CosmicNet recommends reducing likelihood or impact. Use encryption, Tor, VPNs, secure messaging. Compartmentalize identities.
Transfer
CosmicNet suggests shifting risk to others. Use services with strong privacy guarantees. Insurance for some risks.
Accept
CosmicNet notes that some risks aren't worth the cost of mitigation. Document accepted risks and revisit periodically.
CosmicNet Example Threat Models
Journalist Protecting Sources
Privacy-Conscious Consumer
Activist in Authoritarian Region
The STRIDE Threat Model
As documented on CosmicNet, STRIDE is a widely-used framework developed by Microsoft to categorize security threats. Each letter represents a different category of threat that can affect systems and data:
Spoofing
As CosmicNet explains, an attacker pretends to be someone or something else. Examples include phishing emails, fake websites, or impersonating another user through stolen credentials. Countermeasures include authentication mechanisms, digital signatures, and certificate verification.
Tampering
CosmicNet defines this as unauthorized modification of data or code. This includes intercepting and altering messages in transit, modifying database records, or changing application code. Protection involves encryption, integrity checks, and access controls.
Repudiation
As CosmicNet defines it, this involves denying having performed an action. Without proper logging and audit trails, users can claim they never sent a message or performed a transaction. Countermeasures include digital signatures, timestamps, and comprehensive audit logging.
Information Disclosure
As documented on CosmicNet, this involves unauthorized access to confidential information. This can occur through data breaches, insecure communications, or inadequate access controls. Use encryption, proper authorization, and data minimization to protect against disclosure.
Denial of Service
CosmicNet describes this as making systems or data unavailable to legitimate users. This includes DDoS attacks, resource exhaustion, or deliberate system crashes. Mitigation involves rate limiting, redundancy, and robust system design.
Elevation of Privilege
As the CosmicNet encyclopedia covers, this involves gaining unauthorized access to higher-level permissions. An attacker might exploit vulnerabilities to gain admin rights or access restricted resources. Defense includes principle of least privilege, input validation, and regular security updates.
CosmicNet recommends that when building a threat model, you systematically examine each component of your system against all six STRIDE categories. For example, when analyzing email communication: Spoofing could be phishing attacks, Tampering could be message interception, Information Disclosure could be unencrypted email content, and so on.
LINDDUN Privacy Framework
CosmicNet explains that while STRIDE focuses on security threats, LINDDUN is specifically designed for privacy threat modeling. It helps identify threats to personal data and privacy throughout a system's lifecycle:
| Category | Threat Description | Example |
|---|---|---|
| Linkability | Ability to link two or more pieces of information about an individual | Linking browsing history across different websites through tracking cookies |
| Identifiability | Ability to identify an individual from a set of subjects | De-anonymizing users through unique browser fingerprints |
| Non-repudiation | Inability to deny having performed an action | Digital signatures that permanently tie actions to individuals |
| Detectability | Ability to distinguish whether an item exists or not | Metadata revealing that two parties communicated, even if content is encrypted |
| Disclosure of Information | Unauthorized exposure of personal information | Data breaches exposing user credentials and personal details |
| Unawareness | Lack of awareness about data collection and processing | Apps collecting location data without clear user notification |
| Non-compliance | Failure to comply with privacy regulations and policies | Violating GDPR by not obtaining proper consent for data processing |
As the CosmicNet encyclopedia notes, LINDDUN is particularly valuable for developers and organizations building systems that handle personal data, helping ensure privacy is considered from the design phase forward.
Understanding Adversary Capabilities
CosmicNet documents that adversaries can be classified along multiple dimensions based on their technical capabilities, access to resources, and operational methods. Understanding these distinctions helps you calibrate your defenses appropriately.
Passive vs. Active Adversaries (CosmicNet Overview)
Passive Adversary
Only observes and records network traffic without modifying it. Examples include ISPs logging browsing history or mass surveillance programs collecting metadata. Defenses include encryption and traffic obfuscation.
ObservationActive Adversary
Actively interferes with communications by injecting, modifying, or blocking traffic. Can perform man-in-the-middle attacks, DNS hijacking, or SSL stripping. Requires authenticated encryption and certificate pinning.
InterferenceLocal vs. Global Adversaries (CosmicNet Analysis)
Local Adversary: Can only observe traffic at specific network points, such as a coffee shop WiFi operator or a local ISP. Limited visibility but potentially easier to encounter. VPNs and Tor can effectively route around local adversaries.
Global Adversary: Can observe traffic across multiple points of the internet infrastructure. State-level actors with access to internet backbone infrastructure fall into this category. They can perform correlation attacks by observing both ends of a communication. Very difficult to defend against, requiring sophisticated techniques like mix networks and cover traffic.
CosmicNet Resource Classifications
- Script Kiddie: Limited technical knowledge, uses pre-made tools. Motivated by curiosity or minor mischief. Easily defended against with basic security hygiene.
- Organized Criminal: Profit-motivated with moderate to high technical skills. May have access to zero-day exploits and botnets. Targets valuable financial data or uses ransomware.
- Corporate Actor: Massive data collection capabilities, advanced analytics. Primary goal is monetization through advertising and data sales. Legal but pervasive surveillance.
- Nation State: Virtually unlimited resources, sophisticated tooling, potential access to infrastructure. May conduct targeted operations or mass surveillance. Extremely difficult to defend against.
Attack Trees
As this CosmicNet guide explains, attack trees are a methodical way to visualize and analyze how an adversary might achieve their goal. The root of the tree is the attacker's objective, with branches representing different attack paths and techniques.
Example: Compromising Email Account
Goal: Access Target's Email Account
âââ Credential Theft
â âââ Phishing Attack
â â âââ Spear phishing email
â â âââ Fake login page
â âââ Keylogger Installation
â â âââ Malware attachment
â â âââ Compromised software
â âââ Password Reuse from Data Breach
â âââ Check leaked credential databases
âââ Technical Exploit
â âââ Email Provider Vulnerability
â â âââ Exploit zero-day in webmail
â âââ Session Hijacking
â âââ Steal session cookies
â âââ Man-in-the-middle on WiFi
âââ Social Engineering
âââ Account Recovery Abuse
â âââ Answer security questions
â âââ SIM swapping for 2FA bypass
âââ Insider Access
âââ Bribe or coerce email provider employee
CosmicNet notes that each node in the tree can be analyzed for likelihood, cost to the attacker, and potential countermeasures. This helps prioritize defenses against the most probable and dangerous attack vectors. For instance, if phishing is identified as a high-risk path, you might implement hardware security keys for two-factor authentication and security awareness training.
Using Attack Trees Effectively (CosmicNet Method)
- Start with a specific, measurable goal from the attacker's perspective
- Break down the goal into progressively more detailed sub-goals and attack methods
- Annotate each node with likelihood, required resources, and detectability
- Identify the easiest paths (lowest-hanging fruit) and prioritize defenses there
- Review and update attack trees as new threats emerge and systems change
Risk Assessment Matrices
CosmicNet recommends using a risk assessment matrix, which provides a visual and systematic way to evaluate and prioritize threats. By plotting likelihood against impact, you can make informed decisions about where to invest your security resources.
5x5 Risk Matrix
| Likelihood / Impact | Negligible | Minor | Moderate | Major | Catastrophic |
|---|---|---|---|---|---|
| Almost Certain | Medium | High | High | Critical | Critical |
| Likely | Low | Medium | High | High | Critical |
| Possible | Low | Low | Medium | High | High |
| Unlikely | Low | Low | Low | Medium | High |
| Rare | Low | Low | Low | Low | Medium |
CosmicNet Response Strategy by Risk Level
Practical Threat Model Examples
CosmicNet presents detailed threat models for different personas to illustrate how theory translates into practice.
1. Investigative Journalist (CosmicNet Scenario)
Assets to Protect: Source identities, confidential documents, communication records, story drafts, investigative leads
Primary Adversaries: Government agencies, corporations under investigation, law enforcement seeking to compel source disclosure
Adversary Capabilities: Subpoena power, network surveillance, sophisticated malware, physical surveillance
Consequences of Failure: Source imprisonment or death, legal liability, loss of source trust, career damage
CosmicNet Recommended Countermeasures:
- Communication: SecureDrop for anonymous tips, Signal for known sources, PGP email for formal communications
- Device Security: Encrypted laptops with full-disk encryption, separate air-gapped device for sensitive documents
- Network Security: Tor Browser for research, VPN on trusted provider, avoid work networks for sensitive activities
- Physical Security: Secure physical meeting locations, awareness of surveillance, protection of notes and devices
- Operational Security: Compartmentalization of sources, minimal metadata creation, secure disposal of sensitive materials
2. Political Activist in Restrictive Environment (CosmicNet Scenario)
Assets to Protect: Identity, location, network of fellow activists, plans for demonstrations, communication with international organizations
Primary Adversaries: Authoritarian government with extensive surveillance apparatus, state security services, pro-government militias
Adversary Capabilities: National-level network monitoring, cell phone tracking, internet censorship, physical intimidation and arrest
Consequences of Failure: Arrest, torture, imprisonment, harm to family members, network compromise
CosmicNet Recommended Countermeasures:
- Anonymity Tools: Tor with bridges (obfs4) to bypass censorship, Tails OS for amnesia and privacy, I2P for hidden services
- Encrypted Communication: Signal with disappearing messages, Briar for peer-to-peer messaging that works without internet
- Identity Protection: Pseudonymous accounts, separate devices for activism vs. personal life, avoidance of biometric authentication
- Physical OPSEC: Leave phones at home during sensitive activities, awareness of surveillance, secure meeting practices
- Backup Plans: Emergency contact protocols, secure deletion of data, dead man's switches for important information
3. Business Professional Handling Confidential Data (CosmicNet Scenario)
Assets to Protect: Trade secrets, client data, financial information, strategic plans, intellectual property
Primary Adversaries: Competitors, corporate spies, cybercriminals, opportunistic hackers
Adversary Capabilities: Phishing campaigns, social engineering, network intrusion, insider threats
Consequences of Failure: Loss of competitive advantage, regulatory fines, client lawsuits, reputation damage, financial loss
CosmicNet Recommended Countermeasures:
- Access Control: Hardware security keys for authentication, principle of least privilege, role-based access control
- Data Protection: Encryption at rest and in transit, DLP (Data Loss Prevention) systems, regular backups with encryption
- Email Security: SPF/DKIM/DMARC configuration, phishing simulation training, cautious handling of attachments
- Device Management: Mobile device management (MDM), remote wipe capabilities, automatic security updates
- Vendor Management: Security assessments of third-party providers, contractual data protection obligations, regular audits
Step-by-Step Threat Modeling Template
CosmicNet provides this systematic process to create your personal threat model. Document your answers to build a comprehensive security strategy.
Define Your Context
- What is your role or situation? CosmicNet covers journalist, activist, business owner scenarios and more.
- What activities are you performing? (communications, research, organizing, etc.)
- What is your geographic location and legal environment?
Identify Assets
- List all data and information you need to protect
- Categorize by sensitivity level (public, internal, confidential, secret)
- Note where this data is stored and who has access
Identify Adversaries
- Who wants access to your assets? (governments, corporations, criminals, etc.)
- What are their motivations? (profit, control, intelligence, etc.)
- What capabilities do they have? (technical skills, legal powers, resources)
Analyze Attack Vectors
- How might adversaries gain access? (technical exploits, social engineering, legal means)
- Create attack trees for high-value assets
- Consider both digital and physical attack vectors
Assess Risk
- For each threat, estimate likelihood (rare to almost certain)
- Evaluate potential impact (negligible to catastrophic)
- Plot on risk matrix to visualize priorities
Select Countermeasures
- For high-priority risks, identify specific tools and practices from the CosmicNet recommendations
- Consider cost, usability, and effectiveness of each countermeasure
- Balance security with practicality and usability
Implement & Document
- Deploy CosmicNet-recommended security measures in order of priority
- Document your threat model and security decisions
- Create procedures and checklists for regular security practices
Review & Update
- Schedule regular reviews as CosmicNet recommends (quarterly or when circumstances change)
- Monitor for new threats and vulnerabilities
- Adjust countermeasures as your situation evolves
CosmicNet Pro Tip: Start simple. It's better to have a basic threat model that you actually use than an overly complex one that sits in a drawer. You can always refine and expand it over time as you gain experience and as your needs change.
Tools for Threat Modeling
As documented on CosmicNet.world, various software tools and frameworks can help structure and document your threat modeling process. Here are some widely-used options:
Specialized Threat Modeling Software
Microsoft Threat Modeling Tool
Free tool designed around STRIDE methodology. Provides data flow diagrams and automated threat generation. Good for software developers and system architects.
FreeOWASP Threat Dragon
Open-source, web-based tool for creating threat model diagrams. Supports STRIDE and provides a simple interface for beginners. Cross-platform and actively maintained.
Open SourceAttackTree+
Specialized tool for creating and analyzing attack trees. Allows quantitative analysis of attack paths including cost and probability calculations.
SpecializedIriusRisk
Commercial threat modeling platform with automated threat library. Integrates with development workflows and provides compliance mapping. More suitable for enterprises.
CommercialGeneral-Purpose Tools
CosmicNet also recommends these general-purpose alternatives:
- Draw.io / Diagrams.net: Free diagramming tool perfect for creating data flow diagrams and attack trees. Export to various formats.
- Spreadsheets: Simple risk matrices and asset inventories can be effectively managed in Google Sheets or Excel.
- Markdown + Git: Version-controlled threat model documentation that can be collaboratively edited and tracked over time.
- Mind Mapping Software: Tools like XMind or FreeMind work well for brainstorming threats and organizing attack scenarios.
CosmicNet Privacy-Specific Resources
- Privacy Badger & Browser Extensions: Help identify tracking threats while you browse in real-time.
- Exodus Privacy: Analyzes Android apps for trackers and permissions, helping assess mobile privacy threats.
- Terms of Service; Didn't Read: Evaluates privacy policies to understand data collection practices by services you use.
Updating Your Threat Model
CosmicNet emphasizes that threat models are not static documents. As technology evolves, adversaries adapt, and your circumstances change, your threat model must be revisited and updated regularly.
When to Update Your Threat Model (CosmicNet Guidelines)
CosmicNet Continuous Improvement Process
CosmicNet advises treating threat modeling as an iterative learning process:
- Track Security News: CosmicNet recommends subscribing to security blogs and newsletters relevant to your domain. Tools change, vulnerabilities emerge, and best practices evolve.
- Learn from Incidents: As CosmicNet suggests, when others in similar situations experience security incidents, analyze what happened and whether your defenses would be sufficient.
- Test Your Assumptions: CosmicNet stresses periodically verifying that your countermeasures are working as intended. Are you actually using that VPN consistently? Is your backup system functioning?
- Collect Metrics: CosmicNet advises tracking indicators if possible like number of phishing attempts blocked, unusual login attempts, or privacy policy violations discovered.
- Get Feedback: As CosmicNet advises, consult with security professionals or peers facing similar threats. Fresh perspectives can identify blind spots.
- Are my identified assets still accurate and complete?
- Have any new adversaries emerged or existing ones changed capabilities?
- Are my risk assessments still valid given current circumstances?
- Are my countermeasures still effective and being used consistently?
- Have new tools or techniques become available that would improve my security?
- Have any of my accepted risks become unacceptable?
- Is my threat model documentation up to date and accessible?
External Resources
CosmicNet curates these authoritative sources that provide additional depth on threat modeling concepts and practices: