Security Fundamentals
The CIA Triad
Section titled “The CIA Triad”The CIA triad is the foundational model for information security. Every security control, Vulnerability, and threat maps to one or more of these three properties.
Confidentiality
Section titled “Confidentiality”Confidentiality ensures that data is accessible only to authorized parties. It is enforced through Encryption, access controls, and data classification.
Mechanisms that enforce confidentiality:
| Mechanism | Layer | Example |
|---|---|---|
| Encryption at rest | Storage | AES-256-GCM on disk, database TDE |
| Encryption in transit | Network | TLS 1.3, IPsec |
| Access control lists | Application | File permissions, RBAC policies |
| Data masking | Presentation | Redacting PII in logs |
| Classification | Organizational | Public, internal, confidential |
Confidentiality is not binary. A system that encrypts data at rest but logs the plaintext to an Unsecured file has failed confidentiality. A system that uses AES-256 but stores the key alongside The ciphertext has failed confidentiality. The entire data lifecycle must be considered.
Integrity
Section titled “Integrity”Integrity ensures that data has not been altered by unauthorized parties. It covers both malicious Tampering and accidental corruption.
| Mechanism | Purpose | Example |
|---|---|---|
| Cryptographic hashes | Detect modification | SHA-256 file checksums |
| Digital signatures | Prove authenticity and non-tampering | Signed firmware images |
| Version control | Track authorized changes | Git commits with signing |
| Write-once storage | Prevent post-write modification | WORM storage for audit logs |
| Referential integrity | Database-level consistency enforcement | Foreign key constraints |
Integrity failures are often subtler than confidentiality failures. A single bit flip in a Configuration file can change a firewall rule. A modified dependency in a supply chain attack can Introduce a backdoor without changing any visible behavior. Integrity verification must be Continuous, not one-time.
Availability
Section titled “Availability”Availability ensures that authorized users can access systems and data when needed. It is defended Against both malicious attacks (DDoS) and operational failures (hardware faults, misconfigurations).
| Threat Vector | Countermeasure | Standard |
|---|---|---|
| DDoS flooding | Rate limiting, anycast, scrubbing | RFC 4732 |
| Hardware failure | Redundancy, failover, RAID | N/A |
| Misconfiguration | Infrastructure as code, peer review | N/A |
| Ransomware | Backups, immutability, air-gapping | NIST SP 800-34 |
| Resource exhaustion | Quotas, auto-scaling, cgroups | N/A |
Availability is the most operationally visible of the three triad elements. When confidentiality or Integrity fails silently, you may not know for months. When availability fails, everyone notices Immediately.
STRIDE Threat Model
Section titled “STRIDE Threat Model”STRIDE is a threat classification framework developed by Microsoft (Shostack, 2014). It categorizes Threats against a system into six classes, each mapping to a specific security violation.
Threat Categories
Section titled “Threat Categories”| Threat | STRIDE Category | Security Impact | Example |
|---|---|---|---|
| Impersonating a user | Spoofing | Confidentiality | Stolen session token, forged certificate |
| Modifying data or code | Tampering | Integrity | SQL injection, firmware modification |
| Denying an action | Repudiation | Non-repudiation | Deleting audit logs, anonymous transactions |
| Exposing information | Information Disclosure | Confidentiality | Directory traversal, verbose errors |
| Denying service | Denial of Service | Availability | SYN flood, resource exhaustion |
| Gaining unauthorized access | Elevation of Privilege | All three | Kernel exploit, privilege escalation |
Applying STRIDE
Section titled “Applying STRIDE”STRIDE is applied through data flow diagrams (DFDs). For each component, element, and data flow In the diagram, you systematically ask: “Which STRIDE threats apply here?”
graph TD
U[User Browser] -->|HTTPS| LB[Load Balancer]
LB -->|HTTP| APP[Web Application]
APP -->|SQL| DB[(Database)]
APP -->|API Call| EXT[External API]
APP -->|Write| FS[File System]
style U fill:#f9f,stroke:#333
style LB fill:#bbf,stroke:#333
style APP fill:#bfb,stroke:#333
style DB fill:#fbb,stroke:#333
style EXT fill:#fdd,stroke:#333
style FS fill:#fdd,stroke:#333For the diagram above, a partial STRIDE analysis:
| Component | Spoofing | Tampering | Repudiation | Info Disclosure | DoS | EoP |
|---|---|---|---|---|---|---|
| User to LB | Yes | No | No | Yes | Yes | No |
| LB to APP | Yes | No | No | No | Yes | No |
| APP to DB | No | Yes | Yes | Yes | Yes | Yes |
| APP to EXT | Yes | Yes | No | Yes | Yes | No |
| APP to FS | No | Yes | No | Yes | Yes | Yes |
Threat Trees
Section titled “Threat Trees”A threat tree decomposes a threat into its prerequisite conditions, creating a boolean Expression that describes the attack. The root node is the attacker”s goal. Leaf nodes are the Specific conditions the attacker must achieve.
For example, a threat tree for “Attacker reads customer PII from database”:
Attacker reads PII├── Attacker gains SQL access│ ├── SQL injection in web app│ │ ├── Unsanitized user input reaches query│ │ └── No WAF or input validation│ └── Stolen database credentials│ ├── Credential in source code│ ├── Credential in CI/CD logs│ └── Phished DBA└── Attacker gains filesystem access ├── Server compromise └── Backup theftEach leaf represents a countermeasure opportunity. If you eliminate enough leaves that no complete Path from root to leaf remains, the threat is mitigated.
Attack Surface Analysis
Section titled “Attack Surface Analysis”The attack surface of a system is the set of all points where an untrusted actor can interact with It. Reducing the attack surface is one of the highest-leverage security activities.
Categories of Attack Surface
Section titled “Categories of Attack Surface”| Category | Examples | Reduction Strategy |
|---|---|---|
| Network | Open ports, APIs, services | Close unused ports, firewall rules |
| Software | Dependencies, libraries, frameworks | Dependency auditing, minimal installs |
| User | Employees, customers, third-party integrations | Principle of least privilege, training |
| Physical | Server room access, USB ports, printed docs | Access controls, endpoint protection |
| Configuration | Default credentials, verbose errors, debug | Hardening guides, config management |
Measuring Attack Surface
Section titled “Measuring Attack Surface”Attack surface can be quantified using Microsoft’s Relative Attack Surface Quotient (RASQ), Which assigns a cost to each attack vector (network port, service, RPC endpoint, etc.) and compares The total cost across configurations or versions.
For practical purposes, the key metric is: how many distinct paths exist from an untrusted input To a protected asset? Each path represents a potential vulnerability.
Attack Surface Reduction Checklist
Section titled “Attack Surface Reduction Checklist”- Remove unused software, services, and dependencies
- Disable default accounts and change default credentials
- Minimize network exposure (close ports, restrict IP ranges)
- Implement allowlists over denylists for input validation
- Remove debug endpoints, test APIs, and development tools from production
- Apply the principle of least functionality
Risk Assessment
Section titled “Risk Assessment”Risk assessment is the process of identifying, analyzing, and prioritizing risks. It is the bridge Between threat modeling and security investment.
Risk Quantification
Section titled “Risk Quantification”Risk is commonly expressed as:
\mathrm{Risk = \mathrm{Likelihood \times \mathrm{ImpactWhere likelihood and impact are each rated on a defined scale. A common 5-point scale:
| Rating | Likelihood Description | Impact Description |
|---|---|---|
| 1 | Rare (<1/year) | Negligible (<1,000 USD) |
| 2 | Unlikely (1-5/year) | Minor (1,000-10,000 USD) |
| 3 | Possible (5-15/year) | Moderate (10,000-100,000 USD) |
| 4 | Likely (15-50/year) | Major (100,000-1,000,000 USD) |
| 5 | Almost certain (>50/year) | Catastrophic (>1,000,000 USD) |
Risk Matrix
Section titled “Risk Matrix”| Likelihood / Impact | Negligible (1) | Minor (2) | Moderate (3) | Major (4) | Catastrophic (5) |
|---|---|---|---|---|---|
| Almost certain (5) | 5 | 10 | 15 | 20 | 25 |
| Likely (4) | 4 | 8 | 12 | 16 | 20 |
| Possible (3) | 3 | 6 | 9 | 12 | 16 |
| Unlikely (2) | 2 | 4 | 6 | 8 | 12 |
| Rare (1) | 1 | 2 | 3 | 4 | 8 |
Risks scoring 15 or above require immediate mitigation. Risks scoring 8-14 require a Mitigation plan with defined timelines. Risks below 8 may be accepted with documentation.
Quantitative Risk Analysis (FAIR)
Section titled “Quantitative Risk Analysis (FAIR)”The FAIR (Factor Analysis of Information Risk) model provides a more rigorous quantitative Framework. It decomposes risk into:
- Loss Event Frequency (LEF): How often a threat event occurs
- Loss Magnitude (LM): How much loss results from each event
LEF is further decomposed into Threat Event Frequency (how often the threat actor attempts the Attack) and Vulnerability (the probability that an attempt succeeds). Loss Magnitude includes Both Primary Loss (direct costs) and Secondary Loss (response, reputation, regulatory).
FAIR produces a probability distribution over loss amounts rather than a single point estimate, Enabling risk-informed decision-making.
Principle of Least Privilege
Section titled “Principle of Least Privilege”The principle of least privilege states that every subject (user, process, service account) should Operate with the minimum permissions necessary to perform its function, and for the minimum duration Necessary.
Why Least Privilege Matters
Section titled “Why Least Privilege Matters”Privilege escalation is involved in the majority of successful breaches. An attacker who gains Access to a low-privilege service account does not need a kernel exploit if that account already has Admin access to the database.
Implementation Across Layers
Section titled “Implementation Across Layers”| Layer | Least Privilege Mechanism | Example |
|---|---|---|
| OS | User accounts, capabilities, seccomp | Run web server as nobodyNot root |
| Container | Non-root user, read-only filesystem | Drop all capabilities, add only needed |
| Database | Separate accounts per service, GRANT | App can SELECT but not DROP |
| Cloud | IAM roles, service-linked roles | Lambda function with scoped S3 access |
| Network | Microsegmentation, network policies | Pod can only talk to its own backend |
| Application | RBAC, feature flags | User can edit but not delete |
Just-in-Time (JIT) Access
Section titled “Just-in-Time (JIT) Access”Static privilege assignment accumulates permissions over time. JIT access grants elevated privileges On demand, with automatic expiration. Systems like AWS IAM, HashiCorp Vault, and Teleport support JIT patterns.
Separation of Duties
Section titled “Separation of Duties”Related to least privilege is separation of duties: no single individual should control all aspects Of a critical operation. A developer who writes code should not be the sole approver for deploying It to production. A database administrator should not be the sole reviewer of audit logs.
Defense in Depth
Section titled “Defense in Depth”Defense in depth is the practice of layering multiple independent security controls so that no Single point of failure results in total compromise.
The Onion Model
Section titled “The Onion Model”graph TD
subgraph Layer7["Application Layer"]
A7[Input Validation]
A7B[Output Encoding]
A7C[Authentication]
end
subgraph Layer6["Service Layer"]
A6[API Gateway]
A6B[Rate Limiting]
A6C[CORS Policy]
end
subgraph Layer5["Platform Layer"]
A5[Container Isolation]
A5B[Runtime Security]
A5C[Secret Management]
end
subgraph Layer4["Network Layer"]
A4[Firewall]
A4B[Network Segmentation]
A4C[IDS/IPS]
end
subgraph Layer3["Host Layer"]
A3[OS Hardening]
A3B[File Permissions]
A3C[Audit Logging]
end
subgraph Layer2["Physical Layer"]
A2[Data Center Security]
A2B[Hardware Security Modules]
end
subgraph Layer1["Human Layer"]
A1[Security Training]
A1B[Access Reviews]
endKey Principles
Section titled “Key Principles”- Diversity: Use controls from different vendors and different technologies. Two firewalls from the same vendor with the same ruleset are one control, not two.
- Redundancy: If one control fails, another should still provide protection. This does not mean identical controls — it means complementary ones.
- Fail-safe defaults: When a control fails, it should fail to a more restrictive state, not a more permissive one.
- Depth over breadth: It is better to have 3 controls protecting a critical asset than 1 control protecting 3 assets.
Zero Trust Architecture
Section titled “Zero Trust Architecture”Zero trust is a security model that eliminates implicit trust based on network location. The Traditional perimeter model assumes that everything inside the network is trustworthy and everything Outside is not. Zero trust assumes that no network location, user, or device is inherently Trustworthy.
Core Principles (NIST SP 800-207)
Section titled “Core Principles (NIST SP 800-207)”- All data sources and computing services are considered resources: Whether on-premises or cloud.
- All communication is secured regardless of network location: TLS everywhere, no exceptions.
- Access to resources is granted on a per-session basis: Not per-connection, not per-login.
- Access is determined by dynamic policy: Based on identity, device posture, location, and data sensitivity.
- The enterprise monitors and measures the integrity and security posture: Continuous verification, not one-time authentication.
- All resource authentication and authorization are dynamic and strictly enforced: Before and during the session.
- The enterprise collects as much information as possible about the current state: Asset inventory, network traffic, user behavior.
Zero Trust vs VPN Model
Section titled “Zero Trust vs VPN Model”| Aspect | VPN Model | Zero Trust Model |
|---|---|---|
| Trust model | Trust the network | Trust nothing, verify everything |
| Access granularity | Network-level | Per-resource, per-session |
| Lateral movement | Easy (full network access) | Restricted (microsegmentation) |
| Authentication | At connection time | Continuous |
| Policy enforcement | At perimeter | At every resource |
| Deployment | VPN concentrator | Per-application proxies, SASE |
Implementation Components
Section titled “Implementation Components”- Identity provider (IdP): Centralized identity management with MFA (Okta, Azure AD, Keycloak)
- Policy engine: Evaluates access requests against policies (OPA, Cedar)
- Policy enforcement point (PEP): Enforces decisions at the resource (Envoy, service mesh proxies)
- Device trust: Evaluates device health certificates, OS version, patch level
- Continuous monitoring: Detects anomalous behavior and triggers re-evaluation
Security Boundaries and Trust Relationships
Section titled “Security Boundaries and Trust Relationships”A security boundary is a logical or physical perimeter within which a consistent set of security Policies is enforced. Crossing a security boundary requires authentication, authorization, and encryption.
Trust Boundaries
Section titled “Trust Boundaries”A trust boundary is where the authority controlling the security policy changes. Trust boundaries Exist:
- Between user and application (authentication)
- Between application tiers (service-to-service auth)
- Between organization and cloud provider (shared responsibility)
- Between application and third-party dependencies (supply chain)
- Between processes on the same host (process isolation)
graph LR
subgraph Untrusted["Untrusted Zone"]
U[User]
end
subgraph DMZ["DMZ / Edge"]
WAF[Web Application Firewall]
LB[Load Balancer]
end
subgraph AppZone["Application Zone"]
API[API Server]
AUTH[Auth Service]
end
subgraph DataZone["Data Zone"]
DB[(Database)]
CACHE[(Cache)]
end
U -->|TLS| WAF --> LB --> API --> AUTH
API --> DB
API --> CACHE
style Untrusted fill:#fdd,stroke:#333
style DMZ fill:#fbb,stroke:#333
style AppZone fill:#bfb,stroke:#333
style DataZone fill:#bbf,stroke:#333Cross-Boundary Security
Section titled “Cross-Boundary Security”Every time data crosses a trust boundary, you must consider:
- Authentication: Is the sender who they claim to be?
- Authorization: Is the sender allowed to perform this action?
- Integrity: Has the data been modified in transit?
- Confidentiality: Can unauthorized parties observe the data?
- Auditability: Is this access logged?
Shared Responsibility Model
Section titled “Shared Responsibility Model”In cloud environments, the security boundary between provider and customer is critical. AWS, Azure, And GCP each define shared responsibility models, but the general principle is:
| Responsibility | Provider | Customer |
|---|---|---|
| Physical security | Data center, hardware, networking | N/A |
| Platform security | Hypervisor, host OS, managed services | Guest OS, application, data |
| Identity | IAM service infrastructure | User management, access policies |
| Data protection | Encryption infrastructure | Encryption keys, data classification |
| Compliance | SOC 2, ISO 27001 certification | Customer-specific compliance |
OWASP Top 10 Overview
Section titled “OWASP Top 10 Overview”The OWASP Top 10 is a standard awareness document for web application security. The 2021 edition:
| # | Category | Description |
|---|---|---|
| A01 | Broken Access Control | Users acting outside intended permissions |
| A02 | Cryptographic Failures | Sensitive data exposure due to weak or missing crypto |
| A03 | Injection | SQL, NoSQL, OS command injection via untrusted input |
| A04 | Insecure Design | Missing or ineffective security controls by design |
| A05 | Security Misconfiguration | Default configs, open S3 buckets, verbose errors |
| A06 | Vulnerable and Outdated Components | Using libraries with known CVEs |
| A07 | Identification and Authentication Failures | Weak passwords, broken session management |
| A08 | Software and Data Integrity Failures | Insecure CI/CD, unsigned updates, auto-fill |
| A09 | Security Logging and Monitoring Failures | Insufficient logging, no alerting, missing audit trail |
| A10 | Server-Side Request Forgery (SSRF) | Server coerced into accessing unintended resources |
Each of these is covered in detail in subsequent sections. See Web Security for mitigation details.
CVE and CVSS
Section titled “CVE and CVSS”Common Vulnerabilities and Exposures (CVE)
Section titled “Common Vulnerabilities and Exposures (CVE)”CVE is a dictionary of publicly known cybersecurity vulnerabilities. Each CVE entry is assigned a Unique identifier (e.g., CVE-2024-12345) and describes the vulnerability in standardized terms.
CVE is maintained by MITRE Corporation under sponsorship of CISA. It is the industry-standard Identifier referenced by vulnerability scanners, package managers, and security advisories.
Common Vulnerability Scoring System (CVSS)
Section titled “Common Vulnerability Scoring System (CVSS)”CVSS provides a numerical score (0.0-10.0) representing the severity of a vulnerability. CVSS v3.1 Uses three metric groups:
| Metric Group | Components | Purpose |
|---|---|---|
| Base | Attack vector, complexity, privileges required, user interaction, scope, CIA impact | Intrinsic severity (immutable) |
| Temporal | Exploitability, remediation level, report confidence | Current state of the vulnerability |
| Environmental | Modified base metrics, CIA requirements, security requirements | Organizational impact |
Interpreting CVSS Scores
Section titled “Interpreting CVSS Scores”| Score Range | Severity | Action |
|---|---|---|
| 0.0 | None | Informational |
| 0.1-3.9 | Low | Track, address in normal maintenance cycle |
| 4.0-6.9 | Medium | Address within 30-90 days |
| 7.0-8.9 | High | Address within 7-30 days |
| 9.0-10.0 | Critical | Address immediately (within 24-72 hours) |
Reference Standards: NIST SP 800-53 (Security and Privacy Controls), NIST SP 800-207 (Zero Trust Architecture), ISO/IEC 27001 (Information Security Management), OWASP Testing Guide v4, MITRE ATT&CK Framework, CISA Known Exploited Vulnerabilities Catalog, ISO/IEC 27005 (Risk Management).
Summary
Section titled “Summary”This topic covers the essential concepts and techniques related to security fundamentals, including key principles and practical applications.
Key concepts include:
- core concepts and definitions
- key principles and frameworks
- practical applications
- common techniques and methods
- evaluation and critical analysis
A thorough understanding of these concepts, combined with regular practice and review, is essential for mastery of this topic.
Worked Examples
Section titled “Worked Examples”Worked examples demonstrating the application of key concepts are covered in the detailed sub-pages linked above.