← Tech Guides

Security Fundamentals

All the news that's fit to encrypt — A comprehensive guide to defending systems, data, and infrastructure

Section 01

Security at a Glance

A quick-reference desk for the acronyms, threats, and headlines every practitioner should know

Key Acronyms & Terminology

Fig. 1 — Essential Security Abbreviations

Acronym Full Name Definition
CIA Confidentiality, Integrity, Availability The three foundational pillars of information security
MFA Multi-Factor Authentication Requires two or more verification methods (knowledge, possession, inherence)
RBAC Role-Based Access Control Assigns permissions to roles, then assigns roles to users
SSO Single Sign-On One authentication event grants access to multiple systems
SIEM Security Information & Event Management Aggregates logs, correlates events, triggers alerts in real time
WAF Web Application Firewall Filters and monitors HTTP traffic between a web app and the internet
IDS/IPS Intrusion Detection / Prevention System Monitors (IDS) or blocks (IPS) malicious network traffic
OWASP Open Worldwide Application Security Project Community producing free security tools, standards, and the Top 10 list
CVE Common Vulnerabilities and Exposures Standardized IDs for publicly known security flaws (e.g., CVE-2024-3094)
CVSS Common Vulnerability Scoring System 0–10 severity rating: Low (0.1–3.9), Medium (4.0–6.9), High (7.0–8.9), Critical (9.0–10.0)
ZTA Zero Trust Architecture Never trust, always verify—every request is authenticated and authorized
PKI Public Key Infrastructure Framework for managing digital certificates and public-key encryption
HSM Hardware Security Module Dedicated crypto processor for safeguarding and managing digital keys
SBOM Software Bill of Materials Inventory of all components, libraries, and dependencies in a software product
SAST/DAST Static / Dynamic Application Security Testing SAST scans source code; DAST tests running applications for vulnerabilities

Common Threat Landscape

The most prevalent attack vectors targeting organizations today. Understanding these threats is the first step in building effective defenses.

Phishing

Social engineering via fraudulent emails or messages to steal credentials or deliver malware

Ransomware

Malware that encrypts victim data and demands payment for the decryption key

SQL Injection

Inserting malicious SQL into input fields to manipulate or exfiltrate database contents

Cross-Site Scripting (XSS)

Injecting client-side scripts into web pages viewed by other users to hijack sessions

Cross-Site Request Forgery

Tricking authenticated users into submitting unintended requests to a trusted site

Man-in-the-Middle (MitM)

Intercepting communications between two parties to eavesdrop or alter data in transit

DDoS Attack

Overwhelming a target with traffic from distributed sources to deny service to legitimate users

Supply Chain Attack

Compromising a trusted vendor, dependency, or build pipeline to reach downstream targets

Insider Threat

Malicious or negligent actions by employees, contractors, or partners with legitimate access

Zero-Day Exploit

Attacks targeting previously unknown vulnerabilities before a patch is available

Breaking News

The OWASP Top 10 2025 adds Software Supply Chain Failures at #3 and Mishandling of Exceptional Conditions at #10. Supply chain attacks—including compromised dependencies, build pipelines, and CI/CD systems—have risen sharply since the XZ Utils backdoor (CVE-2024-3094) and the sustained campaigns against npm and PyPI registries.

CVSS Severity Ratings at a Glance

The Common Vulnerability Scoring System assigns a 0–10 score to every CVE. Use these thresholds to prioritize remediation:

Score Range Rating SLA Guidance Example
9.0 – 10.0 Critical Patch within 24–48 hours Remote code execution, no auth required
7.0 – 8.9 High Patch within 7 days Privilege escalation, authenticated RCE
4.0 – 6.9 Medium Patch within 30 days Information disclosure, stored XSS
0.1 – 3.9 Low Patch within 90 days Denial of service requiring local access
Section 02

The CIA Triad & Core Principles

The foundational model underpinning every security decision, from firewall rules to access policies

The Three Pillars

Every security control, policy, and architectural decision maps back to one or more of these three properties. Compromise any one, and the system fails. A well-designed security posture balances all three—and recognizes the tension between them.

Confidentiality

Ensuring that information is accessible only to those authorized to view it. Protects against unauthorized disclosure.

Controls: Encryption (AES-256, TLS 1.3), access control lists, data classification, DLP tools, need-to-know policies

Breach example: An unencrypted S3 bucket exposes 100M customer records to the public internet

Integrity

Guaranteeing that data has not been altered, tampered with, or corrupted—whether in transit or at rest.

Controls: Cryptographic hashes (SHA-256), digital signatures, checksums, version control, audit logs, WORM storage

Breach example: A supply chain attack modifies a build artifact, injecting a backdoor that ships to 18,000 organizations

Availability

Ensuring that systems and data are accessible to authorized users when needed. The foundation of uptime SLAs.

Controls: Redundancy, failover clusters, DDoS mitigation, backups (3-2-1 rule), disaster recovery, load balancing

Breach example: A ransomware attack encrypts hospital systems, forcing diversion of emergency patients for 3 weeks

Defense in Depth

No single security control is foolproof. Defense in depth layers multiple, independent controls so that if one fails, others still protect the asset. Think of it as a medieval castle: the moat, the outer wall, the inner wall, the keep, and the armored guards each serve a different purpose.

Layer What It Protects Example Controls
Physical Data centers, hardware, devices Badge access, biometric locks, CCTV, secure disposal
Perimeter Network boundary Firewalls, DMZ, IDS/IPS, DDoS protection
Network Internal traffic Network segmentation, VLANs, micro-segmentation, mTLS
Host Individual servers and endpoints OS hardening, EDR, patch management, host-based firewalls
Application Software and APIs Input validation, WAF, SAST/DAST, secure SDLC
Data Information at rest and in transit Encryption, tokenization, DLP, backup & recovery
Human Users, operators, developers Security training, phishing simulations, background checks, least privilege
Editor's Note

Defense in depth is not about buying seven different firewalls. It is about combining diverse control types—preventive, detective, and corrective—across multiple layers so that an attacker must defeat several independent mechanisms.

Principle of Least Privilege

Every user, process, and service should operate with the minimum set of permissions required to perform its function—and nothing more. Overly broad permissions are the #1 misconfiguration in cloud environments and the most common vector for lateral movement after initial compromise.

Key practices:

  • Default-deny: start with zero permissions and add only what is needed
  • Time-bound access: use just-in-time (JIT) elevation instead of standing privileges
  • Separate accounts: distinct credentials for admin vs. daily-driver work
  • Regular access reviews: audit who has access to what, quarterly at minimum
  • Service accounts: scope to specific resources, never use *:* wildcards
IAM Policy — Least Privilege Example
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowS3ReadSpecificBucket",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::reports-2026",
        "arn:aws:s3:::reports-2026/*"
      ],
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "10.0.0.0/16"
        }
      }
    }
  ]
}

This policy grants only read access, to one specific bucket, from one specific network range. Compare this with the dangerous "Action": "s3:*", "Resource": "*" anti-pattern.

Common Violation

The AWS AdministratorAccess managed policy grants full access to every AWS service. Over 40% of cloud security incidents in 2025 involved overprivileged IAM roles. Use AWS IAM Access Analyzer and CloudTrail to identify and right-size permissions.

Zero Trust Architecture

Zero Trust is not a product you can buy. It is an architecture and a philosophy: never trust, always verify. Traditional perimeter-based security assumed that everything inside the corporate network was trustworthy. ZTA assumes breach and requires continuous verification of every user, device, and network flow—regardless of location.

The perimeter is dead. Identity is the new perimeter.

— NIST SP 800-207, Zero Trust Architecture

Core tenets of Zero Trust (per NIST SP 800-207):

# Tenet In Practice
1 All data sources and computing services are resources Protect SaaS apps, APIs, IoT devices, and cloud workloads—not just servers
2 All communication is secured regardless of network location Encrypt east-west traffic with mTLS; treat internal networks as hostile
3 Access is granted on a per-session basis Re-authenticate and re-authorize for every request; no standing access
4 Access is determined by dynamic policy Combine identity, device posture, location, behavior, and risk signals
5 Continuous monitoring and assessment Assume breach; log everything; use SIEM and UEBA for anomaly detection
6 Authentication and authorization are strictly enforced before access Policy Decision Point (PDP) + Policy Enforcement Point (PEP) architecture
7 Collect information to improve security posture Feed telemetry into risk engines; continuously refine access policies
Traditional (Perimeter)
  • Trust the internal network
  • VPN = trusted user
  • Flat internal network
  • Annual access reviews
  • Castle-and-moat model
Zero Trust
  • Verify every request, every time
  • Identity + device posture + context
  • Micro-segmented network
  • Continuous, real-time evaluation
  • Assume breach model
Implementation Note

Zero Trust is a journey, not a destination. Start with identity (strong MFA, conditional access), then move to device trust (EDR, compliance checks), then to micro-segmentation and workload identity. Reference architectures: NIST SP 800-207, CISA Zero Trust Maturity Model, Google BeyondCorp.

Section 03

Authentication & Identity

Proving you are who you claim to be—and the protocols, algorithms, and pitfalls that make or break that proof

Password Security: Hashing Algorithms

Passwords must never be stored in plaintext. They must be hashed with a purpose-built, slow, memory-hard algorithm. Fast hashes like MD5 and SHA-1 can be brute-forced at billions of guesses per second on modern GPUs. The goal is to make each guess computationally expensive.

Fig. 2 — Hashing Algorithm Comparison

Algorithm Status Speed Memory-Hard Notes
MD5 Broken ~25B/sec GPU No Collision attacks since 2004. Never use for any security purpose.
SHA-1 Broken ~10B/sec GPU No Google/CWI demonstrated practical collision (SHAttered, 2017). Deprecated everywhere.
bcrypt Recommended ~30K/sec GPU No (4KB) Well-tested, widely supported. Use cost factor 12+. Max input 72 bytes.
scrypt Recommended Tunable Yes Memory-hard: resists GPU/ASIC attacks. Used by some cryptocurrency systems.
Argon2id Best Choice Tunable Yes Password Hashing Competition winner (2015). Hybrid: resists both GPU and side-channel attacks. Use as default.
Argon2id — Recommended Parameters
# OWASP recommended minimum parameters (2025):
# - Memory: 19 MiB (19456 KiB)
# - Iterations: 2
# - Parallelism: 1

# Python (using argon2-cffi)
from argon2 import PasswordHasher
ph = PasswordHasher(
    time_cost=2,        # iterations
    memory_cost=19456,  # 19 MiB in KiB
    parallelism=1,
    hash_len=32,
    salt_len=16
)

hash = ph.hash("user_password")
# $argon2id$v=19$m=19456,t=2,p=1$...

# Verify:
ph.verify(hash, "user_password")  # returns True
ph.verify(hash, "wrong_password") # raises VerifyMismatchError

Multi-Factor Authentication (MFA)

MFA requires two or more independent factors from different categories: something you know (password), something you have (device, key), or something you are (biometric). Enabling MFA blocks over 99% of account compromise attacks.

MFA Type Factor Phish-Resistant Details
TOTP Possession Partial Time-based one-time passwords (RFC 6238). Apps: Google Authenticator, Authy, 1Password. 6-digit code rotates every 30 seconds. Vulnerable to real-time phishing proxies (e.g., Evilginx).
WebAuthn / FIDO2 Possession + Inherence Yes Hardware keys (YubiKey) or platform authenticators (passkeys). Public-key crypto; origin-bound so phishing is structurally impossible. The gold standard for MFA.
Push Notification Possession Partial Approve/deny prompt on a registered device (Duo, Microsoft Authenticator). Vulnerable to MFA fatigue/prompt bombing—mitigate with number matching.
SMS OTP Possession No One-time code sent via text message. Vulnerable to SIM swapping, SS7 interception, and social engineering of carrier support. NIST SP 800-63B classifies as "restricted".
Security Advisory

SMS-based 2FA is vulnerable to SIM swapping. Attackers port your phone number to their SIM card by social-engineering your carrier. In 2024–2025, SIM-swap attacks cost victims over $400M. Use TOTP or WebAuthn/passkeys instead. If you must use SMS, enable a carrier PIN and consider a Google Voice number as a secondary fallback.

OAuth 2.0 Flows

OAuth 2.0 is a delegation protocol: it lets a user grant a third-party application scoped access to their resources without sharing their password. It does not handle authentication (that is OpenID Connect's job). Two flows dominate modern usage:

Authorization Code + PKCE

Recommended The standard flow for web and mobile apps with a user present. PKCE (Proof Key for Code Exchange, RFC 7636) prevents authorization code interception.

  • Client generates random code_verifier and its SHA-256 hash (code_challenge)
  • User is redirected to authorization server with the challenge
  • After consent, server returns an authorization code
  • Client exchanges code + original verifier for tokens
  • Server verifies SHA-256(verifier) matches the challenge

Client Credentials

Machine-to-Machine For server-to-server communication with no user involved. The client authenticates directly with its own credentials.

  • Client sends client_id + client_secret to token endpoint
  • Server validates credentials and returns an access token
  • No user interaction, no refresh tokens needed
  • Use for microservice-to-microservice calls, cron jobs, CI/CD
  • Rotate client secrets regularly; prefer mTLS client auth
Fig. 3 — Authorization Code + PKCE Flow
User Client App Auth Server Resource Server | | | | | 1. Click | | | | "Login" ----->| | | | | | | | | 2. Generate | | | | code_verifier | | | | + code_challenge | | | | | | | 3. Redirect to /authorize | | | (w/ code_challenge, scope, state) | | |<---------------|------------------>| | | | | | | 4. User authenticates + consents | | |--------------->| | | | | | | | 5. Redirect back w/ auth code | | |<-----------------------------------| | |--------------->| | | | | | | | | 6. POST /token | | | | (code + verifier) | | | |------------------>| | | | | | | | 7. Access Token | | | | + Refresh Token | | | |<------------------| | | | | | | | 8. GET /api/data | | | | (Bearer token) | | | |-------------------------------------->| | | | | | | 9. Protected | | | | resource data | | | |<--------------------------------------| | | | |

OpenID Connect vs. SAML 2.0

Both protocols solve federated authentication (SSO), but they differ significantly in age, format, and use case. OpenID Connect (OIDC) is the modern choice for most greenfield applications; SAML remains dominant in enterprise environments.

Fig. 4 — OIDC vs. SAML Comparison

Dimension OpenID Connect (OIDC) SAML 2.0
Built On OAuth 2.0 (JSON, REST) XML, SOAP
Token Format JWT (JSON Web Token) XML Assertion
Year 2014 2005
Payload Size Compact (~1KB) Verbose (~5–20KB)
Best For Web apps, SPAs, mobile, APIs Enterprise SSO, legacy systems
Discovery .well-known/openid-configuration Federation metadata XML
Mobile Support Excellent (lightweight, REST) Poor (XML parsing, redirects)
Provider Examples Google, Auth0, Okta, Entra ID Okta, ADFS, Shibboleth, PingFederate
Recommendation Prefer for new apps Support for enterprise

JWT Structure & Security Pitfalls

JSON Web Tokens (RFC 7519) are the standard bearer token format in OAuth 2.0 and OIDC. A JWT is three Base64URL-encoded segments separated by dots: header.payload.signature.

JWT Structure — Decoded
# HEADER (algorithm + type)
{
  "alg": "RS256",
  "typ": "JWT",
  "kid": "2026-02-key-1"
}

# PAYLOAD (claims)
{
  "iss": "https://auth.example.com",
  "sub": "user-8a3f-4b12",
  "aud": "https://api.example.com",
  "exp": 1739404800,
  "iat": 1739401200,
  "scope": "read:reports write:comments",
  "email": "alice@example.com",
  "roles": ["analyst", "viewer"]
}

# SIGNATURE
RSASHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  privateKey
)

Critical security pitfalls:

Vulnerability Severity Description & Mitigation
Algorithm Confusion Critical Attacker changes "alg": "RS256" to "HS256" and signs with the public key (which the server uses to verify RS256). The server treats the public key as the HMAC secret. Fix: Always validate the alg header against an explicit allowlist—never let the token dictate the algorithm.
None Algorithm Critical Setting "alg": "none" tells vulnerable libraries to skip signature verification entirely. Fix: Reject "none" algorithm. Use libraries that enforce signature verification by default (e.g., jose, python-jose).
Missing Claim Validation High Failing to check exp (expiration), iss (issuer), aud (audience) lets attackers use expired tokens or tokens from different services. Fix: Validate ALL standard claims on every request.
Secret in Client High Embedding HMAC secrets in frontend JavaScript or mobile apps. Anyone can extract and forge tokens. Fix: Use asymmetric algorithms (RS256, ES256) for public clients.
Long-Lived Tokens Medium JWTs with no expiration or excessively long TTLs (>1 hour). JWTs cannot be revoked without a denylist. Fix: Short-lived access tokens (5–15 min) + refresh tokens stored securely server-side.
Sensitive Data in Payload Medium JWTs are Base64URL-encoded, not encrypted. Anyone can decode the payload. Fix: Never include passwords, SSNs, or secrets in claims. Use JWE (encrypted JWT) if confidentiality is required.
JWT Validation — Secure Example (Node.js)
import jwt from 'jsonwebtoken';
import jwksClient from 'jwks-rsa';

const client = jwksClient({
  jwksUri: 'https://auth.example.com/.well-known/jwks.json',
  cache: true,
  rateLimit: true,
});

function getKey(header, callback) {
  client.getSigningKey(header.kid, (err, key) => {
    callback(err, key?.getPublicKey());
  });
}

// SECURE: explicit algorithm, full claim validation
jwt.verify(token, getKey, {
  algorithms: ['RS256'],       // NEVER allow 'none' or 'HS256' here
  issuer: 'https://auth.example.com',
  audience: 'https://api.example.com',
  clockTolerance: 30,          // 30s leeway for clock skew
  maxAge: '15m',               // reject tokens older than 15 minutes
}, (err, decoded) => {
  if (err) throw new AuthenticationError(err.message);
  // decoded.sub, decoded.roles, decoded.scope now trusted
});

Session Management Best Practices

Even with JWTs for API authentication, most web applications still use server-side sessions for state management. The session cookie is the key to the kingdom—protect it accordingly.

Cookie Attribute Required Purpose
HttpOnly Always Prevents JavaScript from reading the cookie. Blocks XSS-based session theft. There is no legitimate reason to omit this on session cookies.
Secure Always Cookie is only sent over HTTPS. Prevents transmission over unencrypted connections where it could be intercepted.
SameSite=Lax Recommended Cookie is sent with same-site requests and top-level navigations. Blocks most CSRF attacks. Use Strict for highest security; use Lax as the default balance.
__Host- prefix Best Practice Cookies prefixed with __Host- must be set with Secure, have no Domain, and use Path=/. Prevents subdomain cookie hijacking.
Max-Age Configure Set appropriate expiration. Idle timeout: 15–30 min for sensitive apps. Absolute timeout: 8–12 hours. Force re-authentication for critical actions.
Secure Session Cookie — Express.js
app.use(session({
  name: '__Host-sid',         // __Host- prefix enforces Secure + no Domain
  secret: process.env.SESSION_SECRET,
  resave: false,
  saveUninitialized: false,
  cookie: {
    httpOnly: true,           // No JS access
    secure: true,             // HTTPS only
    sameSite: 'lax',          // CSRF protection
    maxAge: 30 * 60 * 1000,   // 30 minutes
    path: '/',                // Required for __Host- prefix
  },
  store: new RedisStore({     // Server-side storage (not in-memory)
    client: redisClient,
    prefix: 'sess:',
    ttl: 1800,                // 30 min TTL in Redis
  }),
}));

Additional session hardening:

  • Regenerate session ID after login, privilege escalation, or any sensitive state change to prevent session fixation attacks
  • Bind sessions to IP/user-agent as a secondary signal (not a primary control, since legitimate users change networks)
  • Implement server-side logout that destroys the session in the backing store, not just clears the cookie
  • Track active sessions per user and allow users to view and revoke them ("Active Sessions" in account settings)
  • Rate-limit session creation to prevent session flooding attacks against your backing store
Passkeys — The Future of Authentication

WebAuthn passkeys (FIDO2) are rapidly replacing passwords entirely. Major platforms—Apple, Google, Microsoft—now support synced passkeys across devices. Passkeys are phishing-resistant by design (origin-bound), eliminate password reuse, and remove the need for server-side password storage. In 2025–2026, adoption has crossed 30% of consumer accounts at major providers. For new applications, consider a passkey-first authentication strategy.

Section 04

Cryptography Essentials

The mathematics of secrecy—symmetric ciphers, asymmetric key pairs, hashing, TLS handshakes, and the infrastructure of trust

Symmetric vs. Asymmetric Encryption

Cryptography divides into two fundamental paradigms. Symmetric encryption uses a single shared secret for both encryption and decryption—fast, efficient, and ideal for bulk data. Asymmetric encryption uses a mathematically linked key pair: a public key anyone can hold and a private key only the owner possesses. Most real-world systems combine both: asymmetric crypto to exchange a symmetric key, then symmetric crypto for the actual data.

Symmetric — One Shared Key

Both parties share the same secret key. The key must be exchanged securely out-of-band or via asymmetric key agreement.

  • AES-256-GCMRecommended Authenticated encryption with associated data (AEAD). 256-bit key, built-in integrity check via GCM tag.
  • ChaCha20-Poly1305Recommended Designed by Daniel Bernstein. Faster than AES on devices without hardware AES instructions (mobile, IoT). Used in WireGuard and TLS 1.3.
  • AES-128-GCMAcceptable Still considered secure but 256-bit preferred for defense-in-depth and post-quantum margin.
Asymmetric — Public/Private Key Pair

Encrypt with the public key; only the private key can decrypt. Sign with the private key; anyone with the public key can verify.

  • Ed25519Best Choice Edwards-curve digital signatures. Fast, small keys (32 bytes), deterministic—no nonce pitfalls. Use for SSH keys, code signing, and modern protocols.
  • ECDSA P-256Recommended Elliptic Curve DSA on the NIST P-256 curve. Widely used in TLS certificates and blockchain. Requires good randomness for nonce generation.
  • RSA-4096Recommended Classic public-key algorithm. Larger keys and slower than ECC, but well-understood and broadly supported.
  • RSA-2048Minimum Still secure today but approaching end-of-life. NIST recommends transitioning away by 2030.

Algorithm Reference Table

Fig. 5 — Cryptographic Algorithm Status and Recommendations

Algorithm Type Key Size Use Case Status
AES-256-GCM Symmetric 256-bit Data encryption at rest & in transit ✓ Recommended
ChaCha20 Symmetric 256-bit Mobile/IoT, WireGuard, TLS 1.3 ✓ Recommended
RSA-2048 Asymmetric 2048-bit Legacy signatures, older TLS certs ⚠ Minimum
RSA-4096 Asymmetric 4096-bit Digital signatures, GPG keys ✓ Recommended
Ed25519 Asymmetric 256-bit Modern signatures, SSH, code signing ✓✓ Best
ECDSA P-256 Asymmetric 256-bit TLS certificates, blockchain ✓ Recommended
3DES Symmetric 168-bit Legacy payment systems ✗ Deprecated
MD5 Hash 128-bit (none—do not use) ✗ Broken
SHA-1 Hash 160-bit (none—do not use) ✗ Deprecated
SHA-256 Hash 256-bit Integrity checks, certificates, HMAC ✓ Recommended
SHA-3 Hash Variable Future-proof applications, diversity ✓ Recommended

Hashing: SHA-256 vs. SHA-3

Cryptographic hash functions produce a fixed-size digest from arbitrary input. They are one-way (irreversible), collision-resistant, and avalanche-sensitive (a single-bit change in input produces a completely different output). Two families dominate modern use:

SHA-256 (SHA-2 Family)
  • Construction: Merkle-Damgård with Davies-Meyer compression
  • Output: 256-bit (32 bytes)
  • Standardized: NIST FIPS 180-4 (2001, updated 2015)
  • Speed: ~500 MB/s in software, faster with SHA-NI instructions
  • Used in: TLS certificates, Bitcoin, Git commit hashes, code signing, HMAC
  • Risk: Merkle-Damgård is vulnerable to length-extension attacks (use HMAC-SHA256, not raw SHA-256 for MACs)
SHA-3 (Keccak Family)
  • Construction: Keccak sponge function—fundamentally different from SHA-2
  • Output: 224, 256, 384, or 512-bit (plus SHAKE XOF variants)
  • Standardized: NIST FIPS 202 (2015)
  • Speed: Comparable to SHA-256 in hardware; slower in software on x86
  • Used in: Ethereum (Keccak-256), post-quantum schemes, diversity hedging
  • Advantage: Immune to length-extension attacks by design; provides algorithmic diversity if SHA-2 is ever weakened
Practical Guidance

SHA-256 remains the workhorse and is not broken or weakened. Use it by default. Adopt SHA-3 when you need length-extension resistance without HMAC wrapping, algorithmic diversity in defense-in-depth, or compliance with specifications that mandate it. Do not use raw SHA-256 as a MAC—use HMAC-SHA256 instead.

TLS 1.3 Handshake

Transport Layer Security 1.3 (RFC 8446, 2018) represents a major overhaul of the TLS protocol. It removes insecure legacy algorithms, reduces handshake latency from 2-RTT to 1-RTT, and encrypts more of the handshake itself. TLS 1.3 is now the minimum acceptable version for production systems.

Fig. 6 — TLS 1.3 Full Handshake (1-RTT)
Client Server | | | 1. ClientHello | | + supported_versions (1.3) | | + key_share (ECDHE public key) | | + signature_algorithms | | + cipher_suites | |--------------------------------------------------->| | | | 2. ServerHello | | + selected cipher suite | | + key_share (ECDHE public key) | |<---------------------------------------------------| | | | {EncryptedExtensions} | | {Certificate} | | {CertificateVerify} | | {Finished} | |<---------------------------------------------------| | | | [All traffic now encrypted] | | | | {Finished} | |--------------------------------------------------->| | | | Application Data <=========================> | | |

Key improvements over TLS 1.2:

  • 1-RTT handshake (TLS 1.2 required 2-RTT) — reduces connection latency by ~50%
  • 0-RTT resumption available (with replay risk caveats)
  • Forward secrecy mandatory — ephemeral ECDHE for every session
  • Removed insecure algorithms: RSA key exchange, CBC mode, RC4, SHA-1, 3DES, static DH
  • Encrypted handshake — certificate is encrypted, hiding server identity from passive observers
  • Only 5 cipher suites: TLS_AES_256_GCM_SHA384, TLS_AES_128_GCM_SHA256, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_CCM_SHA256, TLS_AES_128_CCM_8_SHA256

TLS version status:

Version Status
SSL 2.0 / 3.0 Prohibited
TLS 1.0 Deprecated
TLS 1.1 Deprecated
TLS 1.2 Legacy OK
TLS 1.3 Required

X.509 Certificates & Certificate Chains

TLS relies on X.509 certificates to prove server (and optionally client) identity. Certificates form a chain of trust from the server certificate up to a trusted root Certificate Authority (CA) pre-installed in browsers and operating systems.

Fig. 7 — Certificate Chain of Trust
Root CA Certificate (self-signed, pre-trusted) | +-- Intermediate CA Certificate (signed by Root CA) | +-- Server Certificate (leaf) (signed by Intermediate CA) | Subject: api.example.com Issuer: Let's Encrypt R3 Valid: 2026-01-15 to 2026-03-01 (45 days) Key: EC P-256 public key SAN: api.example.com, *.example.com

Browsers verify the chain by checking each certificate's signature against its issuer's public key, walking up to a trusted root. If any link is invalid, expired, or revoked, the chain fails and the connection is rejected.

Certificate validation checks:

  • Signature chain integrity (each cert signed by its issuer)
  • Validity period (not expired, not yet valid)
  • Subject/SAN matches the requested hostname
  • Revocation status via OCSP or CRL
  • Key usage constraints (e.g., digitalSignature)
  • Certificate Transparency (CT) log inclusion

Let's Encrypt & ACME automation:

  • Free, automated, open Certificate Authority
  • ACME protocol (RFC 8555) for automated issuance and renewal
  • Certbot, acme.sh, Caddy (built-in) as ACME clients
  • 2026 change: Let's Encrypt moves to 45-day certificate lifetimes (from 90 days), pushing full automation
  • Short-lived certs reduce exposure window if a private key is compromised
  • Certificate Transparency logs make misissued certs publicly auditable

Key Management Best Practices

The most secure algorithm in the world is worthless if the keys are mismanaged. Key management is widely considered the hardest problem in applied cryptography—and the most common source of real-world failures.

Practice Implementation Details
Key Rotation Automated, periodic Rotate encryption keys every 90 days (or per compliance). TLS certs: 45–90 days. API keys: 90 days. SSH keys: annually. Automate rotation to eliminate human error.
KMS / HSM Cloud KMS or hardware HSM Never store master keys in application code or config files. Use AWS KMS, GCP Cloud KMS, Azure Key Vault, or on-prem HSMs (FIPS 140-2 Level 3+). Keys never leave the secure boundary.
Envelope Encryption DEK + KEK pattern Encrypt data with a Data Encryption Key (DEK), then encrypt the DEK with a Key Encryption Key (KEK) stored in KMS. This lets you rotate KEKs without re-encrypting all data.
Separation of Duties Split key access No single person should have access to both the encrypted data and the decryption key. Use m-of-n key sharing (Shamir's Secret Sharing) for root keys.
Secure Destruction Cryptographic erasure When decommissioning, destroy the key to render encrypted data permanently inaccessible. More reliable than attempting to wipe all copies of the ciphertext.

OpenSSL Quick Reference

Essential OpenSSL commands for generating keys, creating certificate signing requests, and inspecting certificates.

OpenSSL — Key Generation & Certificate Operations
# Generate an Ed25519 private key (modern, recommended)
openssl genpkey -algorithm Ed25519 -out private.pem

# Generate an EC P-256 private key
openssl ecparam -genkey -name prime256v1 -noout -out ec-private.pem

# Generate an RSA-4096 private key
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -out rsa-private.pem

# Extract public key from private key
openssl pkey -in private.pem -pubout -out public.pem

# Create a Certificate Signing Request (CSR)
openssl req -new -key private.pem -out request.csr \
  -subj "/CN=api.example.com/O=Example Corp/C=US"

# Self-signed certificate (for development only)
openssl req -x509 -key private.pem -out cert.pem -days 365 \
  -subj "/CN=localhost"

# View certificate details
openssl x509 -in cert.pem -text -noout

# Verify a certificate chain
openssl verify -CAfile ca-bundle.pem -untrusted intermediate.pem server.pem

# Check a remote server's TLS certificate
openssl s_client -connect example.com:443 -servername example.com

# Generate a random 256-bit key (hex encoded)
openssl rand -hex 32

# Compute SHA-256 digest of a file
openssl dgst -sha256 file.bin
Common Cryptographic Mistakes

Nonce/IV reuse: Reusing a nonce with AES-GCM completely destroys confidentiality and authenticity. Use random 96-bit nonces and track usage, or prefer XChaCha20-Poly1305 with its 192-bit nonce that is safe to generate randomly.

Hardcoded keys: Embedding encryption keys in source code, environment variables checked into git, or Docker images. Use a secrets manager (Vault, AWS Secrets Manager, KMS).

Using Math.random() for crypto: Math.random() is not cryptographically secure. Use crypto.getRandomValues() in browsers or crypto.randomBytes() in Node.js. In Python: secrets.token_bytes().

Rolling your own crypto: Never implement your own encryption algorithm or protocol. Use well-audited libraries: libsodium, OpenSSL, Web Crypto API, or the cryptography library in Python.

ECB mode: Electronic Codebook mode encrypts each block independently, producing visible patterns in the ciphertext (the famous "ECB penguin"). Always use authenticated modes: GCM, CCM, or Poly1305.

Section 05

Network Security

Firewalls, VPNs, intrusion detection, DNS security, and the architecture of a well-defended network

Firewall Types

Firewalls are the most fundamental network security control. They filter traffic based on rules, ranging from simple packet-level checks to deep application-layer inspection. Modern networks deploy multiple firewall types at different layers for defense in depth.

Fig. 8 — Firewall Classification and Use Cases

Type OSI Layer Description Use Cases & Examples
Packet Filter L3–L4 Examines individual packets based on source/dest IP, port, and protocol. Stateless—no connection tracking. Fast but limited visibility. Linux iptables (legacy), router ACLs. Basic perimeter filtering, high-throughput environments.
Stateful Firewall L3–L4 Tracks connection state (SYN, ESTABLISHED, RELATED). Can allow return traffic automatically. The standard for most network firewalls. Linux nftables, AWS Security Groups, cloud VPC firewalls. General-purpose network protection.
NGFW L3–L7 Next-Generation Firewall. Adds application awareness, TLS inspection, IPS, threat intelligence feeds, and user identity integration. Palo Alto, Fortinet FortiGate, Cisco Firepower. Enterprise perimeter and data center segmentation.
WAF L7 Web Application Firewall. Specifically filters HTTP/HTTPS traffic. Detects and blocks SQL injection, XSS, CSRF, and OWASP Top 10 attacks. AWS WAF, Cloudflare WAF, ModSecurity. Protects web applications and APIs at the edge or load balancer.
Cloud-Native FW L3–L7 Firewall services built into cloud platforms. Managed, auto-scaling, integrated with IAM and VPC constructs. AWS Network Firewall, GCP Cloud Armor, Azure Firewall. Cloud workload protection.

VPN Protocols

Virtual Private Networks create encrypted tunnels between endpoints, protecting data in transit over untrusted networks. Modern VPN design favors simplicity, speed, and minimal attack surface.

Fig. 9 — VPN Protocol Comparison

Protocol Status Encryption Speed Key Characteristics
WireGuard Recommended ChaCha20-Poly1305, Curve25519, BLAKE2s Excellent ~4,000 lines of code (vs. 100K+ for OpenVPN). In Linux kernel since 5.6. Minimal attack surface, fast handshake, roaming-friendly. Use for new deployments.
IPSec/IKEv2 Recommended AES-256-GCM, SHA-384, DH Group 20+ Good Native support on iOS, macOS, Windows. Excellent for mobile (MOBIKE handles network switching). Best built-in enterprise support. Strongswan, Libreswan implementations.
OpenVPN Legacy OK AES-256-GCM via OpenSSL Moderate Mature, well-audited, highly configurable. Runs in userspace (slower than kernel-based solutions). Large codebase. Use when WireGuard/IPSec aren't available.
PPTP Prohibited MPPE (broken) Fast Fundamentally broken cryptography since 2012. MS-CHAPv2 can be cracked to a single DES key. Do not use under any circumstances.
WireGuard — Server Configuration Example
# /etc/wireguard/wg0.conf
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = <server-private-key>

# Enable IP forwarding
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; \
         iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; \
           iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
# Client: alice-laptop
PublicKey = <alice-public-key>
AllowedIPs = 10.0.0.2/32
PresharedKey = <optional-psk-for-post-quantum-resistance>

IDS vs. IPS: Detection vs. Prevention

Intrusion Detection Systems (IDS) monitor and alert. Intrusion Prevention Systems (IPS) monitor, alert, and block. Both analyze network traffic against signatures, behavioral baselines, or protocol anomalies.

IDS — Intrusion Detection
  • Mode: Passive monitoring (out-of-band, mirrored traffic)
  • Action: Alert only—logs events, sends notifications
  • Risk: Does not block attacks; security team must respond manually
  • Latency: Zero impact on traffic flow
  • Deployment: SPAN port, network TAP, or host-based agent
  • Tools: Snort (IDS mode), Suricata, OSSEC, Zeek (Bro)
IPS — Intrusion Prevention
  • Mode: Inline (traffic passes through the IPS)
  • Action: Alert and block—drops, rejects, or rate-limits malicious traffic
  • Risk: False positives can block legitimate traffic; requires careful tuning
  • Latency: Adds small processing delay (~microseconds for modern systems)
  • Deployment: Inline between network segments or at the perimeter
  • Tools: Snort (IPS mode), Suricata (IPS mode), Palo Alto Threat Prevention
Suricata — Example Detection Rule
# Alert on SQL injection attempt in HTTP request
alert http $EXTERNAL_NET any -> $HOME_NET any (
  msg:"ET WEB_SERVER SQL Injection Attempt - SELECT FROM";
  flow:established,to_server;
  http.uri;
  content:"SELECT";  nocase;
  content:"FROM";    nocase;  distance:0;
  pcre:"/SELECT\s+.*\s+FROM\s+/Ui";
  classtype:web-application-attack;
  sid:2100001;  rev:3;
)

DNS Security

DNS is one of the oldest and most exploited internet protocols. Without protection, DNS queries are sent in plaintext, vulnerable to spoofing, cache poisoning, and surveillance. Modern DNS security adds authentication, encryption, and integrity checking.

Fig. 10 — DNS Security Protocols Comparison

Protocol Encrypts? Authenticates? Port Description
Plain DNS No No 53/UDP Original protocol. Queries and responses in plaintext. Vulnerable to spoofing, cache poisoning, eavesdropping, and manipulation.
DNSSEC No Yes 53/UDP Adds cryptographic signatures to DNS records, proving authenticity and integrity. Does not encrypt queries—an observer still sees what you resolve.
DoH Yes Yes 443/TCP DNS-over-HTTPS (RFC 8484). Wraps DNS in HTTPS, hiding queries from network observers. Blends with normal HTTPS traffic. Supported by Firefox, Chrome, Cloudflare (1.1.1.1).
DoT Yes Yes 853/TCP DNS-over-TLS (RFC 7858). Encrypts DNS in a dedicated TLS channel. Easier for network admins to identify and manage than DoH, but also easier to block.
DoQ Yes Yes 853/UDP DNS-over-QUIC (RFC 9250). Newest option. Uses QUIC for lower latency than TCP-based DoH/DoT. Emerging support in resolvers like AdGuard.

Network Segmentation & Microsegmentation

Network segmentation divides a network into isolated zones, limiting the blast radius of a breach. Microsegmentation takes this further by enforcing policies at the individual workload or container level, creating a "zero trust" network fabric.

Traditional segmentation:

  • VLANs — Separate broadcast domains at Layer 2
  • Subnets — Logical IP boundaries with inter-subnet routing controlled by firewalls
  • DMZ — Demilitarized zone for public-facing services, isolated from internal networks
  • ACLs — Router/switch access control lists between segments
  • Effective but coarse-grained; lateral movement still possible within a segment

Microsegmentation:

  • Workload-level policies — Rules attached to individual VMs, containers, or pods
  • Identity-based — Policies based on service identity (SPIFFE/SPIRE), not IP addresses
  • Service mesh — Istio, Linkerd enforce mTLS and authorization between microservices
  • Cloud-native — Kubernetes Network Policies, AWS Security Groups, GCP VPC Firewall Rules
  • Fine-grained; limits lateral movement to only explicitly allowed service-to-service paths

Zero Trust Networking

Verify explicitly. Use least privilege access. Assume breach.

— The Three Pillars of Zero Trust (Microsoft / NIST)

Zero Trust Networking applies the ZTA principles from Section 02 specifically to network architecture. The network itself is never a trust boundary. Every packet, every flow, every session must be authenticated, authorized, and encrypted—regardless of whether it originates from inside or outside the corporate perimeter.

Component Role Implementation Examples
Identity Proxy Authenticates users before granting network access Google BeyondCorp, Cloudflare Access, Zscaler Private Access, Tailscale
mTLS Everywhere Mutual TLS between all services; both sides present certificates Istio, Linkerd, SPIFFE/SPIRE, Consul Connect
Software-Defined Perimeter Dynamic, identity-driven network boundaries; services invisible until authenticated Zscaler, Akamai EAA, AppGate SDP
Policy Engine Evaluates context (identity, device, location, risk) per request Open Policy Agent (OPA), Entra ID Conditional Access, custom PDP/PEP

Network Security Scanning & Diagnostics

Essential command-line tools for network reconnaissance, packet analysis, and security assessment.

nmap

Port scanning and network discovery. nmap -sV -sC -O target for service version detection, default scripts, and OS fingerprinting. Use -Pn to skip host discovery on firewalled targets.

tcpdump

Command-line packet capture and analysis. tcpdump -i eth0 -w capture.pcap port 443 captures HTTPS traffic. Use BPF filters to narrow scope. Lightweight, available on nearly every Unix system.

wireshark

GUI-based deep packet analysis. Decode 3,000+ protocols. Follow TCP streams, decrypt TLS (with pre-master secret log), and visualize conversation flows. The gold standard for packet forensics.

netstat / ss

Connection monitoring. ss -tlnp shows listening TCP ports with process names. ss -s gives socket statistics summary. ss is the modern replacement for netstat.

traceroute / mtr

Path analysis and hop-by-hop latency measurement. mtr --report target combines traceroute and ping for continuous path monitoring. Identifies routing anomalies and potential interception points.

dig / nslookup

DNS query tools. dig +dnssec example.com queries with DNSSEC validation. dig @1.1.1.1 example.com AAAA +short queries a specific resolver. Essential for troubleshooting DNS issues.

Security Imperative

A flat network is a compromised network. Segment everything. Once an attacker gains initial access to a flat network, lateral movement is trivial—every host can reach every other host. The 2023 MGM Resorts breach demonstrated this devastatingly: a single social-engineering call led to domain-wide access within hours because of insufficient segmentation. Implement VLANs, firewall rules between segments, microsegmentation for critical workloads, and assume that any segment will be breached.

Section 06

Application Security (OWASP Top 10)

The most critical web application security risks—from broken access control to server-side request forgery—and how to defend against them

OWASP Top 10 (2021)

The Open Worldwide Application Security Project publishes its Top 10 list of critical web application security risks, updated periodically based on real-world vulnerability data from hundreds of organizations. The 2021 edition—still the current reference as of early 2026—reflects a shift toward access control failures and insecure design patterns. Every development team should know these by heart.

Fig. 11 — OWASP Top 10 Web Application Security Risks (2021)

Rank Category Risk Description
A01 Broken Access Control Critical Users acting outside their intended permissions. IDOR, privilege escalation, metadata manipulation, CORS misconfiguration. Found in 94% of applications tested.
A02 Cryptographic Failures Critical Exposure of sensitive data due to weak/missing encryption. Cleartext transmission, weak algorithms (MD5, SHA-1), missing TLS, hardcoded keys.
A03 Injection Critical Untrusted data sent to an interpreter as part of a command/query. SQL injection, NoSQL injection, OS command injection, LDAP injection, XSS.
A04 Insecure Design High Missing or ineffective security controls by design. Threat modeling gaps, insecure business logic, missing rate limiting, no abuse case analysis.
A05 Security Misconfiguration High Default credentials, unnecessary features enabled, overly permissive cloud configs, missing security headers, verbose error messages.
A06 Vulnerable & Outdated Components High Using libraries, frameworks, or dependencies with known vulnerabilities. No SBOM, no dependency scanning, no patch management for third-party code.
A07 Identification & Auth Failures High Weak passwords allowed, credential stuffing not blocked, missing MFA, session fixation, improper session invalidation on logout.
A08 Software & Data Integrity Failures High Assumptions about software updates, CI/CD pipelines, or deserialized data without verification. Supply chain attacks, insecure deserialization.
A09 Security Logging & Monitoring Failures Medium Insufficient logging, missing alerting, no audit trail. Breaches go undetected for months. Mean time to detect a breach: 204 days (IBM 2024).
A10 Server-Side Request Forgery (SSRF) High App fetches a remote resource without validating the user-supplied URL. Attacker reaches internal services, cloud metadata endpoints (169.254.169.254), or other protected resources.

Deep Dive: A01 — Broken Access Control

Broken Access Control moved from #5 (2017) to #1 (2021) because it was found in 94% of applications tested. It encompasses any flaw where users can act outside their intended permissions—from viewing another user's data to modifying admin settings.

IDOR (Insecure Direct Object Reference):

The most common access control flaw. The application exposes internal object IDs (user IDs, order numbers, file paths) in URLs or API parameters, and fails to verify that the authenticated user is authorized to access that specific object.

IDOR — Vulnerable Endpoint
# Attacker changes user_id in URL:
GET /api/users/1001/profile   # own profile
GET /api/users/1002/profile   # another user!
GET /api/users/1/profile      # admin account!

# Server blindly returns whatever ID
# is requested without checking ownership

Privilege Escalation types:

  • Horizontal: User A accesses User B's resources (same privilege level). Example: viewing another customer's orders by changing an ID parameter.
  • Vertical: Regular user accesses admin functionality. Example: accessing /admin/users without role verification, or changing "role": "admin" in a JWT payload.

Prevention:

  • Deny by default; require explicit grants
  • Enforce ownership checks on every data access
  • Use UUIDs instead of sequential IDs
  • Implement RBAC or ABAC at the middleware layer
  • Rate-limit and log all access control failures
  • Automated DAST testing for IDOR patterns

Deep Dive: A03 — Injection

Injection flaws occur when untrusted input is sent to an interpreter (SQL engine, OS shell, LDAP directory) as part of a command or query. The attacker's data is executed rather than treated as data. SQL injection remains the most prevalent and destructive form.

Vulnerable — String Concatenation
Python — SQL Injection Vulnerable
# DANGEROUS: User input directly
# concatenated into SQL query
username = request.form['username']
password = request.form['password']

query = f"""
  SELECT * FROM users
  WHERE username = '{username}'
  AND password = '{password}'
"""
cursor.execute(query)

# Attacker input:
# username: admin' --
# password: (anything)
#
# Resulting query:
# SELECT * FROM users
# WHERE username = 'admin' --'
# AND password = '...'
#
# The -- comments out the password
# check, granting admin access
Secure — Parameterized Query
Python — Parameterized (Safe)
# SAFE: Parameterized query
# separates code from data
username = request.form['username']
password = request.form['password']

query = """
  SELECT * FROM users
  WHERE username = %s
  AND password_hash = %s
"""
cursor.execute(query, (
    username,
    hash_password(password)
))

# The database driver treats
# parameters as DATA, never as
# SQL code. Injection is
# structurally impossible.
#
# Also note: comparing
# password_hash, not plaintext
# passwords!
Prevention Checklist

1. Use parameterized queries / prepared statements for all database access. 2. Use ORM frameworks (SQLAlchemy, Prisma, ActiveRecord) that parameterize by default. 3. Apply input validation (allowlists, not denylists). 4. Escape output for the target interpreter context. 5. Use LIMIT clauses to prevent mass data extraction even if injection occurs. 6. Run SAST tools (Semgrep, CodeQL) to detect concatenation patterns in CI/CD.

Deep Dive: Cross-Site Scripting (XSS)

XSS attacks inject malicious client-side scripts into web pages viewed by other users. The attacker's JavaScript runs in the victim's browser with full access to the page's DOM, cookies (if not HttpOnly), and the user's authenticated session.

XSS Type Persistence Severity Description & Example
Reflected Non-persistent High Malicious script is embedded in a URL parameter and reflected back in the server's response. Requires the victim to click a crafted link. Example: search?q=<script>alert(1)</script>
Stored Persistent Critical Malicious script is saved in the database (comments, profiles, messages) and served to every user who views the content. No victim interaction needed beyond visiting the page. Highest impact.
DOM-based Non-persistent High Vulnerability exists entirely in client-side JavaScript. The server never sees the malicious payload—it's injected via DOM manipulation (e.g., document.location, innerHTML). WAFs cannot detect it.

Context-Aware Output Encoding:

The key defense against XSS is encoding output for the specific context where user data is rendered. Different contexts require different encoding strategies:

Fig. 12 — Output Encoding by Context

Context Example Encoding Notes
HTML Body <div>USER_DATA</div> HTML entity encoding Convert < > & " ' to entities. Most template engines do this by default (React, Jinja2 {{ }}, Go html/template).
HTML Attribute <input value="USER_DATA"> Attribute encoding Always quote attributes. Encode all non-alphanumeric characters. Never place user data in unquoted attributes or event handlers.
JavaScript var x = 'USER_DATA'; JavaScript string escaping Hex-encode non-alphanumeric characters (\xHH). Better: pass data via data- attributes and read with dataset, avoiding inline JS entirely.
URL Parameter href="/page?q=USER_DATA" URL/percent encoding Use encodeURIComponent(). Validate URL scheme (reject javascript:, data:). Never allow user-controlled href without scheme allowlisting.
CSS color: USER_DATA; CSS hex escaping Avoid placing user data in CSS entirely. If unavoidable, use strict allowlists (e.g., only hex color codes matching /^#[0-9a-f]{6}$/i).

Secure HTTP Headers

Security headers instruct the browser to enable built-in protections against common attacks. Deploying the right headers is one of the highest-impact, lowest-effort security improvements for any web application.

Fig. 13 — Essential Security Response Headers

Header Recommended Value Purpose
Content-Security-Policy default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; object-src 'none'; base-uri 'self'; frame-ancestors 'none' Controls which resources the browser can load. The most powerful XSS mitigation. Start strict and loosen as needed. Use report-uri to collect violations.
Strict-Transport-Security max-age=63072000; includeSubDomains; preload Forces HTTPS for all future visits (2 years). Prevents SSL stripping attacks. Submit to the HSTS preload list for browser-level enforcement.
X-Content-Type-Options nosniff Prevents MIME-type sniffing. The browser strictly uses the declared Content-Type, blocking attacks where scripts masquerade as other resource types.
X-Frame-Options DENY Prevents the page from being embedded in iframes. Blocks clickjacking attacks. Superseded by CSP frame-ancestors but still recommended for legacy browser support.
Referrer-Policy strict-origin-when-cross-origin Controls how much URL information is sent in the Referer header. Prevents leaking sensitive URL paths/tokens to third-party sites.
Permissions-Policy camera=(), microphone=(), geolocation=(), payment=() Disables browser features your app does not use. Prevents malicious scripts from accessing the camera, microphone, or geolocation.
Nginx — Security Headers Configuration
# /etc/nginx/conf.d/security-headers.conf
# Include in every server block: include conf.d/security-headers.conf;

# HTTPS enforcement (2 years + subdomains + preload)
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;

# Prevent XSS via Content Security Policy
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; object-src 'none'; base-uri 'self'; frame-ancestors 'none'" always;

# Prevent MIME-type sniffing
add_header X-Content-Type-Options "nosniff" always;

# Prevent clickjacking
add_header X-Frame-Options "DENY" always;

# Control referrer information
add_header Referrer-Policy "strict-origin-when-cross-origin" always;

# Disable unused browser features
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()" always;

# Remove server version disclosure
server_tokens off;
more_clear_headers Server;

CSRF Prevention

Cross-Site Request Forgery tricks a user's browser into submitting unintended requests to a site where they're authenticated. The browser automatically attaches cookies, so the target server sees a legitimate-looking request from an authenticated user.

Defense Strength Implementation
SameSite Cookies Primary Set SameSite=Lax (default in modern browsers) or SameSite=Strict on session cookies. Prevents the browser from sending cookies on cross-origin requests. The most effective single defense against CSRF.
CSRF Tokens Primary Generate a unique, unpredictable token per session. Include it in forms as a hidden field and validate server-side. The Synchronizer Token Pattern. Frameworks handle this automatically (Django {% csrf_token %}, Rails protect_from_forgery).
Sec-Fetch-Site Header Secondary Modern browsers send Sec-Fetch-Site: cross-site on cross-origin requests. Server can reject any state-changing request where this header is not same-origin. Cannot be spoofed by JavaScript.
Double Submit Cookie Fallback Set a random value in both a cookie and a request header/body. Server verifies they match. Useful for stateless architectures but has edge cases with subdomain attacks if cookie scope is too broad.
Custom Request Headers Supplementary Require a custom header like X-Requested-With: XMLHttpRequest on all API calls. Simple forms cannot set custom headers, so this blocks basic CSRF. Not sufficient alone (Flash/Silverlight could bypass historically).

Input Validation Principles

Input validation is the first line of defense but it is not a complete defense. Validation ensures data conforms to expected formats and constraints before processing. It reduces attack surface and catches obvious malformed input, but it cannot replace output encoding, parameterized queries, or other context-specific defenses. Think of validation as the bouncer at the door—necessary, but not a substitute for security cameras inside.

Core principles:

  • Allowlists over denylists: Define what is valid, not what is invalid. Denylists always miss edge cases.
  • Validate on the server: Client-side validation improves UX but provides zero security. Attackers bypass it trivially.
  • Validate type, length, range, format: An email field should match an email regex, have a maximum length, and contain valid characters.
  • Canonicalize before validation: Decode URL-encoding, normalize Unicode, resolve path traversals (../) before applying validation rules.

Common mistakes:

  • Relying on validation alone: "We validate input, so we don't need parameterized queries" is a recipe for disaster.
  • Denylist-only patterns: Blocking <script> while allowing <img onerror=...> and a thousand other XSS vectors.
  • Trusting hidden fields: Hidden form inputs, cookies, and HTTP headers are all attacker-controlled. Validate everything.
  • Inconsistent validation: Validating on the API gateway but not in the backend service, or vice versa. Apply at every trust boundary.
By the Numbers

94% of applications tested had some form of broken access control — OWASP Top 10, 2021. This is not a niche vulnerability; it is the most common security flaw in modern web applications. The average application had 3.81 Common Weakness Enumerations (CWEs) mapped to this category, with over 318,000 occurrences in the dataset. Every API endpoint, every data access method, and every administrative function must enforce authorization checks—and those checks must be tested automatically in CI/CD.

Section 07

Infrastructure & Cloud Security

IAM, secrets management, container hardening, supply chain integrity, and securing infrastructure as code

IAM Best Practices

Identity and Access Management is the cornerstone of cloud security. Every cloud breach investigation starts with the same question: who had access, and why? Misconfigured IAM policies are the most common root cause of cloud data breaches, and the most preventable. These five principles form the foundation of a sound IAM posture.

Fig. 14 — IAM Best Practices

Principle Priority Description
Least Privilege Critical Grant only the minimum permissions necessary to perform a task. Start with zero permissions and add incrementally. Use AWS Access Analyzer, GCP IAM Recommender, or Azure Advisor to identify overly permissive policies. Never use wildcard (*) actions or resources in production.
Role-Based Access Critical Assign permissions to roles, not individual users. Define roles by job function (Developer, DBA, Auditor) and assign users to roles. This scales across organizations and makes access reviews tractable. Use attribute-based access control (ABAC) for fine-grained, context-aware policies.
Service Accounts High Machine identities require the same rigor as human identities. Use short-lived credentials (OIDC federation, workload identity) instead of static keys. Scope service accounts to a single application or function. Monitor for anomalous usage patterns.
MFA Everywhere Critical Enforce multi-factor authentication for all human access, especially privileged accounts. Use phishing-resistant MFA (FIDO2/WebAuthn hardware keys) for administrators. SMS-based MFA is better than nothing but vulnerable to SIM-swap attacks.
Regular Audits High Review access quarterly at minimum. Automate stale credential detection (unused keys > 90 days). Implement just-in-time (JIT) access for privileged operations so standing access is the exception, not the norm. Log all IAM changes to a tamper-proof audit trail.

Secrets Management

Secrets—API keys, database passwords, TLS certificates, signing keys—are the most sensitive data in any system. Hardcoding them in source code or environment variables is the most common and most dangerous anti-pattern in software engineering. A dedicated secrets management platform provides encryption at rest, access control, audit logging, and automated rotation.

Fig. 15 — Secrets Management Platforms Comparison

Platform Dynamic Secrets Auto-Rotation Audit Logging Encryption at Rest Best For
HashiCorp Vault Yes Yes Yes Yes Multi-cloud, on-prem, K8s. The gold standard for secrets management with dynamic secrets engines for databases, cloud providers, and PKI.
AWS Secrets Manager Limited Yes Yes Yes AWS-native workloads. Tight integration with RDS, Redshift, DocumentDB for automatic credential rotation via Lambda.
Azure Key Vault Limited Yes Yes Yes Azure-native. HSM-backed keys, certificate management, tight integration with Azure AD and managed identities.
SOPS (Mozilla) No No Via Git Yes Encrypting secrets in Git repos. Supports AWS KMS, GCP KMS, Azure Key Vault, and age/PGP as key backends. GitOps-friendly.
Env Variables No No No No Not recommended for production. Visible in process listings, crash dumps, and child processes. Use only for non-sensitive configuration.
HashiCorp Vault — CLI Operations
# Enable a secrets engine
vault secrets enable -path=secret kv-v2

# Store a secret
vault kv put secret/myapp/database \
    username="app_user" \
    password="$(openssl rand -base64 32)" \
    host="db.internal:5432"

# Retrieve a secret
vault kv get secret/myapp/database

# Retrieve only the password field
vault kv get -field=password secret/myapp/database

# Enable dynamic database credentials
vault secrets enable database
vault write database/config/mydb \
    plugin_name=postgresql-database-plugin \
    connection_url="postgresql://{{username}}:{{password}}@db:5432/mydb" \
    allowed_roles="readonly" \
    username="vault_admin" \
    password="admin_password"

# Create a role that generates short-lived credentials
vault write database/roles/readonly \
    db_name=mydb \
    creation_statements="CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}'; GRANT SELECT ON ALL TABLES IN SCHEMA public TO \"{{name}}\";" \
    default_ttl="1h" \
    max_ttl="24h"

# Get dynamic credentials (auto-expires!)
vault read database/creds/readonly
# Key             Value
# lease_id        database/creds/readonly/abc123
# lease_duration  1h
# username        v-token-readonly-abc123
# password        A1b2-C3d4-E5f6-G7h8

Container Security

Containers introduce a unique security surface. The shared kernel model means a container escape compromises the host. The immutable, layered image model means vulnerabilities can be baked into images and propagated across thousands of deployments. Securing containers requires attention at every stage: build, ship, and run.

Image Scanning Tools:

Fig. 16 — Container Image Scanning Tools Comparison

Tool License Speed CI/CD Integration Key Features
Trivy Apache 2.0 Fast Excellent All-in-one scanner: OS packages, language deps, IaC misconfigs, secrets. Zero config. The default choice for most teams.
Grype Apache 2.0 Fast Good Pairs with Syft (SBOM generator). Focused vulnerability scanner. Minimal footprint. Strong SBOM integration.
Snyk Container Commercial Moderate Excellent Developer-focused. Base image upgrade recommendations. Rich remediation advice. Integrates with IDEs and SCM platforms.

Rootless Containers:

Docker (Traditional)
  • Docker daemon runs as root
  • Container escape = root on host
  • Requires --privileged for some ops
  • Root-mapped UID inside container
  • Rootless mode available since v20.10 but not default
Podman (Rootless by Default)
  • Daemonless architecture
  • Runs entirely in user namespace
  • Container escape = unprivileged user
  • No root process on the host at all
  • Drop-in Docker CLI replacement

Kubernetes Security Controls:

Control Scope Description
RBAC Authorization Role-Based Access Control for the Kubernetes API. Define Roles (namespace-scoped) and ClusterRoles (cluster-wide) with specific verb+resource permissions. Bind to users, groups, or service accounts. Avoid cluster-admin except for break-glass.
Pod Security Standards Workload Replaced PodSecurityPolicies (removed in K8s 1.25). Three levels: Privileged (unrestricted), Baseline (prevents known escalations), Restricted (hardened best practices). Enforced via Pod Security Admission controller at namespace level.
NetworkPolicies Network Kubernetes-native firewall rules. Default-deny ingress and egress, then explicitly allow required traffic. Requires a CNI that supports NetworkPolicies (Calico, Cilium, Antrea). Without policies, all pod-to-pod traffic is allowed.
Secrets Encryption Data Enable encryption at rest for Kubernetes Secrets using EncryptionConfiguration. Use a KMS provider (AWS KMS, GCP KMS, Azure Key Vault) rather than the default aescbc provider. Secrets are base64-encoded, not encrypted, by default.
Admission Controllers Policy Intercept API requests before persistence. Use OPA Gatekeeper or Kyverno to enforce policies: no latest tags, require resource limits, mandate labels, block privileged containers. Shift security policy left into the deployment pipeline.
Dockerfile — Security Best Practices
# STAGE 1: Build (larger image, build tools)
FROM golang:1.22-alpine AS builder

# Don't run builds as root
RUN adduser -D -g '' appuser
WORKDIR /build

# Cache dependencies separately from source
COPY go.mod go.sum ./
RUN go mod download && go mod verify

# Copy source and build a static binary
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build \
    -ldflags='-w -s -extldflags "-static"' \
    -o /app ./cmd/server

# STAGE 2: Runtime (minimal image)
FROM scratch

# Import CA certificates for HTTPS calls
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

# Import the non-root user from build stage
COPY --from=builder /etc/passwd /etc/passwd

# Copy only the compiled binary
COPY --from=builder /app /app

# Run as non-root user
USER appuser

# Expose only the port you need
EXPOSE 8080

# Use exec form (no shell = smaller attack surface)
ENTRYPOINT ["/app"]

# Key security principles:
# 1. Multi-stage build: build tools don't ship to production
# 2. Minimal base: 'scratch' has zero OS packages (no shell, no curl)
# 3. Non-root user: container compromise ≠ root access
# 4. Static binary: no dynamic linking = no shared library attacks
# 5. Pinned versions: 'golang:1.22-alpine' not 'golang:latest'
# 6. Exec form ENTRYPOINT: no shell injection via CMD overrides

Supply Chain Security

Modern software is 80-90% open-source dependencies. An attacker who compromises a single popular library—or the build system that compiles it—can reach millions of downstream targets. Supply chain security ensures the integrity of every component, from source code to deployed artifact.

SBOM — Software Bill of Materials:

An SBOM is a machine-readable inventory of every component in a software artifact: libraries, versions, licenses, and transitive dependencies. Like a nutrition label for software. Required by Executive Order 14028 for software sold to the US federal government. Standard formats: SPDX (Linux Foundation) and CycloneDX (OWASP). Generate with tools like Syft, Trivy, or cdxgen.

Sigstore & Container Signing:

Sigstore provides keyless signing for software artifacts using short-lived certificates tied to OIDC identity. cosign signs and verifies container images. Rekor provides a tamper-proof transparency log of all signing events. Fulcio issues short-lived signing certificates. Eliminates the need for long-lived signing keys that can be stolen.

Fig. 17 — SLSA Framework Levels

SLSA Level Requirements What It Prevents Example
Level 1 Build process documented; provenance generated Unknown build process; no traceability GitHub Actions generates provenance attestation
Level 2 Hosted build service; authenticated provenance Tampered build scripts; forged provenance Build runs on GitHub-hosted runners, signed provenance
Level 3 Hardened build platform; non-falsifiable provenance Compromised build platform; insider tampering Isolated, ephemeral build environments; hermetic builds
Level 4 Two-party review; hermetic, reproducible builds Single-person insider attacks; build tampering All changes require 2+ reviewer approval; builds are bit-for-bit reproducible

Dependency Scanning Tools:

Dependabot

GitHub-native. Automated PRs for vulnerable dependencies. Supports npm, pip, Maven, NuGet, Go, Rust, and more. Free for public and private repos.

Renovate

Open-source alternative. Highly configurable auto-merge rules, grouping, and scheduling. Supports monorepos. Self-hosted or hosted via Mend.

Snyk SCA

Commercial SCA platform. Reachability analysis (is the vulnerable function actually called?). License compliance. IDE integration for shift-left scanning.

OSV-Scanner

Google-backed open-source scanner. Uses the OSV database. Supports lockfiles for most ecosystems. osv-scanner --lockfile=package-lock.json

CIS Benchmarks

The Center for Internet Security (CIS) publishes consensus-based configuration benchmarks for operating systems, cloud platforms, databases, and container orchestrators. These are the industry standard for hardening baselines and are referenced by NIST, FedRAMP, PCI-DSS, and HIPAA.

Fig. 18 — Key CIS Benchmarks

Benchmark Controls Audit Tool Key Hardening Areas
CIS Linux (RHEL/Ubuntu) 300+ Lynis, OpenSCAP Filesystem permissions, kernel parameters, SSH hardening, auditd rules, cron restrictions, password policies, firewall configuration
CIS Kubernetes 120+ kube-bench API server flags, etcd encryption, kubelet authentication, RBAC configuration, network policies, pod security standards, logging
CIS AWS Foundations 50+ Prowler, ScoutSuite IAM policies, CloudTrail logging, S3 bucket policies, VPC flow logs, encryption defaults, Security Hub findings
CIS Azure Foundations 60+ ScoutSuite, Steampipe Azure AD conditional access, storage account encryption, NSG rules, diagnostic logging, Key Vault access policies
CIS Docker 80+ Docker Bench Daemon configuration, image provenance, container runtime restrictions, network configuration, logging driver setup

Infrastructure as Code Security

Infrastructure as Code (IaC) brings software engineering practices to infrastructure: version control, code review, automated testing. But it also brings software vulnerabilities. A misconfigured Terraform module can provision a publicly accessible S3 bucket or an overly permissive security group in seconds, at scale. IaC security tools catch these misconfigurations before they reach production.

IaC Security Scanning — Command Examples
# tfsec: Static analysis for Terraform
# Detects security issues in Terraform code
tfsec .
tfsec --format=json --out=results.json .
tfsec --minimum-severity=HIGH .

# Checkov: Policy-as-code for IaC
# Supports Terraform, CloudFormation, K8s manifests, Dockerfiles
checkov -d .                          # Scan current directory
checkov -f main.tf                    # Scan specific file
checkov --framework terraform --check CKV_AWS_18  # Check specific rule
checkov --skip-check CKV_AWS_999     # Skip a check with justification

# OPA (Open Policy Agent) with Rego
# Write custom policies for any structured data
# Example: deny S3 buckets without encryption
opa eval --input terraform.json \
    --data policies/ \
    'data.terraform.deny'

# Rego policy example (policies/s3.rego):
# package terraform
# deny[msg] {
#     resource := input.resource.aws_s3_bucket[name]
#     not resource.server_side_encryption_configuration
#     msg := sprintf("S3 bucket '%s' lacks encryption", [name])
# }

# Terrascan: Detect compliance violations
terrascan scan -t aws -i terraform
terrascan scan -t k8s -i k8s         # Kubernetes manifests

# KICS (Keeping Infrastructure as Code Secure)
kics scan -p .                        # Scan all supported IaC
kics scan -p . --type Terraform --severity high,critical
By the Numbers

73% of cloud breaches involve misconfigured IAM policies — CISA. The most common misconfigurations: overly permissive service account keys, unused IAM roles with admin privileges, missing MFA on root/admin accounts, and public S3 buckets. Automated IAM analysis is not optional—it is the single highest-impact control for cloud security.

Section 08

Monitoring, Logging & Incident Response

SIEM platforms, threat detection, the MITRE ATT&CK framework, and the art of organized response under fire

SIEM Platforms

Security Information and Event Management (SIEM) platforms aggregate logs from across the enterprise, correlate events, and surface threats that individual log sources would miss. A SIEM is the nervous system of a Security Operations Center (SOC). Choosing the right platform depends on deployment model, team expertise, and budget.

Fig. 19 — SIEM Platform Comparison

Platform Deployment Query Language Best For Cost Model
Splunk On-prem / SaaS SPL (Search Processing Language) Large enterprises with complex analytics needs and mature SOC teams Per-GB ingestion. Expensive at scale. Predictable with workload pricing.
Elastic SIEM Self-hosted / Cloud KQL (Kibana Query Language) Teams already using ELK stack. Open-source core with commercial features. Free (self-hosted) or per-node/resource (Elastic Cloud). Lower barrier to entry.
Microsoft Sentinel SaaS (Azure) KQL (Kusto Query Language) Microsoft/Azure-centric environments. Deep Office 365 and Azure AD integration. Per-GB ingestion with commitment tiers. Free data connectors for Microsoft services.
Chronicle (Google SecOps) SaaS (GCP) YARA-L / UDM Search High-volume environments. Google-scale search across 12 months of hot data. Flat-rate licensing (not per-GB). Predictable at any volume.

Centralized Logging Architecture

A robust logging pipeline separates collection, transport, processing, and storage into distinct stages. This decoupling allows each stage to scale independently and prevents log loss during traffic spikes or downstream outages.

Fig. 20 — Centralized Logging Pipeline
┌─────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌─────────────┐ │ Applications │ │ Log Shipper │ │ Message Queue │ │ SIEM / Storage │ │ Dashboard │ │ │ │ │ │ │ │ │ │ │ │ Web Servers │───>│ Fluentd │───>│ Apache Kafka │───>│ Splunk │───>│ Grafana │ │ APIs │ │ Fluent Bit │ │ Amazon Kinesis │ │ Elasticsearch │ │ Kibana │ │ Databases │ │ Vector │ │ Azure Event Hub │ │ S3 / GCS │ │ Chronicle │ │ Firewalls │ │ Filebeat │ │ (Buffer/Decouple│ │ (Hot + Cold) │ │ (Alerting) │ │ Endpoints │ │ (Collect+Parse) │ │ + Replay) │ │ (Index+Analyze) │ │ │ └─────────────┘ └──────────────────┘ └──────────────────┘ └──────────────────┘ └─────────────┘ │ ┌────────────────────────────────────────────────────────────────────────────────────────┘ │ v ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Alerting & Response: PagerDuty | Slack/Teams | SOAR Playbooks | Ticket Creation │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘

MITRE ATT&CK Framework

MITRE ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge) is a globally-accessible knowledge base of adversary behavior based on real-world observations. It provides a common language for describing what attackers do after gaining initial access. Security teams use it to map detection coverage, identify gaps, and prioritize investments.

Matrix Structure:

  • Tactics — The adversary's goal (the why). 14 tactics in the Enterprise matrix.
  • Techniques — How the adversary achieves the goal (the how). 200+ techniques.
  • Sub-techniques — More specific variations of a technique. 400+ sub-techniques.
  • Procedures — Specific implementations observed in the wild, attributed to named threat groups.

How Teams Use ATT&CK:

  • Gap analysis: Map SIEM detection rules to ATT&CK techniques to find blind spots
  • Threat intelligence: Identify which techniques specific threat groups use
  • Red team exercises: Structure adversary emulation around real-world TTPs
  • Vendor evaluation: Compare EDR/XDR coverage using ATT&CK evaluations

Fig. 21 — MITRE ATT&CK Enterprise Tactics

ID Tactic Description Example Techniques
TA0001 Initial Access Gaining a foothold in the target network Phishing (T1566), Exploit Public-Facing App (T1190), Valid Accounts (T1078)
TA0002 Execution Running adversary-controlled code on the target Command & Scripting Interpreter (T1059), Scheduled Task (T1053)
TA0003 Persistence Maintaining access across restarts and credential changes Boot Autostart (T1547), Create Account (T1136), Implant Container (T1525)
TA0004 Privilege Escalation Gaining higher-level permissions on the system Exploitation for Priv Esc (T1068), Sudo Caching (T1548), Token Manipulation (T1134)
TA0005 Defense Evasion Avoiding detection by security tools and analysts Obfuscated Files (T1027), Indicator Removal (T1070), Masquerading (T1036)
TA0006 Credential Access Stealing account credentials Brute Force (T1110), OS Credential Dumping (T1003), Input Capture (T1056)
TA0007 Discovery Understanding the target environment Network Service Discovery (T1046), System Info (T1082), Account Discovery (T1087)
TA0008 Lateral Movement Moving through the network to reach target assets Remote Services (T1021), Pass the Hash (T1550), Internal Spearphishing (T1534)
TA0009 Collection Gathering data of interest to the adversary Data from Local System (T1005), Screen Capture (T1113), Email Collection (T1114)
TA0010 Exfiltration Stealing data from the target network Exfil Over C2 Channel (T1041), Exfil Over Web (T1567), Automated Exfil (T1020)
TA0040 Impact Disrupting availability or integrity of target systems Data Encrypted for Impact (T1486), Defacement (T1491), Resource Hijacking (T1496)

Threat Detection Tools

Modern threat detection has evolved beyond signature-based antivirus into a layered ecosystem of endpoint, network, and behavioral analytics platforms. Each tool class addresses a different slice of the attack surface.

Fig. 22 — Threat Detection Platform Categories

Category Full Name Key Products Description
EDR Endpoint Detection & Response CrowdStrike Falcon, SentinelOne, Microsoft Defender for Endpoint, Carbon Black Real-time monitoring of endpoint activity (processes, file changes, network connections). Behavioral analysis detects fileless malware and living-off-the-land attacks. Remote containment and forensic data collection.
XDR Extended Detection & Response Palo Alto Cortex XDR, Microsoft 365 Defender, CrowdStrike Falcon XDR Correlates data across endpoints, network, email, cloud, and identity into a unified detection and response platform. Reduces alert fatigue through cross-domain correlation.
UEBA User & Entity Behavior Analytics Exabeam, Microsoft Sentinel UEBA, Splunk UBA Baselines normal user and device behavior, then detects anomalies: unusual login times, impossible travel, abnormal data access patterns. Critical for detecting compromised credentials and insider threats.
NDR Network Detection & Response Darktrace, ExtraHop Reveal(x), Vectra AI Passive network traffic analysis using ML to detect lateral movement, C2 communications, and data exfiltration. Sees encrypted traffic metadata without decryption.

Incident Response Phases

NIST SP 800-61 Rev. 2 defines the authoritative framework for computer security incident handling. Every organization must have a tested, documented incident response plan before a breach occurs. The four phases are cyclical—lessons from post-incident activity feed back into improved preparation.

Fig. 23 — NIST Incident Response Lifecycle (SP 800-61 Rev. 2)
┌──────────────────────────────┐ │ │ │ 1. PREPARATION │ │ ───────────────────── │ │ • IR plan & team │ │ • Communication plan │ │ • Tools & forensic kits │ │ • Training & tabletops │ │ │ └──────────────┬───────────────┘ │ ▼ ┌───────────────────────────────┐ ┌──────────────────────────────┐ │ │ │ │ │ 4. POST-INCIDENT ACTIVITY │ │ 2. DETECTION & ANALYSIS │ │ ────────────────────────── │ │ ────────────────────────── │ │ • Root cause analysis │ │ • Monitor alerts (SIEM) │ │ • Lessons learned meeting │◄──────│ • Triage & validate │ │ • Update playbooks │ │ • Determine scope & impact │ │ • Improve detection rules │ │ • Evidence collection │ │ • Metrics & reporting │ │ │ │ │ └──────────────┬───────────────┘ └───────────────────────────────┘ │ ▲ ▼ │ ┌──────────────────────────────┐ │ │ │ │ │ 3. CONTAINMENT, ERADICATION │ │ │ & RECOVERY │ └──────────────│ ────────────────────────── │ │ • Short-term containment │ │ • Evidence preservation │ │ • Eradicate threat actor │ │ • Restore systems │ │ • Verify integrity │ │ │ └──────────────────────────────┘

IR Playbook Structure

A playbook is a documented, repeatable procedure for handling a specific incident type (ransomware, phishing, data breach, DDoS). Good playbooks eliminate decision paralysis during a crisis and ensure consistent, auditable response. Every organization needs playbooks for its top 5-10 most likely incident scenarios.

Fig. 24 — IR Playbook Components

Component Description
Scope Define which incident types this playbook covers. Be specific: "Ransomware affecting production Windows servers" is better than "malware incident."
Severity Classification Clear criteria for SEV-1 (critical), SEV-2 (major), SEV-3 (minor). Defines response time SLAs, who gets paged, and escalation triggers. Use impact + urgency matrix.
Roles & Responsibilities Incident Commander, Technical Lead, Communications Lead, Legal/Privacy contact, Executive sponsor. RACI matrix for each role. Include backup personnel and on-call rotation.
Communication Plan Internal notification chain, external stakeholder communication, regulatory notification timelines (GDPR: 72 hours, HIPAA: 60 days, state breach laws vary). Pre-drafted templates for each audience.
Technical Steps Step-by-step procedures for containment, evidence collection, eradication, and recovery. Include specific commands, tool usage, and decision trees. Version-controlled and tested quarterly.
Escalation Path When to escalate from Tier 1 to Tier 2, when to engage external IR firms (Mandiant, CrowdStrike Services), when to involve law enforcement (FBI IC3, CISA).
Evidence Preservation Chain of custody procedures. What to image, what to preserve in memory, log retention requirements. Legal hold notification process. Forensic image integrity (hash verification).
Post-Mortem Template Blameless post-incident review template: timeline of events, root cause analysis, what went well, what to improve, action items with owners and deadlines. Must be completed within 5 business days.

Security Monitoring Tools

The essential open-source and freely available tools for security monitoring, auditing, and threat detection on Linux systems. These form the foundation of host-based security monitoring and complement network-level SIEM platforms.

fail2ban

Brute-force protection. Monitors log files for repeated authentication failures and automatically bans offending IPs via firewall rules. Protects SSH, web apps, mail servers. Config: /etc/fail2ban/jail.local

auditd

Linux audit daemon. Kernel-level audit framework that logs system calls, file access, and user actions. Required for compliance (PCI-DSS, HIPAA). Rules: /etc/audit/audit.rules. Query: ausearch, aureport

osquery

SQL-based endpoint visibility. Query OS state using SQL: SELECT * FROM listening_ports WHERE port = 22; Supports Windows, macOS, Linux. Fleet management with Kolide or FleetDM. Real-time event tables.

Lynis

Security audit scanner. Performs automated security assessments against CIS benchmarks. Checks system hardening, software patches, kernel configuration, authentication settings. lynis audit system

Suricata

Network threat detection. High-performance IDS/IPS and network security monitoring engine. Processes traffic at multi-gigabit speeds. Supports Snort-compatible rules plus Lua scripting. Full packet capture and protocol logging.

Wazuh

SIEM + HIDS platform. Open-source security monitoring combining host intrusion detection, log analysis, vulnerability detection, and compliance checking. Integrates with Elastic Stack. Agents for Windows, Linux, macOS.

Digital Forensics Basics

Digital forensics is the scientific process of collecting, preserving, analyzing, and presenting digital evidence. Whether investigating a breach, supporting litigation, or conducting an internal review, forensic rigor ensures evidence is admissible and conclusions are defensible.

Evidence Preservation Principles:

  • Order of volatility: Capture most volatile data first (CPU registers → memory → disk → network logs → backups)
  • Forensic imaging: Bit-for-bit disk copy using write-blockers. Verify with SHA-256 hash. Never analyze the original media.
  • Chain of custody: Document every person who handles evidence, when, and what they did. Any gap invalidates the evidence in legal proceedings.
  • Legal hold: Notify relevant parties to preserve all potentially relevant data. Suspend automated deletion policies.

Common Forensic Tools:

  • Autopsy: Open-source digital forensics platform. GUI-based. Timeline analysis, keyword search, hash filtering, file carving. Built on The Sleuth Kit.
  • Volatility: Memory forensics framework. Analyze RAM dumps for running processes, network connections, injected code, and encryption keys.
  • KAPE (Kroll): Rapid triage collection tool. Collects forensic artifacts (browser history, event logs, prefetch) in minutes.
  • Velociraptor: Endpoint visibility and forensic collection at scale. Hunt across thousands of endpoints with VQL queries.

The question is not whether you will be breached, but whether you will know when it happens.

— Security Operations axiom
Section 09

Compliance & Frameworks

NIST, FedRAMP, FISMA, SOC 2, ISO 27001, CIS Controls, CMMC, and the regulatory landscape that shapes modern security programs

NIST Cybersecurity Framework 2.0

The NIST Cybersecurity Framework (CSF) is the most widely adopted cybersecurity framework in the world. Version 2.0, released in February 2024, adds Govern as a sixth core function, reflecting the growing recognition that cybersecurity is a board-level governance issue, not just a technical concern. The framework is voluntary but increasingly referenced in regulations and contracts.

Fig. 25 — NIST CSF 2.0 Core Functions

Function Description Example Activities
GOVERN Establish and monitor the organization's cybersecurity risk management strategy, expectations, and policy. New in CSF 2.0. Risk management strategy, cybersecurity supply chain risk management, roles & responsibilities, policy, oversight, board reporting
IDENTIFY Understand the organization's assets, business context, and cybersecurity risks to prioritize efforts Asset inventory, business environment analysis, risk assessment, vulnerability management, threat intelligence integration
PROTECT Implement safeguards to ensure delivery of critical services and limit the impact of potential events Identity management & access control, security awareness training, data security, platform security, technology infrastructure resilience
DETECT Identify the occurrence of cybersecurity events in a timely manner Continuous monitoring, security event analysis, anomaly detection, adverse event assessment and correlation
RESPOND Take action regarding a detected cybersecurity incident to contain its impact Incident management, incident analysis, incident response reporting & communication, incident mitigation, forensic analysis
RECOVER Restore capabilities or services impaired by a cybersecurity incident Incident recovery plan execution, recovery communication, system restoration verification, lessons learned integration

NIST SP 800-53 Rev. 5

NIST SP 800-53 is the comprehensive catalog of security and privacy controls used by federal agencies (required by FISMA) and increasingly adopted by the private sector. Revision 5 includes over 1,000 controls organized into 20 families. It is the foundation for FedRAMP, CMMC, and many state-level cybersecurity requirements.

Fig. 26 — Key NIST SP 800-53 Rev. 5 Control Families

ID Control Family Controls Key Concerns
AC Access Control 25 Account management, access enforcement, least privilege, separation of duties, session controls, remote access
AU Audit & Accountability 16 Audit events, content of audit records, audit storage, audit review/analysis/reporting, protection of audit info
CA Security Assessment & Authorization 9 Control assessments, system authorization (ATO), continuous monitoring, penetration testing, plan of action & milestones
CM Configuration Management 14 Baseline configuration, change control, least functionality, software restrictions, system component inventory
CP Contingency Planning 13 Contingency plan, testing, alternate storage/processing sites, system backup, system recovery & reconstitution
IA Identification & Authentication 12 User/device/service identification, authenticator management, multi-factor auth, cryptographic module auth
IR Incident Response 10 IR policy/procedures, incident handling, monitoring, reporting, response plan, information sharing
SC System & Communications Protection 51 Boundary protection, transmission confidentiality/integrity, cryptographic protection, network disconnect, DNS security
SI System & Information Integrity 23 Flaw remediation, malicious code protection, security alerts, software integrity verification, spam protection

FedRAMP

The Federal Risk and Authorization Management Program (FedRAMP) provides a standardized approach to security assessment, authorization, and continuous monitoring for cloud products and services used by federal agencies. Any cloud service provider (CSP) selling to the US federal government must achieve FedRAMP authorization.

Fig. 27 — FedRAMP Authorization Levels

Impact Level Control Count Data Sensitivity Examples
Low ~156 controls Data whose loss would have limited adverse effect on operations, assets, or individuals Public-facing websites, non-sensitive collaboration tools, open data portals
Moderate ~325 controls Data whose loss would have serious adverse effect. This is the most common level. CUI (Controlled Unclassified Information), PII, financial data, law enforcement data, most SaaS products
High ~421 controls Data whose loss would have severe or catastrophic adverse effect on operations or individuals Law enforcement sensitive data, emergency services, financial systems, healthcare, critical infrastructure

Authorization Paths:

JAB Authorization (P-ATO)
  • Reviewed by the Joint Authorization Board (DoD, DHS, GSA)
  • Provisional ATO reusable by any agency
  • Higher scrutiny, longer timeline (12-18 months)
  • Best for: CSPs serving multiple agencies
  • Limited slots available; competitive process
Agency Authorization (ATO)
  • Sponsored by a single federal agency
  • Agency-specific ATO, reusable via FedRAMP Marketplace
  • Faster timeline (6-12 months)
  • Best for: CSPs with a specific agency customer
  • Agency bears the authorization risk

FISMA

The Federal Information Security Modernization Act (FISMA, 2014, updating the original 2002 act) requires every federal agency to implement an information security program. FISMA mandates the use of NIST standards (SP 800-53, SP 800-37 Risk Management Framework) and requires continuous monitoring of federal information systems. Agencies must report their cybersecurity posture to OMB and Congress annually.

Key FISMA Requirements:

  • Categorize information systems by impact level (FIPS 199)
  • Select and implement security controls (NIST SP 800-53)
  • Conduct risk assessments (NIST SP 800-30)
  • Obtain Authority to Operate (ATO) from authorizing official
  • Continuous monitoring with automated tools (CDM program)
  • Annual security reviews and reporting to OMB

Continuous Monitoring Mandate:

  • NIST SP 800-137: defines a continuous monitoring strategy
  • Automated vulnerability scanning (at least monthly)
  • Configuration compliance checking against baselines
  • CDM (Continuous Diagnostics & Mitigation) program provides tools to agencies
  • Real-time or near-real-time security status dashboards
  • Ongoing authorization replaces point-in-time ATO

SOC 2

SOC 2 (System and Organization Controls 2) is an audit framework developed by the AICPA for service organizations. It evaluates controls relevant to security, availability, processing integrity, confidentiality, and privacy. SOC 2 compliance is the de facto standard for SaaS companies and cloud service providers serving enterprise customers.

Fig. 28 — SOC 2 Trust Service Criteria

Criterion Required? Focus Areas
Security Always Protection against unauthorized access (physical and logical). Firewalls, IDS, MFA, encryption, access controls, change management. The foundation of every SOC 2 report.
Availability Optional System uptime and operational performance. Disaster recovery, backups, incident response, capacity planning, SLA management.
Processing Integrity Optional Data processing is complete, valid, accurate, timely, and authorized. Input validation, error handling, reconciliation, output review.
Confidentiality Optional Information designated as confidential is protected. Encryption, access restrictions, data classification, secure disposal, NDA enforcement.
Privacy Optional Personal information is collected, used, retained, disclosed, and disposed of in accordance with privacy notice. Consent, access rights, GDPR/CCPA alignment.

Type I vs. Type II:

SOC 2 Type I
  • Evaluates design of controls at a point in time
  • Are controls suitably designed?
  • Faster to obtain (2-3 months)
  • Good starting point for startups
  • Less assurance for customers
SOC 2 Type II
  • Evaluates effectiveness of controls over a period (typically 6-12 months)
  • Are controls operating effectively?
  • Longer engagement (6-12 months)
  • Required by most enterprise customers
  • Substantially higher assurance

ISO 27001:2022

ISO 27001 is the international standard for Information Security Management Systems (ISMS). It takes a risk-based approach: organizations must identify their information security risks, select appropriate controls, and operate a management system to ensure those controls remain effective. Certification is granted by accredited third-party auditors and typically renewed on a 3-year cycle with annual surveillance audits.

ISMS Core Requirements (Clauses 4-10):

  • Context of the organization: Understand internal/external issues and stakeholder expectations
  • Leadership: Top management commitment and information security policy
  • Planning: Risk assessment, risk treatment, and information security objectives
  • Support: Resources, competence, awareness, communication, documented information
  • Operation: Implement risk treatment plans and controls
  • Performance evaluation: Monitoring, measurement, internal audit, management review
  • Improvement: Nonconformity management, corrective actions, continual improvement

Annex A Control Areas (2022 revision):

  • A.5 — Organizational controls (37 controls)
  • A.6 — People controls (8 controls)
  • A.7 — Physical controls (14 controls)
  • A.8 — Technological controls (34 controls)
  • Total: 93 controls (down from 114 in 2013)
  • New controls in 2022: Threat intelligence, cloud security, ICT readiness for business continuity, physical security monitoring, data masking, DLP, web filtering, secure coding

CIS Controls v8

The CIS Critical Security Controls are a prioritized set of 18 actions that organizations should take to defend against the most common cyber attacks. Unlike frameworks that describe what to protect, CIS Controls prescribe how to protect it, in priority order. Implementation Groups (IGs) make the controls accessible to organizations of any size and maturity.

Fig. 29 — CIS Controls v8 Implementation Groups

Group Safeguards Target Audience Key Controls
IG1 56 Small/mid orgs with limited IT expertise. The essential cyber hygiene baseline. Asset inventory (CIS 1), software inventory (CIS 2), data protection (CIS 3), secure configuration (CIS 4), account management (CIS 5), access control (CIS 6)
IG2 130 (IG1 + 74) Mid-size enterprises with dedicated IT staff managing sensitive data Audit log management (CIS 8), email/web browser protections (CIS 9), malware defenses (CIS 10), data recovery (CIS 11), network monitoring (CIS 13)
IG3 153 (all) Large enterprises with mature security programs and dedicated security teams Penetration testing (CIS 18), security awareness training (CIS 14), application software security (CIS 16), incident response (CIS 17)

CMMC 2.0

The Cybersecurity Maturity Model Certification (CMMC) 2.0 is the Department of Defense's framework for ensuring contractors protect Controlled Unclassified Information (CUI) and Federal Contract Information (FCI). CMMC 2.0 simplified the original 5-level model to 3 levels and aligned controls directly with NIST SP 800-171 and SP 800-172. Enforcement began rolling into DoD contracts in 2025.

Fig. 30 — CMMC 2.0 Maturity Levels

Level Name Controls Assessment Description
Level 1 Foundational 17 practices Annual self-assessment Basic cyber hygiene for protecting FCI. Based on FAR 52.204-21. Applies to all contractors handling federal contract information.
Level 2 Advanced 110 practices Third-party assessment (C3PAO) or self-assessment Aligned with NIST SP 800-171 Rev. 2. Required for contractors handling CUI. Third-party certification required for prioritized acquisitions; self-assessment for non-prioritized.
Level 3 Expert 110+ enhanced controls Government-led assessment (DIBCAC) Aligned with NIST SP 800-172. Required for the most sensitive DoD programs. Protects against Advanced Persistent Threats (APTs). Very few contractors will need Level 3.

Zero Trust Architecture Standards

Zero Trust is referenced throughout modern compliance frameworks. NIST SP 800-207 defines the architectural model, and Executive Order 14028 (May 2021) mandated federal agencies to adopt Zero Trust principles. The CISA Zero Trust Maturity Model provides a phased adoption roadmap.

Standard / Reference Scope ZTA Pillars Addressed
NIST SP 800-207 Defines Zero Trust Architecture concepts, deployment models, and use cases Identity, Device, Network, Application/Workload, Data
CISA Zero Trust Maturity Model Phased roadmap for federal agency ZTA adoption (Traditional → Advanced → Optimal) Identity, Devices, Networks, Applications & Workloads, Data, Visibility & Analytics, Automation & Orchestration
EO 14028 Executive Order mandating federal agencies to adopt ZTA, MFA, encryption, EDR, logging All pillars; specific mandates for MFA, encryption in transit/at rest, and EDR deployment
OMB M-22-09 Implementation memo with specific ZTA goals for agencies by end of FY2024 Phishing-resistant MFA, device inventory, encrypted DNS, network segmentation, application testing
DoD Zero Trust Strategy DoD-specific ZTA implementation plan with 45 capabilities and 152 activities across 7 pillars User, Device, Application & Workload, Data, Network, Automation & Orchestration, Visibility & Analytics
Compliance Advisory

FedRAMP Moderate requires 325 security controls. Start your compliance mapping early. The average FedRAMP authorization takes 12-18 months and costs $500K-$2M+ including 3PAO assessment fees, documentation, remediation, and ongoing continuous monitoring. Organizations already aligned to NIST SP 800-53 have a significant head start. Map your existing controls to FedRAMP baselines early to identify gaps before the assessment begins.

Section 10

Security Culture & Resources

Building a security-first organization — threat modeling, DevSecOps pipelines, vulnerability management, penetration testing, certifications, and staying current.

Threat Modeling Methodologies

Threat modeling is a structured approach to identifying, quantifying, and addressing security risks in a system. Perform it during design, not after deployment. The right methodology depends on your context — some focus on technical threats, others on privacy, and some decompose attack goals visually.

Methodology Origin Description Best Used When
STRIDE Microsoft Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege. Categorizes threats by type against each system component. Pairs with Data Flow Diagrams (DFDs). Software design phase; teams new to threat modeling; Microsoft ecosystem projects
PASTA VerSprite Process for Attack Simulation and Threat Analysis. Seven-stage risk-centric methodology: (1) Define Objectives, (2) Define Technical Scope, (3) Application Decomposition, (4) Threat Analysis, (5) Vulnerability Analysis, (6) Attack Modeling, (7) Risk & Impact Analysis. Business-risk-driven assessments; when you need to tie threats to business impact; compliance-heavy environments
LINDDUN KU Leuven Linkability, Identifiability, Non-repudiation, Detectability, Disclosure, Unawareness, Non-compliance. Privacy-focused threat modeling for data protection and GDPR alignment. Privacy-sensitive applications; GDPR/CCPA compliance; health or financial data systems
Attack Trees Bruce Schneier Visual, hierarchical decomposition of attack goals. The root node is the attacker's goal; child nodes are sub-goals or methods. Each path from root to leaf represents one complete attack scenario. Can be annotated with cost, difficulty, and likelihood. Communicating threats to non-technical stakeholders; analyzing specific high-value targets; red team planning
Practical Tip

Start with STRIDE for your first threat model. It is the most widely taught, has the best tooling support (Microsoft Threat Modeling Tool is free), and maps cleanly to common vulnerability categories. Graduate to PASTA when you need business-risk prioritization, and layer in LINDDUN when privacy requirements are significant.

Security Champions Program

A Security Champion is a developer or engineer who voluntarily acts as a security advocate within their team. They are not full-time security professionals — they are embedded practitioners who bridge the gap between development and security teams, scaling security knowledge across the organization.

What Champions Do
  • Conduct lightweight threat models during sprint planning
  • Triage security findings from SAST/DAST scanners
  • Review PRs with a security lens
  • Serve as first responders for security incidents on their team
  • Maintain secure coding guidelines for their stack
  • Attend regular champion syncs with the central security team
  • Evangelize security tooling and best practices
Program Benefits
  • Scales security knowledge — multiplies the security team's reach across all engineering teams
  • Shifts left — catches vulnerabilities during design and code review, not in production
  • Reduces bottleneck — security team no longer the sole gatekeeper for every release
  • Builds empathy — developers understand security constraints; security understands dev velocity pressures
  • Career growth — champions develop a specialized skill set valued across the industry
  • Culture shift — security becomes everyone's responsibility, not a separate department's problem
OWASP Reference

The OWASP Security Champions Guide provides a structured framework for building, running, and measuring champion programs. Key principles: executive sponsorship, voluntary participation, dedicated training time (at least 10% of sprint), recognition and gamification, clear escalation paths, and measurable KPIs (mean time to remediate, champion-originated fixes, training completion rates).

DevSecOps — Shift-Left Security

DevSecOps integrates security checks at every stage of the CI/CD pipeline, rather than bolting them on before release. The goal: find vulnerabilities as early as possible, when they are cheapest to fix.

DevSecOps Pipeline Integration

Code Build Test Deploy Monitor ↓ ↓ ↓ ↓ ↓ +---------+ +---------+ +---------+ +---------+ +-----------+ | SAST | | SCA | | DAST | | Config | | RASP / | | Lint | | License | | IAST | | Audit | | WAF | | Secrets| | SBOM | | Fuzz | | Pen | | SIEM | +---------+ +---------+ +---------+ | Test | | EDR | +---------+ +-----------+ ⇐ Earlier = Cheaper to Fix Later = More Expensive ⇒ ~$100 to fix in dev ~$1,000 in test ~$10,000+ in prod
Type Full Name What It Catches When in Pipeline Tools
SAST Static Application Security Testing Injection flaws, hardcoded secrets, insecure patterns, type confusion, buffer overflows — analyzes source code without executing it Code / pre-commit / PR checks Semgrep, SonarQube, CodeQL, Checkmarx
DAST Dynamic Application Security Testing XSS, SQLi, CSRF, misconfigurations, authentication issues — tests the running application from the outside like an attacker Test / staging environment OWASP ZAP, Burp Suite, Nuclei, Nikto
IAST Interactive Application Security Testing Runtime injection, data flow issues, request validation — instruments the running application with an agent for real-time analysis Test (runs alongside functional tests) Contrast Security, Hdiv, Seeker
SCA Software Composition Analysis Vulnerable dependencies, license violations, outdated packages — scans your dependency tree against known vulnerability databases Build / PR checks Snyk, Dependabot, Renovate, Trivy, Grype
Secrets Secret Detection Scanning API keys, tokens, passwords, certificates committed to source control Pre-commit hook / PR checks Gitleaks, TruffleHog, GitHub Secret Scanning

Vulnerability Management Lifecycle

Vulnerability management is a continuous cycle, not a one-time scan. Mature programs combine automated discovery with risk-based prioritization to focus remediation effort where it matters most.

Vulnerability Management Lifecycle

+------------+ +------------+ +---------------+ | | | | | | | Discovery |→→→→| Assessment |→→→→| Prioritization| | | | | | | +------------+ +------------+ +-------+-------+ ↑ | | ↓ +------------+ +------------+ +---------------+ | | | | | | | Reporting |←←←←|Verification|←←←←| Remediation | | | | | | | +------------+ +------------+ +---------------+
Scoring System Description Key Characteristics
CVSS v4.0 Common Vulnerability Scoring System. Industry-standard severity scoring with three metric groups: Base (intrinsic severity), Threat (exploit maturity, replacing Temporal), and Environmental (organization-specific adjustments). Scores range from 0.0–10.0. Deterministic scoring; v4.0 adds Supplemental metrics (Automatable, Recovery, Provider Urgency); does not predict exploitation likelihood
EPSS Exploit Prediction Scoring System. Probability-based model that estimates the likelihood a vulnerability will be exploited in the wild within the next 30 days. Scores range from 0–1 (0%–100% probability). Updated daily by FIRST.org. Complements CVSS — a CVSS 9.8 with EPSS 0.01 is less urgent than a CVSS 7.2 with EPSS 0.95; enables risk-based prioritization
CISA KEV Known Exploited Vulnerabilities catalog. A curated list maintained by CISA of vulnerabilities that are actively being exploited in the wild. Federal agencies must remediate KEV entries within specified deadlines. Private organizations should treat KEV entries as top priority. Binary signal (on the list or not); mandatory patching for federal agencies under BOD 22-01; strongest indicator of real-world exploitation
CVE Lifecycle

How a vulnerability becomes a CVE: Researcher discovers flaw → CNA (CVE Numbering Authority) assigns CVE ID → Vendor develops and releases patch → Coordinated public disclosure → NVD enriches with CVSS score, CPE data, and references. Median time from discovery to patch: 60–90 days. Median time for NVD enrichment after publication: 1–7 days. Zero-day = exploited before a patch exists.

Penetration Testing Types

Penetration testing simulates real-world attacks against your systems to identify exploitable vulnerabilities. The type you choose affects scope, depth, cost, and what you learn.

Type Prior Knowledge What It Simulates Typical Cost Depth
Black Box None — tester has no prior knowledge of the system External attacker with no insider information. Tests perimeter defenses, publicly exposed services, and information leakage. $5,000 – $50,000 Surface-level; may miss internal vulnerabilities
Gray Box Partial — credentials, network diagrams, or limited documentation Insider threat or compromised employee account. Tests privilege escalation, lateral movement, and internal controls. $12,000+ Moderate; balances realism with coverage
White Box Full — source code, architecture docs, admin credentials Most thorough assessment possible. Tests code-level vulnerabilities, logic flaws, and deep infrastructure issues. $30,000+ Deep; highest coverage but least realistic of attacker perspective
Bug Bounty Varies — typically external-facing scope with rules of engagement Crowdsourced, ongoing security testing by independent researchers. Pay-per-vulnerability model. Platforms: HackerOne, Bugcrowd, Intigriti. Variable — per finding ($100–$100,000+) Continuous; scales with researcher interest; may have gaps in coverage

Security Certifications

Industry certifications validate security knowledge and are often required for security roles. The right certification depends on your career stage and specialization.

Certification Level Focus Area Key Details
CompTIA Security+ Entry-level Broad security fundamentals — threats, architecture, operations, incident response, governance. Vendor-neutral foundation that covers network security, compliance, identity management, and cryptography basics. DoD 8570 approved; 90 questions, 90 minutes; no prerequisites but 2+ years experience recommended
CEH Intermediate Ethical hacking theory — reconnaissance, scanning, enumeration, system hacking, malware analysis, social engineering. Teaches attacker techniques from a defensive perspective. EC-Council; 125 questions, 4 hours; theory-heavy exam; popular in government and defense sectors
CompTIA CySA+ Intermediate Security analytics & operations — threat detection, behavioral analysis, vulnerability management, incident response. Blue team / SOC analyst focus. DoD 8570 approved; performance-based questions; bridges Security+ to advanced certs
CISSP Advanced Security management & architecture — eight domains covering security engineering, identity management, risk management, software security, asset security, and operations. The “gold standard” for security leadership. (ISC)²; requires 5 years experience in 2+ domains; adaptive exam up to 175 questions; endorsement required
OSCP Advanced Hands-on penetration testing — 24-hour practical exam requiring exploitation of live machines. Tests real-world offensive security skills: enumeration, exploitation, privilege escalation, pivoting, and report writing. Offensive Security; fully practical (no multiple choice); widely considered the most respected pen test cert
CISM Advanced Information security management — governance, risk management, program development, and incident management. Designed for managers and directors who oversee security programs. ISACA; requires 5 years infosec management experience; 150 questions, 4 hours; management-focused counterpart to CISSP

Typical Certification Path

Entry Level Intermediate Advanced +-----------+ +------------+ +------------+ | Security+ | →→→→ | CEH or | →→→→→→→ | CISSP | (Management track) +-----------+ | CySA+ | +------------+ +------------+ | +------------+ +→→→→→→→→→→→→→ | OSCP | (Technical track) +------------+ | +------------+ | OSCE3 | (Expert offensive) +------------+

Staying Current — Essential Resources

Security evolves daily. These resources help practitioners stay ahead of emerging threats, new vulnerabilities, and evolving best practices.

CISA Advisories

cisa.gov/news-events/cybersecurity-advisories — U.S. government advisories on active threats, ICS vulnerabilities, and mitigation guidance. Subscribe to alerts for real-time notification of critical issues.

NVD / CVE Database

nvd.nist.gov — National Vulnerability Database. The authoritative source for CVE details, CVSS scores, CPE references, and remediation links. Search by product, vendor, or CVE ID.

OWASP

owasp.org — Open Worldwide Application Security Project. Free tools, guides, and community. The OWASP Top 10, ASVS, Testing Guide, and Cheat Sheet Series are industry essentials.

MITRE ATT&CK

attack.mitre.org — Adversary tactics, techniques, and procedures (TTPs) knowledge base. Used by SOCs and red teams to map attacker behavior, measure detection coverage, and plan threat hunts.

Krebs on Security

krebsonsecurity.com — Brian Krebs' investigative security journalism. In-depth reporting on cybercrime, data breaches, and threat actor groups. One of the most cited sources in the industry.

The Hacker News

thehackernews.com — Daily cybersecurity news covering vulnerabilities, malware, data breaches, and industry updates. Good for staying current on emerging threats and zero-day disclosures.

SANS Reading Room

sans.org/white-papers — Thousands of peer-reviewed research papers on security topics. SANS also offers the Internet Storm Center (isc.sans.edu) for daily threat intelligence and handler diaries.

CISA Learning

cisa.gov/learning — Free cybersecurity training and exercises from CISA. Includes tabletop exercises, online courses, and the Cybersecurity Workforce Development Toolkit. FedVTE offers hundreds of free courses.

Security is not a product, but a process.

— Bruce Schneier