Module 2 โ€” Core Concepts

๐ŸŽฏ Learning Objectives

  • Define and distinguish: asset, threat, vulnerability, risk, and control
  • Explain the CIA Triad and why it anchors security thinking
  • Identify attack surfaces and trust boundaries in a system
  • Describe the attacker mindset and common attacker goals
  • Use risk as a function of likelihood ร— impact

1The Core Vocabulary

These five terms form the skeleton of every security conversation. Confuse them and communication breaks down. Get them right and everything else becomes clearer.

Security Vocabulary Relationship Map
๐Ÿ† Asset What we're protecting ๐Ÿ’ฅ Threat Potential harm event ๐Ÿ”“ Vulnerability A weakness to exploit ๐Ÿ“Š Risk Likelihood ร— Impact ๐Ÿ›ก๏ธ Control Mitigation measure exploits threatens creates mitigated by
How the five core security terms relate to each other
TermDefinitionExample (Banking App)
Asset Something valuable that needs protection โ€” data, functionality, or reputation Customer account balances, transaction history, PII
Threat A potential event that could harm an asset โ€” intentional or accidental An attacker stealing login credentials via phishing
Vulnerability A weakness in the system that a threat can exploit Password reset that only asks for username (no MFA)
Risk The likelihood a threat will exploit a vulnerability ร— the impact if it does High: phishing is common, account takeover impact is severe
Control A countermeasure that reduces risk (prevents, detects, or limits impact) MFA, anomalous login detection, rate limiting

2The CIA Triad

Every security property that matters maps to one of three goals. This triangle has guided security thinking for decades โ€” and it still holds up perfectly for threat modeling.

The CIA Triad
๐Ÿ”’ Confidentiality Data seen only by authorized parties โœ… Integrity Data is accurate and unmodified โšก Availability Systems work when users need them
The CIA Triad โ€” every security threat attacks one or more of these three properties
PropertyViolated ByThreat ExampleControl Example
Confidentiality Unauthorized disclosure SQL injection exposing user passwords Encryption, access controls, least privilege
Integrity Unauthorized modification Man-in-the-middle changing transaction amounts Digital signatures, checksums, input validation
Availability Denial of service DDoS flood crashing the login service Rate limiting, CDN, auto-scaling, backups
๐Ÿ’ก
Beyond CIA: The "AAA" Extensions
Some frameworks extend CIA with: Authentication (proving who you are), Authorization (what you're allowed to do), and Accountability/Non-repudiation (can't deny your actions). STRIDE's categories map to all of these โ€” which you'll see in Module 3.

3Attack Surface

The attack surface of a system is the sum of all points where an attacker can try to enter, extract data, or cause harm. The smaller the attack surface, the fewer places an attacker can probe.

Attack Surface of a Typical Web Application
Web Application ๐ŸŒ Web Interface Forms, params, files ๐Ÿ”Œ API Endpoints REST, GraphQL, gRPC ๐Ÿ” Auth Endpoints Login, token refresh ๐Ÿ“ฆ 3rd Party Libs Dependencies, SDKs ๐Ÿ“Ž File Upload Images, docs, CSV โš™๏ธ Admin Panel Management UI ๐Ÿ—„๏ธ Database
Every entry point into your system โ€” user inputs, APIs, file uploads, admin panels โ€” is part of the attack surface

Reducing the Attack Surface

  • Minimize exposure โ€” don't expose APIs or admin panels publicly if they don't need to be
  • Remove unused features โ€” disabled functionality can't be exploited
  • Apply least privilege โ€” services only get the permissions they actually need
  • Segment networks โ€” separate tiers so a breach in one doesn't reach all others

4Trust Boundaries

A trust boundary is a line where data or control flow crosses from one trust level to another. Every time you cross a trust boundary, you must validate, authenticate, and authorize. Missing this is where most vulnerabilities live.

โš ๏ธ
The Golden Rule of Trust Boundaries
Never trust data that crosses a boundary without validating it. User input, API responses from external services, data read from the filesystem โ€” all of it crosses a trust boundary and must be treated as potentially hostile.
Trust Boundary Example โ€” 3-Tier Web App
๐ŸŒ Untrusted โ€” Internet ๐Ÿ‘ค User TRUST BOUNDARY 1 โš ๏ธ DMZ / Web Tier ๐Ÿ–ฅ๏ธ Web Server Nginx / Load Balancer TLS termination HTTPS TRUST BOUNDARY 2 โœ… Trusted โ€” Internal Network โš™๏ธ App Server API / Business logic ๐Ÿ—„๏ธ Database PostgreSQL Validate all user input here Parameterize all DB queries here
Each dashed boundary is where validation and authentication must happen. Skip a boundary check and you've created a vulnerability.

5The Attacker Mindset

Threat modeling requires you to temporarily switch from a builder mindset to an attacker mindset. Builders ask: "Does this feature work?" Attackers ask: "How can I make this feature do something it wasn't supposed to?"

๐Ÿ’ฐ
Financial Gain
Steal money, credit cards, payment info. Ransomware. Most attacks are financially motivated.
๐Ÿ•ต๏ธ
Data Theft
PII, trade secrets, credentials. Sell on dark markets or use for targeted phishing.
๐Ÿ”Œ
Disruption
Competitors, hacktivists, nation-states. Take down services to cause reputation or operational damage.
๐ŸŽญ
Privilege Escalation
Gain access to higher-value systems by pivoting from a compromised lower-value one.
๐ŸŽ“
Classroom Exercise: "Evil User Stories"
Have students write evil user stories โ€” the attacker version of a user story. Example: instead of "As a user, I want to reset my password," write "As an attacker, I want to take over any account without knowing its password." This simple reframe unlocks threat identification faster than any framework.

6Understanding Risk

๐Ÿ“
The Risk Formula
Risk = Likelihood ร— Impact
This simple formula guides every prioritization decision. A highly likely threat with low impact may be less urgent than a rare threat with catastrophic impact. Neither dimension alone tells the full story.
Low Impact
Med Impact
High Impact
High Likelihood
โš ๏ธ Medium
๐Ÿ”ด High
๐Ÿšจ Critical
Med Likelihood
โœ… Low
โš ๏ธ Medium
๐Ÿ”ด High
Low Likelihood
โœ… Low
โœ… Low
โš ๏ธ Medium

The risk matrix guides prioritization โ€” fix ๐Ÿšจ Critical items immediately, schedule ๐Ÿ”ด High for the next sprint, track โš ๏ธ Medium on the backlog, accept or document โœ… Low risks.

7Knowledge Check

โœ๏ธ Exercise 2.1
Vulnerability vs Threat
A web app accepts unsanitized SQL queries in its search field. What correctly identifies the vulnerability vs the threat?
โœ๏ธ Exercise 2.2
Which CIA property is violated?
An attacker intercepts a payment API request and changes the transaction amount from $10 to $1 before it reaches the server. Which CIA property is primarily violated?

8Module Summary

โœ…
Key Takeaways
  • Asset โ†’ Threat โ†’ Vulnerability โ†’ Risk โ†’ Control is the chain that connects everything
  • CIA Triad: Confidentiality (secret), Integrity (accurate), Availability (accessible)
  • Attack surface: all points where an attacker can interact with your system โ€” minimize it
  • Trust boundaries: anywhere data crosses from untrusted to trusted โ€” always validate there
  • Risk = Likelihood ร— Impact โ€” use this to prioritize what to fix first
1 / 8