Threat Modeling

Know Your Adversary, Protect What Matters — A CosmicNet Guide

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:

The Four Questions
  1. What are you protecting? (Assets)
  2. Who are you protecting it from? (Adversaries)
  3. How likely is it you'll need to protect it? (Risk)
  4. 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

Personal

Communications

Emails, messages, call records

Data

Location

Home, work, travel patterns

Physical

Financial

Bank accounts, transactions, assets

Financial

Relationships

Contacts, associates, networks

Social

Activities

Browsing history, interests, habits

Behavioral

Know 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?
Risk Matrix
              LOW IMPACT    HIGH IMPACT
LOW RISK    → Accept        → Monitor
HIGH RISK   → Mitigate      → Prioritize

Choose Countermeasures

CosmicNet recommends selecting appropriate defenses for each high-priority risk:

1

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.

2

Mitigate

CosmicNet recommends reducing likelihood or impact. Use encryption, Tor, VPNs, secure messaging. Compartmentalize identities.

3

Transfer

CosmicNet suggests shifting risk to others. Use services with strong privacy guarantees. Insurance for some risks.

4

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

Primary Adversary: Government agencies seeking source identity
Key Countermeasures: SecureDrop, Tor, encrypted communications, air-gapped devices

Privacy-Conscious Consumer

Primary Adversary: Corporations tracking for advertising
Key Countermeasures: Ad blockers, Firefox with privacy extensions, privacy-respecting alternatives

Activist in Authoritarian Region

Primary Adversary: State surveillance apparatus
Key Countermeasures: Tor with bridges, Tails OS, encrypted messaging, operational security

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:

S

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.

T

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.

R

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.

I

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.

D

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.

E

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.

Practical Application

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.

Observation

Active 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.

Interference

Local vs. Global Adversaries (CosmicNet Analysis)

Adversary Reach

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

Attack Tree Structure
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

Low Risk: Accept or implement minimal controls. Monitor periodically. Example: Uncommon browser fingerprinting techniques.
Medium Risk: Implement reasonable controls within budget. Schedule for mitigation in next planning cycle. Example: Weak passwords on low-value accounts.
High Risk: Prioritize mitigation. Allocate resources promptly. Example: Unencrypted storage of sensitive personal data.
Critical Risk: Immediate action required. Implement emergency countermeasures. Example: Active targeted surveillance by state actor against high-risk activist.

Practical Threat Model Examples

CosmicNet presents detailed threat models for different personas to illustrate how theory translates into practice.

1. Investigative Journalist (CosmicNet Scenario)

Scenario Profile

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)

Scenario Profile

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)

Scenario Profile

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.

1

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?
2

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
3

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)
4

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
5

Assess Risk

  • For each threat, estimate likelihood (rare to almost certain)
  • Evaluate potential impact (negligible to catastrophic)
  • Plot on risk matrix to visualize priorities
6

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
7

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
8

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.

Free

OWASP 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 Source

AttackTree+

Specialized tool for creating and analyzing attack trees. Allows quantitative analysis of attack paths including cost and probability calculations.

Specialized

IriusRisk

Commercial threat modeling platform with automated threat library. Integrates with development workflows and provides compliance mapping. More suitable for enterprises.

Commercial

General-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)

Regular Schedule: At minimum, review annually. For high-risk situations, quarterly reviews are recommended.
Role or Situation Changes: New job, relocation, change in activism activities, or increased public visibility all warrant immediate review.
New Threats Emerge: Major data breaches, new surveillance laws, or novel attack techniques discovered in your threat landscape.
Technology Changes: Adoption of new tools, services, or platforms that handle your sensitive data differently.
Security Incident: Any security breach or near-miss should trigger immediate threat model reassessment.

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.
Review Checklist
  • 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:

EFF Surveillance Self-Defense: Your Security Plan Comprehensive guide to creating a personal security plan with focus on digital privacy and protection against surveillance. Includes specific guidance for journalists, activists, and at-risk populations.
OWASP Threat Modeling Technical resource focused on application security threat modeling. Excellent for developers and those securing software systems. Covers STRIDE, attack trees, and practical methodologies.
NIST SP 800-30: Guide for Conducting Risk Assessments Authoritative U.S. government framework for risk assessment. Formal and comprehensive, suitable for organizational threat modeling and compliance requirements.
LINDDUN Privacy Threat Modeling Official resource for LINDDUN methodology, specifically designed for privacy threat modeling. Includes tutorials, case studies, and tool support.
Threat Modeling Manifesto Community-driven document outlining values and principles for effective threat modeling. Useful for understanding philosophy and best practices across different methodologies.
Related

Learn More