The CIA Triad & Threat Modeling
The foundation every security decision rests on: Confidentiality, Integrity, Availability — plus using the STRIDE framework to model threats against them.
1. Executive Summary & Objective
Every security decision in an enterprise revolves around protecting the CIA Triad. If a system is compromised, one or more of these three pillars has fallen. Threat modeling is how you decide which pillar to protect, where, and first.
Objective: Define Confidentiality, Integrity, and Availability with their threats and controls, and use the STRIDE framework to map threats to the properties they violate.
2. Core Concept & Theory (The “Why”)
Confidentiality — only authorized access
- Threats: data breaches, unauthorized access, Man-in-the-Middle (MitM).
- Controls: strong encryption (AES, TLS), MFA, strict access control lists.
Integrity — data not altered
- Threats: MitM modifying transactions, malware injecting code into binaries.
- Controls: cryptographic hashing (SHA-256), digital signatures, strict permissions.
Availability — accessible when needed
- Threats: DDoS, ransomware, datacenter power loss.
- Controls: redundancy/HA clusters, tested backups, DDoS mitigation.
3. Threat Modeling with STRIDE
You cannot secure a system until you know what you’re defending it from. STRIDE maps each threat class to the property it violates:
| STRIDE | Threat | Violates |
|---|---|---|
| Spoofing | pretending to be someone else | Authentication |
| Tampering | modifying data | Integrity |
| Repudiation | denying an action occurred | Non-repudiation / logging |
| Information disclosure | leaking data | Confidentiality |
| Denial of service | crashing/overloading | Availability |
| Elevation of privilege | gaining admin rights | Authorization |
An attacker alters the amount field of a bank transfer in transit. Which CIA pillar and which STRIDE category is this?
Integrity (the data was altered), and STRIDE category Tampering. The fix: integrity protection such as message signing / TLS with authentication.
4. Applying It
For any system, walk each asset through STRIDE and ask: which pillar does this threat break, and what control restores it? That single habit turns vague “make it secure” requests into a concrete, prioritized control list.
5. Security Principles That Guide Every Design
The CIA triad says what to protect. These long-standing design principles say how to build protection that holds up:
| Principle | Meaning | Example |
|---|---|---|
| Least privilege | Give every user, program and system only the access it needs, for as long as it needs it | A web server’s database account can read and write its own tables, but cannot drop them or read other databases |
| Defence in depth | Layer independent controls so one failure is not fatal | Firewall, patching, MFA, endpoint protection, monitoring and backups together |
| Separation of duties | Split critical tasks between people so no one can commit fraud or error alone | The person who requests a payment is not the person who approves it |
| Fail securely | When something breaks, fall back to a safe state | A door controller that loses power stays locked (or per safety rules, unlocks only for exits); an access check that errors denies |
| Complete mediation | Check authorisation on every access, not just the first | Re-check permissions on each request, not only at login |
| Economy of mechanism | Keep it simple: complexity hides flaws | Fewer services, fewer open ports, smaller code |
| Open design | Security should not depend on secrecy of the design (Kerckhoffs’s principle); only keys are secret | Use public, reviewed algorithms such as AES, never a home-made cipher |
| Secure by default | The safe option is the default setting | New accounts start with no privileges; features start disabled |
| Zero trust / assume breach | Never trust based on network location; verify explicitly and plan as if attackers are already inside | Authenticate and authorise every request, segment the network, monitor |
| Security by design | Think about security from the first design discussion, not as a final test | Threat-model before building |
Related ideas
- AAA: Authentication (who are you?), Authorisation (what may you do?), Accounting (what did you do?, logging). All three are needed.
- Non-repudiation: a person cannot credibly deny an action, supported by digital signatures and tamper-evident logs.
- The DAD triad: the attacker’s mirror image of CIA: Disclosure, Alteration, Denial. Every attack aims for one of these.
- Risk-based thinking: you cannot defend everything equally. Spend effort where likelihood and impact are highest (see the risk lesson).
6. Worked Example: Threat-Model a Small Online Shop
The system: customers use a browser to browse products, sign in and pay; a web application talks to a database; payments go to an external payment provider; staff use an admin page.
Step 1: Assets. Customer accounts and personal data, order history, payment tokens, product catalogue, the admin interface, the server itself, the company’s reputation.
Step 2: Draw the data flow and the trust boundaries. A trust boundary is where the level of trust changes, and attacks cross there.
[Customer browser] ==(internet)==> [Web app] --> [Database]
(untrusted) TRUST BOUNDARY (DMZ) --> [Payment provider API]
^
[Admin staff] ----+ (separate trust level)
Step 3: Apply STRIDE at each element and flow and write down plausible threats:
| Element | Threat (STRIDE) | Example | Possible control |
|---|---|---|---|
| Login | Spoofing | Credential stuffing with leaked passwords | MFA, rate limiting, breached-password checks |
| Order form | Tampering | Changing the price field in the request | Compute prices server-side; validate input |
| Admin actions | Repudiation | An admin deletes orders and denies it | Audit log of admin actions, protected from edit |
| Customer database | Information disclosure | SQL injection dumps all emails | Parameterised queries, least-privilege DB account, encryption |
| Web app | Denial of service | Flood of requests takes the shop offline during a sale | CDN, rate limiting, autoscaling |
| Admin page | Elevation of privilege | A customer account reaches /admin | Server-side access control checks, separate admin authentication |
Step 4: Prioritise by likelihood and impact, so that the first investments go to the highest risks (here: access control, injection, account takeover, backups).
Step 5: Decide and track. For each threat choose to mitigate, transfer, avoid or accept, assign an owner and a date, then re-do the model when the design changes.
Helpful techniques
- Attack trees break a goal (“steal customer data”) into the different ways it could be achieved, showing the cheapest path for an attacker.
- Abuse cases are the evil twin of use cases: “As an attacker, I want to …”.
- Scoring (for example DREAD: Damage, Reproducibility, Exploitability, Affected users, Discoverability) can rank threats, but is subjective. Simple High/Medium/Low often works as well.
- Ask four questions: What are we building? What can go wrong? What will we do about it? Did we do a good job?
Common threat modelling mistakes
- Doing it once, at the end, and never updating it.
- Listing only technical threats and forgetting people, process and suppliers.
- Modelling in isolation from the people who understand the system.
- Producing a long list with no priorities, owners or follow-up.
7. Key Takeaways
- CIA = Confidentiality, Integrity, Availability — every control maps to one or more.
- Match the threat to the pillar: breach→C, tampering→I, DoS/ransomware→A.
- STRIDE systematically maps threats to the security property they violate.
- Threat-model before buying controls, and balance the pillars against real risk.
Hands-on practice
Write the functions marked TODO. The checks read the variables your program leaves behind, so keep the lines at the bottom as they are, run it, then press Check my work.
🧪 Want to practise this on your own computer? See how to set up your lab →